diff options
author | Bertram <bertram@cegetel.net> | 2009-09-17 02:14:12 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-09-17 02:14:12 +0200 |
commit | fde41392cde408af9ea269e00336e503294dfdd2 (patch) | |
tree | fbdda716c1d441b7d85e686e054e3346396a144d /src/animatedsprite.h | |
parent | 78134dc88b0b39b0d051392fa937418bcd384404 (diff) | |
download | mana-client-fde41392cde408af9ea269e00336e503294dfdd2.tar.gz mana-client-fde41392cde408af9ea269e00336e503294dfdd2.tar.bz2 mana-client-fde41392cde408af9ea269e00336e503294dfdd2.tar.xz mana-client-fde41392cde408af9ea269e00336e503294dfdd2.zip |
Partially (but mainly) resolved Mantis #753 by making monsters, NPC, and Floor Items visible even covered.
Next Step would be to add a caching system for multi-layered sprites + copy functions for SDL and OpenGL.
Then, I'll be able to finish this, by making also players visible when covered...
But Kage asked me (each and every hour) to do something else first ;)
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r-- | src/animatedsprite.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h index fc7bdbbc..cdf88ceb 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -95,6 +95,18 @@ class AnimatedSprite */ void setDirection(SpriteDirection direction); + /** + * Sets the alpha value of the animated sprite + */ + void setAlpha(float alpha) + { mAlpha = alpha; } + + /** + * Returns the current alpha opacity of the animated sprite. + */ + virtual float getAlpha() const + { return mAlpha; } + private: bool updateCurrentAnimation(unsigned int dt); @@ -108,6 +120,7 @@ class AnimatedSprite Action *mAction; /**< The currently active action. */ Animation *mAnimation; /**< The currently active animation. */ Frame *mFrame; /**< The currently active frame. */ + float mAlpha; /**< The alpha opacity used to draw */ }; #endif |