From 9eb0a78596c5351d8115d2e5361d59d7ba17c6fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 28 Feb 2021 11:50:05 -0500 Subject: Added door entryway to time passage antechamber The entryway should also work for the door in the time_passage map. The spritesheet also contains an entryway for Mixolydia's house. --- res/maps/time_passage.tmx | 6 +++--- res/maps/time_passage.tsx | 20 ++++++++++++++++++++ res/maps/time_passage_antechamber.tmx | 12 ++++++++++-- res/scripts/common.lua | 9 +++++++++ res/scripts/time_passage_antechamber.lua | 5 +++++ res/sprites/entryway.png | Bin 0 -> 3050 bytes res/sprites/entryway_anim.txt | 4 ++++ res/sprites/entryway_frames.txt | 6 ++++++ 8 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 res/sprites/entryway.png create mode 100644 res/sprites/entryway_anim.txt create mode 100644 res/sprites/entryway_frames.txt (limited to 'res') diff --git a/res/maps/time_passage.tmx b/res/maps/time_passage.tmx index 7400e34..c5c6b71 100644 --- a/res/maps/time_passage.tmx +++ b/res/maps/time_passage.tmx @@ -132,15 +132,15 @@ 1,1,1,1,1,1,1,1,1,1,1,21,21,21,30,31,2147483678,21,21,21,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,21,21,1073741851,1073741852,3221225499,21,21,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - + - + diff --git a/res/maps/time_passage.tsx b/res/maps/time_passage.tsx index 20c8eeb..2a93d5a 100644 --- a/res/maps/time_passage.tsx +++ b/res/maps/time_passage.tsx @@ -66,6 +66,16 @@ + + + + + + + + + + @@ -196,6 +206,16 @@ + + + + + + + + + + diff --git a/res/maps/time_passage_antechamber.tmx b/res/maps/time_passage_antechamber.tmx index 5075534..f705305 100644 --- a/res/maps/time_passage_antechamber.tmx +++ b/res/maps/time_passage_antechamber.tmx @@ -1,5 +1,5 @@ - + @@ -25,9 +25,17 @@ - + + + + + + + + + diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 8eb491f..1b0c4a9 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua @@ -313,6 +313,15 @@ function CreateAnimatedSpriteAtPosition(alias, character, x, y, animName, direct animation():setSpriteAnimation(spriteId, animName) end +function CreateAnimatedSpriteAtWarpPoint(alias, character, warp, animName, direction, layer) + local spriteId = emplaceSprite(alias) + local loc = getMap():getWarpPoint(warp) + transform():initSprite(spriteId, loc:x(), loc:y(), layer) + animation():initSprite(spriteId, "../res/sprites/" .. character .. "_anim.txt") + animation():setSpriteDirection(spriteId, direction) + animation():setSpriteAnimation(spriteId, animName) +end + function DestroyNamedSprite(alias) local spriteId = getSpriteByAlias(alias) destroySprite(spriteId) diff --git a/res/scripts/time_passage_antechamber.lua b/res/scripts/time_passage_antechamber.lua index d70694a..cd5abbe 100644 --- a/res/scripts/time_passage_antechamber.lua +++ b/res/scripts/time_passage_antechamber.lua @@ -1 +1,6 @@ time_passage_antechamber = {} + +function time_passage_antechamber.enter_door() + CreateAnimatedSpriteAtWarpPoint("entryway", "entryway", "entryway_appear", "time_passage", Direction.DOWN, SpriteLayer.NORMAL) + ChangeMap("time_passage", "fromBottom") +end diff --git a/res/sprites/entryway.png b/res/sprites/entryway.png new file mode 100644 index 0000000..d93b535 Binary files /dev/null and b/res/sprites/entryway.png differ diff --git a/res/sprites/entryway_anim.txt b/res/sprites/entryway_anim.txt new file mode 100644 index 0000000..35a5927 --- /dev/null +++ b/res/sprites/entryway_anim.txt @@ -0,0 +1,4 @@ +../res/sprites/entryway.png +../res/sprites/entryway_frames.txt +time_passage[down]: 0 +pink_shell[down]: 1 \ No newline at end of file diff --git a/res/sprites/entryway_frames.txt b/res/sprites/entryway_frames.txt new file mode 100644 index 0000000..9a75157 --- /dev/null +++ b/res/sprites/entryway_frames.txt @@ -0,0 +1,6 @@ +32,32 cell size +10 frames per row +2 frames + +32,32,0,0 +32,32,0,0 -- cgit 1.4.1