diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-05 22:31:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-05 22:31:49 +0300 |
commit | 73432d5972f8a3d2a339260246f3a44842dac58e (patch) | |
tree | 9352472b7fb0714b2d898a19f343f8b0456afa38 /src/resources/sprite/animatedsprite.cpp | |
parent | 12273c046fff6b2f778ef4c3cc0d8014d86233e5 (diff) | |
download | plus-73432d5972f8a3d2a339260246f3a44842dac58e.tar.gz plus-73432d5972f8a3d2a339260246f3a44842dac58e.tar.bz2 plus-73432d5972f8a3d2a339260246f3a44842dac58e.tar.xz plus-73432d5972f8a3d2a339260246f3a44842dac58e.zip |
Add support for play animation in cutins.
Diffstat (limited to 'src/resources/sprite/animatedsprite.cpp')
-rw-r--r-- | src/resources/sprite/animatedsprite.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp index 216d94106..5210ce626 100644 --- a/src/resources/sprite/animatedsprite.cpp +++ b/src/resources/sprite/animatedsprite.cpp @@ -330,6 +330,22 @@ void AnimatedSprite::draw(Graphics *restrict const graphics, posX + mFrame->offsetX, posY + mFrame->offsetY); } +void AnimatedSprite::drawRaw(Graphics *restrict const graphics, + const int posX, + const int posY) const restrict2 +{ + if (!mFrame || !mFrame->image) + return; + + Image *restrict const image = mFrame->image; + if (image->getAlpha() != mAlpha) + image->setAlpha(mAlpha); + + graphics->drawImage(image, + posX, + posY); +} + bool AnimatedSprite::setSpriteDirection(const SpriteDirection::Type direction) restrict2 { |