summaryrefslogtreecommitdiff
path: root/src/resources/sprite/animatedsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/resources/sprite/animatedsprite.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
plus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/resources/sprite/animatedsprite.cpp')
-rw-r--r--src/resources/sprite/animatedsprite.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp
index 738f8c31b..60a2d7f9d 100644
--- a/src/resources/sprite/animatedsprite.cpp
+++ b/src/resources/sprite/animatedsprite.cpp
@@ -77,7 +77,8 @@ AnimatedSprite *AnimatedSprite::load(const std::string &restrict filename,
AnimatedSprite *restrict const as = new AnimatedSprite(s);
#ifdef DEBUG_ANIMATIONS
as->setSpriteName(filename);
-#endif
+#endif // DEBUG_ANIMATIONS
+
as->play(SpriteAction::STAND);
s->decRef();
return as;
@@ -100,7 +101,8 @@ AnimatedSprite *AnimatedSprite::delayedLoad(const std::string &restrict
AnimatedSprite *restrict const as = new AnimatedSprite(nullptr);
#ifdef DEBUG_ANIMATIONS
as->setSpriteName(filename);
-#endif
+#endif // DEBUG_ANIMATIONS
+
as->play(SpriteAction::STAND);
as->setDelayLoad(filename, variant);
return as;
@@ -114,7 +116,8 @@ AnimatedSprite *AnimatedSprite::clone(const AnimatedSprite *restrict const
AnimatedSprite *restrict const sprite = new AnimatedSprite(anim->mSprite);
#ifdef DEBUG_ANIMATIONS
sprite->setSpriteName(anim->getSpriteName());
-#endif
+#endif // DEBUG_ANIMATIONS
+
sprite->play(SpriteAction::STAND);
return sprite;
}