From 14c3e64dc08ce1bcd8f2e421150f3f8e88de914a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 1 Mar 2021 17:59:34 -0500 Subject: Added (human) Mixolydia sprite --- res/maps/pink_shell.tmx | 15 ++++++++- res/scripts/pink_shell.lua | 4 +++ res/sprites/human_mixolydia.png | Bin 0 -> 9244 bytes res/sprites/human_mixolydia_anim.txt | 18 +++++++++++ res/sprites/human_mixolydia_frames.txt | 57 +++++++++++++++++++++++++++++++++ src/game.cpp | 1 + src/map.cpp | 2 ++ src/map.h | 1 + 8 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 res/sprites/human_mixolydia.png create mode 100644 res/sprites/human_mixolydia_anim.txt create mode 100644 res/sprites/human_mixolydia_frames.txt diff --git a/res/maps/pink_shell.tmx b/res/maps/pink_shell.tmx index ecff5a8..d7915d9 100644 --- a/res/maps/pink_shell.tmx +++ b/res/maps/pink_shell.tmx @@ -1,5 +1,5 @@ - + @@ -61,6 +61,19 @@ + + + + + + + + + + + + + diff --git a/res/scripts/pink_shell.lua b/res/scripts/pink_shell.lua index 1719c4f..4223188 100644 --- a/res/scripts/pink_shell.lua +++ b/res/scripts/pink_shell.lua @@ -13,3 +13,7 @@ function pink_shell.talk_to_ocho() SetAnimation("ocho", "still") HideCutsceneBars() end + +function pink_shell.talk_to_mixolydia() + SetDirection("mixolydia", Direction.UP) +end diff --git a/res/sprites/human_mixolydia.png b/res/sprites/human_mixolydia.png new file mode 100644 index 0000000..65f11dc Binary files /dev/null and b/res/sprites/human_mixolydia.png differ diff --git a/res/sprites/human_mixolydia_anim.txt b/res/sprites/human_mixolydia_anim.txt new file mode 100644 index 0000000..f48364b --- /dev/null +++ b/res/sprites/human_mixolydia_anim.txt @@ -0,0 +1,18 @@ +../res/sprites/human_mixolydia.png +../res/sprites/human_mixolydia_frames.txt +still[down]: 0 +still[left]: 1 +still[up]: 2 +still[right]: 3 +talk[down]: 4,5 +talk[left]: 6,7 +talk[up]: 8,9 +talk[right]: 10,11 +holding_stick[down]: 15 +holding_stick[down_left]: 16 +holding_stick[left]: 17 +holding_stick[right]: 18 +holding_stick[down_right]: 19 +walk[left]: 20,21 +walk[right]: 22,23 +smack![down]: 15,24,25,26,27 \ No newline at end of file diff --git a/res/sprites/human_mixolydia_frames.txt b/res/sprites/human_mixolydia_frames.txt new file mode 100644 index 0000000..e1f0c22 --- /dev/null +++ b/res/sprites/human_mixolydia_frames.txt @@ -0,0 +1,57 @@ +32,32 cell size +10 frames per row +53 frames + +16,32,8,32 +16,32,8,32 +32,32,16,32 +16,32,7,32 +16,32,8,32 +16,32,8,32 +16,32,8,32 +16,32,8,32 +32,32,16,32 +32,32,16,32 +16,32,8,32 +16,32,8,32 +16,32,8,32 +16,32,8,32 +16,32,7,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,15,32 +32,32,15,32 +32,31,16,31 +32,31,16,31 +32,31,15,31 +32,31,15,31 +16,32,8,32 +16,32,8,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 +32,32,16,32 diff --git a/src/game.cpp b/src/game.cpp index 8ba4c85..5b5c506 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -64,6 +64,7 @@ void Game::loadMap(std::string filename) { if (!p.animName.empty()) { getSystem().setSpriteAnimation(spriteId, p.animName); } + getSystem().setSpriteDirection(spriteId, p.dir); } getSprite(spriteId).interactionScript = p.interactionScript; if (p.movementSpeed != -1) { diff --git a/src/map.cpp b/src/map.cpp index 0cf9402..c3ac828 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -91,6 +91,8 @@ Map::Map(std::string_view name) : name_(name) { p.animationFilename = "../res/sprites/" + property.getStringValue() + "_anim.txt"; } else if (property.getName() == "animName") { p.animName = property.getStringValue(); + } else if (property.getName() == "direction") { + p.dir = directionFromString(property.getStringValue()); } else if (property.getName() == "interactionScript") { p.interactionScript = property.getStringValue(); } else if (property.getName() == "shadow") { diff --git a/src/map.h b/src/map.h index ee88920..80a79b0 100644 --- a/src/map.h +++ b/src/map.h @@ -25,6 +25,7 @@ struct Prototype { vec2i collisionSize; std::string animationFilename; std::string animName; + Direction dir = Direction::down; std::string interactionScript; bool shadow = false; bool wander = false; -- cgit 1.4.1