diff options
| -rw-r--r-- | res/maps/pink_shell.tmx | 15 | ||||
| -rw-r--r-- | res/scripts/pink_shell.lua | 4 | ||||
| -rw-r--r-- | res/sprites/human_mixolydia.png | bin | 0 -> 9244 bytes | |||
| -rw-r--r-- | res/sprites/human_mixolydia_anim.txt | 18 | ||||
| -rw-r--r-- | res/sprites/human_mixolydia_frames.txt | 57 | ||||
| -rw-r--r-- | src/game.cpp | 1 | ||||
| -rw-r--r-- | src/map.cpp | 2 | ||||
| -rw-r--r-- | src/map.h | 1 |
8 files changed, 97 insertions, 1 deletions
| 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 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="32" height="32" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="4"> | 2 | <map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="32" height="32" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5"> |
| 3 | <properties> | 3 | <properties> |
| 4 | <property name="music" value="are_you_gorgeous"/> | 4 | <property name="music" value="are_you_gorgeous"/> |
| 5 | </properties> | 5 | </properties> |
| @@ -61,6 +61,19 @@ | |||
| 61 | </properties> | 61 | </properties> |
| 62 | <point/> | 62 | <point/> |
| 63 | </object> | 63 | </object> |
| 64 | <object id="4" name="mixolydia" type="sprite" x="248" y="136"> | ||
| 65 | <properties> | ||
| 66 | <property name="animation" value="human_mixolydia"/> | ||
| 67 | <property name="collisionHeight" type="int" value="8"/> | ||
| 68 | <property name="collisionOffsetX" type="int" value="-8"/> | ||
| 69 | <property name="collisionOffsetY" type="int" value="-8"/> | ||
| 70 | <property name="collisionWidth" type="int" value="12"/> | ||
| 71 | <property name="direction" value="up"/> | ||
| 72 | <property name="interactionScript" value="talk_to_mixolydia"/> | ||
| 73 | <property name="shadow" type="bool" value="true"/> | ||
| 74 | </properties> | ||
| 75 | <point/> | ||
| 76 | </object> | ||
| 64 | </objectgroup> | 77 | </objectgroup> |
| 65 | <layer id="1" name="Upper" width="32" height="32"> | 78 | <layer id="1" name="Upper" width="32" height="32"> |
| 66 | <properties> | 79 | <properties> |
| 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() | |||
| 13 | SetAnimation("ocho", "still") | 13 | SetAnimation("ocho", "still") |
| 14 | HideCutsceneBars() | 14 | HideCutsceneBars() |
| 15 | end | 15 | end |
| 16 | |||
| 17 | function pink_shell.talk_to_mixolydia() | ||
| 18 | SetDirection("mixolydia", Direction.UP) | ||
| 19 | end | ||
| diff --git a/res/sprites/human_mixolydia.png b/res/sprites/human_mixolydia.png new file mode 100644 index 0000000..65f11dc --- /dev/null +++ b/res/sprites/human_mixolydia.png | |||
| Binary files 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 @@ | |||
| 1 | ../res/sprites/human_mixolydia.png | ||
| 2 | ../res/sprites/human_mixolydia_frames.txt | ||
| 3 | still[down]: 0 | ||
| 4 | still[left]: 1 | ||
| 5 | still[up]: 2 | ||
| 6 | still[right]: 3 | ||
| 7 | talk[down]: 4,5 | ||
| 8 | talk[left]: 6,7 | ||
| 9 | talk[up]: 8,9 | ||
| 10 | talk[right]: 10,11 | ||
| 11 | holding_stick[down]: 15 | ||
| 12 | holding_stick[down_left]: 16 | ||
| 13 | holding_stick[left]: 17 | ||
| 14 | holding_stick[right]: 18 | ||
| 15 | holding_stick[down_right]: 19 | ||
| 16 | walk[left]: 20,21 | ||
| 17 | walk[right]: 22,23 | ||
| 18 | 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 @@ | |||
| 1 | 32,32 cell size | ||
| 2 | 10 frames per row | ||
| 3 | 53 frames | ||
| 4 | |||
| 5 | 16,32,8,32 | ||
| 6 | 16,32,8,32 | ||
| 7 | 32,32,16,32 | ||
| 8 | 16,32,7,32 | ||
| 9 | 16,32,8,32 | ||
| 10 | 16,32,8,32 | ||
| 11 | 16,32,8,32 | ||
| 12 | 16,32,8,32 | ||
| 13 | 32,32,16,32 | ||
| 14 | 32,32,16,32 | ||
| 15 | 16,32,8,32 | ||
| 16 | 16,32,8,32 | ||
| 17 | 16,32,8,32 | ||
| 18 | 16,32,8,32 | ||
| 19 | 16,32,7,32 | ||
| 20 | 32,32,16,32 | ||
| 21 | 32,32,16,32 | ||
| 22 | 32,32,16,32 | ||
| 23 | 32,32,15,32 | ||
| 24 | 32,32,15,32 | ||
| 25 | 32,31,16,31 | ||
| 26 | 32,31,16,31 | ||
| 27 | 32,31,15,31 | ||
| 28 | 32,31,15,31 | ||
| 29 | 16,32,8,32 | ||
| 30 | 16,32,8,32 | ||
| 31 | 32,32,16,32 | ||
| 32 | 32,32,16,32 | ||
| 33 | 32,32,16,32 | ||
| 34 | 32,32,16,32 | ||
| 35 | 32,32,16,32 | ||
| 36 | 32,32,16,32 | ||
| 37 | 32,32,16,32 | ||
| 38 | 32,32,16,32 | ||
| 39 | 32,32,16,32 | ||
| 40 | 32,32,16,32 | ||
| 41 | 32,32,16,32 | ||
| 42 | 32,32,16,32 | ||
| 43 | 32,32,16,32 | ||
| 44 | 32,32,16,32 | ||
| 45 | 32,32,16,32 | ||
| 46 | 32,32,16,32 | ||
| 47 | 32,32,16,32 | ||
| 48 | 32,32,16,32 | ||
| 49 | 32,32,16,32 | ||
| 50 | 32,32,16,32 | ||
| 51 | 32,32,16,32 | ||
| 52 | 32,32,16,32 | ||
| 53 | 32,32,16,32 | ||
| 54 | 32,32,16,32 | ||
| 55 | 32,32,16,32 | ||
| 56 | 32,32,16,32 | ||
| 57 | 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) { | |||
| 64 | if (!p.animName.empty()) { | 64 | if (!p.animName.empty()) { |
| 65 | getSystem<AnimationSystem>().setSpriteAnimation(spriteId, p.animName); | 65 | getSystem<AnimationSystem>().setSpriteAnimation(spriteId, p.animName); |
| 66 | } | 66 | } |
| 67 | getSystem<AnimationSystem>().setSpriteDirection(spriteId, p.dir); | ||
| 67 | } | 68 | } |
| 68 | getSprite(spriteId).interactionScript = p.interactionScript; | 69 | getSprite(spriteId).interactionScript = p.interactionScript; |
| 69 | if (p.movementSpeed != -1) { | 70 | 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) { | |||
| 91 | p.animationFilename = "../res/sprites/" + property.getStringValue() + "_anim.txt"; | 91 | p.animationFilename = "../res/sprites/" + property.getStringValue() + "_anim.txt"; |
| 92 | } else if (property.getName() == "animName") { | 92 | } else if (property.getName() == "animName") { |
| 93 | p.animName = property.getStringValue(); | 93 | p.animName = property.getStringValue(); |
| 94 | } else if (property.getName() == "direction") { | ||
| 95 | p.dir = directionFromString(property.getStringValue()); | ||
| 94 | } else if (property.getName() == "interactionScript") { | 96 | } else if (property.getName() == "interactionScript") { |
| 95 | p.interactionScript = property.getStringValue(); | 97 | p.interactionScript = property.getStringValue(); |
| 96 | } else if (property.getName() == "shadow") { | 98 | } 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 { | |||
| 25 | vec2i collisionSize; | 25 | vec2i collisionSize; |
| 26 | std::string animationFilename; | 26 | std::string animationFilename; |
| 27 | std::string animName; | 27 | std::string animName; |
| 28 | Direction dir = Direction::down; | ||
| 28 | std::string interactionScript; | 29 | std::string interactionScript; |
| 29 | bool shadow = false; | 30 | bool shadow = false; |
| 30 | bool wander = false; | 31 | bool wander = false; |
