diff options
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r-- | src/animatedsprite.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 59bf2f88..bc595f79 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -41,11 +41,12 @@ AnimatedSprite::AnimatedSprite(SpriteDef *sprite): mSprite(sprite), mAction(0), mAnimation(0), - mFrame(0), - mAlpha(1.0f) + mFrame(0) { assert(mSprite); + mAlpha = 1.0f; + // Take possession of the sprite mSprite->incRef(); @@ -193,3 +194,8 @@ int AnimatedSprite::getHeight() const else return 0; } + +Image* AnimatedSprite::getImage() const +{ + return mFrame ? mFrame->image : 0; +} |