diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-04 18:13:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-04 18:13:13 +0300 |
commit | 367c92d1ac584eb7ad5812f717aea27456f44e5f (patch) | |
tree | db2cf89deaf3a92815d2a5d2d3f6ce2f16995dc7 /src/resources/sprite/animatedsprite.cpp | |
parent | 9c52e6525e338da2170a86e57cefc0fe1c6701e3 (diff) | |
download | manaverse-367c92d1ac584eb7ad5812f717aea27456f44e5f.tar.gz manaverse-367c92d1ac584eb7ad5812f717aea27456f44e5f.tar.bz2 manaverse-367c92d1ac584eb7ad5812f717aea27456f44e5f.tar.xz manaverse-367c92d1ac584eb7ad5812f717aea27456f44e5f.zip |
Remove getter getAlpha form image class.
Diffstat (limited to 'src/resources/sprite/animatedsprite.cpp')
-rw-r--r-- | src/resources/sprite/animatedsprite.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp index 08d73c2c5..34aca4706 100644 --- a/src/resources/sprite/animatedsprite.cpp +++ b/src/resources/sprite/animatedsprite.cpp @@ -323,9 +323,7 @@ void AnimatedSprite::draw(Graphics *restrict const graphics, return; Image *restrict const image = mFrame->image; - if (image->getAlpha() != mAlpha) - image->setAlpha(mAlpha); - + image->setAlpha(mAlpha); graphics->drawImage(image, posX + mFrame->offsetX, posY + mFrame->offsetY); } @@ -338,9 +336,7 @@ void AnimatedSprite::drawRaw(Graphics *restrict const graphics, return; Image *restrict const image = mFrame->image; - if (image->getAlpha() != mAlpha) - image->setAlpha(mAlpha); - + image->setAlpha(mAlpha); graphics->drawImage(image, posX, posY); @@ -416,7 +412,7 @@ void AnimatedSprite::setAlpha(float alpha) restrict2 if (mFrame) { Image *restrict const image = mFrame->image; - if (image && image->getAlpha() != mAlpha) + if (image) image->setAlpha(mAlpha); } } |