diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2010-10-17 00:47:38 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-17 00:50:51 +0200 |
commit | 02a014605d19d0d38c14cafa462a2539d63950df (patch) | |
tree | ac831646a8e10f8972f6f3e2ed7cc7acfa7607c8 /src/textparticle.cpp | |
parent | 9824ccf5946c86df1cf497b797c5f3da5d481d28 (diff) | |
download | mana-02a014605d19d0d38c14cafa462a2539d63950df.tar.gz mana-02a014605d19d0d38c14cafa462a2539d63950df.tar.bz2 mana-02a014605d19d0d38c14cafa462a2539d63950df.tar.xz mana-02a014605d19d0d38c14cafa462a2539d63950df.zip |
Fixed wrong alpha calculation of text particles
This resolves: http://bugs.manasource.org/view.php?id=51
Reviewed-by: Bertram
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r-- | src/textparticle.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/textparticle.cpp b/src/textparticle.cpp index e6226449..c9b5fc18 100644 --- a/src/textparticle.cpp +++ b/src/textparticle.cpp @@ -44,16 +44,8 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const int screenX = (int) mPos.x + offsetX; int screenY = (int) mPos.y - (int) mPos.z + offsetY; - float alpha = mAlpha * 255.0f; - - if (mLifetimeLeft > -1 && mLifetimeLeft < mFadeOut) - alpha = alpha * mLifetimeLeft / mFadeOut; - - if (mLifetimePast < mFadeIn) - alpha = alpha * mLifetimePast / mFadeIn; - gcn::Color color = *mColor; - color.a = (int)alpha; + color.a = getCurrentAlpha() * 255; TextRenderer::renderText(graphics, mText, screenX, screenY, gcn::Graphics::CENTER, |