diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 10:12:18 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 16:00:53 -0500 |
commit | 135e71d650e5a414219729cd84a2c917a3e8f1fb (patch) | |
tree | 7d5f2c99a8be34e27bb1644282576371bd0ab98e /src/animation_system.cpp | |
parent | b06b259c54e09f1a4026191d6eec9684599bd370 (diff) | |
download | tanetane-135e71d650e5a414219729cd84a2c917a3e8f1fb.tar.gz tanetane-135e71d650e5a414219729cd84a2c917a3e8f1fb.tar.bz2 tanetane-135e71d650e5a414219729cd84a2c917a3e8f1fb.zip |
Removed manual animation stuff
Diffstat (limited to 'src/animation_system.cpp')
-rw-r--r-- | src/animation_system.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/animation_system.cpp b/src/animation_system.cpp index a280aee..2c2c6a5 100644 --- a/src/animation_system.cpp +++ b/src/animation_system.cpp | |||
@@ -78,8 +78,6 @@ void AnimationSystem::initSprite(int spriteId, std::string_view filename) { | |||
78 | 78 | ||
79 | if (animName.back() == '!') { | 79 | if (animName.back() == '!') { |
80 | anim.looping = false; | 80 | anim.looping = false; |
81 | } else if (animName.back() == '.') { | ||
82 | anim.manual = true; | ||
83 | } | 81 | } |
84 | 82 | ||
85 | int animId = sprite.animations.size(); | 83 | int animId = sprite.animations.size(); |
@@ -114,19 +112,6 @@ void AnimationSystem::tick(double dt) { | |||
114 | } | 112 | } |
115 | } | 113 | } |
116 | 114 | ||
117 | void AnimationSystem::advanceAnimation(int spriteId) { | ||
118 | Sprite& sprite = game_.getSprite(spriteId); | ||
119 | Animation& animation = sprite.animations[sprite.animationId]; | ||
120 | |||
121 | if (animation.manual) { | ||
122 | sprite.animationFrame++; | ||
123 | |||
124 | if (sprite.animationFrame >= animation.frameIndices.size()) { | ||
125 | sprite.animationFrame = 0; | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | |||
130 | void AnimationSystem::setSpriteDirection(int spriteId, Direction dir) { | 115 | void AnimationSystem::setSpriteDirection(int spriteId, Direction dir) { |
131 | Sprite& sprite = game_.getSprite(spriteId); | 116 | Sprite& sprite = game_.getSprite(spriteId); |
132 | if (sprite.dir != dir) { | 117 | if (sprite.dir != dir) { |