summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-10 00:51:35 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-26 23:35:59 +0300
commit5fe07db8992b924069c4c358e557e88d2493f85f (patch)
tree8d959a23a5f8dde22e4f208d1bbf5665ee5068f7 /src/animatedsprite.h
parent1cf2a378e64315d4ddf7e10f115e96d86365c3f8 (diff)
downloadmanaplus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.gz
manaplus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.bz2
manaplus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.xz
manaplus-5fe07db8992b924069c4c358e557e88d2493f85f.zip
add basic animation unit tests.
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r--src/animatedsprite.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index 5a7dbde56..60df2f6e4 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -107,6 +107,23 @@ class AnimatedSprite final : public Sprite
static void setEnableCache(const bool b)
{ mEnableCache = b; }
+#ifdef UNITTESTS
+ SpriteDef *getSprite()
+ { return mSprite; }
+
+ Frame *getFrame()
+ { return mFrame; }
+
+ Animation *getAnimation()
+ { return mAnimation; }
+
+ unsigned int getFrameIndex()
+ { return mFrameIndex; }
+
+ unsigned int getFrameTime()
+ { return mFrameTime; }
+#endif
+
private:
bool updateCurrentAnimation(const unsigned int dt);