diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 21:30:59 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 21:30:59 -0500 |
commit | 4effe126d5b04d7e8572f8d785735a66150aa4ee (patch) | |
tree | a2e2f98dbacc9a8593b70bf16eac06adfc30b337 /src | |
parent | 04399885ba1ccecccdb7040d1f1165e977b29479 (diff) | |
download | tanetane-4effe126d5b04d7e8572f8d785735a66150aa4ee.tar.gz tanetane-4effe126d5b04d7e8572f8d785735a66150aa4ee.tar.bz2 tanetane-4effe126d5b04d7e8572f8d785735a66150aa4ee.zip |
Ionia is in the water!
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 3 | ||||
-rw-r--r-- | src/map.cpp | 2 | ||||
-rw-r--r-- | src/map.h | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index 2a4308f..af66068 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
@@ -60,6 +60,9 @@ void Game::loadMap(std::string filename) { | |||
60 | if (!p.animationFilename.empty()) { | 60 | if (!p.animationFilename.empty()) { |
61 | getSystem<AnimationSystem>().initSprite(spriteId, p.animationFilename); | 61 | getSystem<AnimationSystem>().initSprite(spriteId, p.animationFilename); |
62 | getSprite(spriteId).normallyHasShadow = p.shadow; | 62 | getSprite(spriteId).normallyHasShadow = p.shadow; |
63 | if (!p.animName.empty()) { | ||
64 | getSystem<AnimationSystem>().setSpriteAnimation(spriteId, p.animName); | ||
65 | } | ||
63 | } | 66 | } |
64 | getSprite(spriteId).interactionScript = p.interactionScript; | 67 | getSprite(spriteId).interactionScript = p.interactionScript; |
65 | if (p.movementSpeed != -1) { | 68 | if (p.movementSpeed != -1) { |
diff --git a/src/map.cpp b/src/map.cpp index 23445e4..a5ecbdd 100644 --- a/src/map.cpp +++ b/src/map.cpp | |||
@@ -89,6 +89,8 @@ Map::Map(std::string_view name) : name_(name) { | |||
89 | p.collisionSize.h() = property.getIntValue(); | 89 | p.collisionSize.h() = property.getIntValue(); |
90 | } else if (property.getName() == "animation") { | 90 | } else if (property.getName() == "animation") { |
91 | p.animationFilename = property.getStringValue(); | 91 | p.animationFilename = property.getStringValue(); |
92 | } else if (property.getName() == "animName") { | ||
93 | p.animName = property.getStringValue(); | ||
92 | } else if (property.getName() == "interactionScript") { | 94 | } else if (property.getName() == "interactionScript") { |
93 | p.interactionScript = property.getStringValue(); | 95 | p.interactionScript = property.getStringValue(); |
94 | } else if (property.getName() == "shadow") { | 96 | } else if (property.getName() == "shadow") { |
diff --git a/src/map.h b/src/map.h index 1a88cc8..9f5a93b 100644 --- a/src/map.h +++ b/src/map.h | |||
@@ -24,6 +24,7 @@ struct Prototype { | |||
24 | vec2i collisionOffset; | 24 | vec2i collisionOffset; |
25 | vec2i collisionSize; | 25 | vec2i collisionSize; |
26 | std::string animationFilename; | 26 | std::string animationFilename; |
27 | std::string animName; | ||
27 | std::string interactionScript; | 28 | std::string interactionScript; |
28 | bool shadow = false; | 29 | bool shadow = false; |
29 | bool wander = false; | 30 | bool wander = false; |