diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-30 17:51:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-30 17:51:46 +0300 |
commit | 88efa77af94256992ba2c05f4d7b5b5a9d01d6e9 (patch) | |
tree | c0a4f3c7f7ab1f0afaf54bcfc993c0b183c1989b /src/resources/sprite/animatedsprite.h | |
parent | c92ceeaa5e82bd5e237ca1fc4a3798fb61b81cfd (diff) | |
download | plus-88efa77af94256992ba2c05f4d7b5b5a9d01d6e9.tar.gz plus-88efa77af94256992ba2c05f4d7b5b5a9d01d6e9.tar.bz2 plus-88efa77af94256992ba2c05f4d7b5b5a9d01d6e9.tar.xz plus-88efa77af94256992ba2c05f4d7b5b5a9d01d6e9.zip |
Add debug flag for debugging animated sprites.
Diffstat (limited to 'src/resources/sprite/animatedsprite.h')
-rw-r--r-- | src/resources/sprite/animatedsprite.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/sprite/animatedsprite.h b/src/resources/sprite/animatedsprite.h index f9971cb5b..03b276a9b 100644 --- a/src/resources/sprite/animatedsprite.h +++ b/src/resources/sprite/animatedsprite.h @@ -129,12 +129,23 @@ class AnimatedSprite final : public Sprite { return mFrameTime; } #endif +#ifdef DEBUG_ANIMATIONS + void setSpriteName(const std::string &restrict name) + { mSpriteName = name; } + + std::string getSpriteName() const A_WARN_UNUSED + { return mSpriteName; } +#endif + private: bool updateCurrentAnimation(const unsigned int dt) restrict2; void setDelayLoad(const std::string &restrict filename, const int variant) restrict2; +#ifdef DEBUG_ANIMATIONS + std::string mSpriteName; +#endif SpriteDirection::Type mDirection; /**< The sprite direction. */ int mLastTime; /**< The last time update was called. */ |