summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-21 14:38:55 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-21 14:45:57 -0600
commitb5368211afefa2c2586e1979e382ef6a4dc79bdd (patch)
tree8a2d55b155c07605931047eb0467d6e2ff448582 /src/compoundsprite.cpp
parent20db67cb1f33b1e317581b8fdf35f1b1f6a1e714 (diff)
downloadmana-client-b5368211afefa2c2586e1979e382ef6a4dc79bdd.tar.gz
mana-client-b5368211afefa2c2586e1979e382ef6a4dc79bdd.tar.bz2
mana-client-b5368211afefa2c2586e1979e382ef6a4dc79bdd.tar.xz
mana-client-b5368211afefa2c2586e1979e382ef6a4dc79bdd.zip
Fix transparent overlays under OpenGL
This was accidentally broken in the SDL buffer commit. Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index c01b11c3..d6731e5d 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -99,7 +99,9 @@ bool CompoundSprite::draw(Graphics* graphics, int posX, int posY) const
redraw();
if (mAlpha == 1.0f && mImage)
+ {
return graphics->drawImage(mImage, posX + mOffsetX, posY + mOffsetY);
+ }
else if (mAlpha && mAlphaImage)
{
if (mAlphaImage->getAlpha() != mAlpha)
@@ -115,6 +117,8 @@ bool CompoundSprite::draw(Graphics* graphics, int posX, int posY) const
{
if (*it)
{
+ if ((*it)->getAlpha() != mAlpha)
+ (*it)->setAlpha(mAlpha);
(*it)->draw(graphics, posX, posY);
}
}