summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-03-01 17:59:34 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-03-01 17:59:34 -0500
commit14c3e64dc08ce1bcd8f2e421150f3f8e88de914a (patch)
tree869fe3d12601afd2dee66154213bcf99f393e1e6 /src
parentea8fb5426b0f065b4ef508bb33c2baf30df6b5a4 (diff)
downloadtanetane-14c3e64dc08ce1bcd8f2e421150f3f8e88de914a.tar.gz
tanetane-14c3e64dc08ce1bcd8f2e421150f3f8e88de914a.tar.bz2
tanetane-14c3e64dc08ce1bcd8f2e421150f3f8e88de914a.zip
Added (human) Mixolydia sprite
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp1
-rw-r--r--src/map.cpp2
-rw-r--r--src/map.h1
3 files changed, 4 insertions, 0 deletions
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;