diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-05-04 13:09:25 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-05-04 13:09:25 +0000 |
commit | 00fb4bde7974a20aacfc1c52e48fff2faee2d385 (patch) | |
tree | 2097ef003495d7e6b4a8cf697ad7896039aac113 /src/simpleanimation.h | |
parent | b3376bfe4e26591e1dc1066d8f2270baf4f9f759 (diff) | |
download | mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.gz mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.bz2 mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.xz mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.zip |
Merged particle engine into main eAthena branch.
Diffstat (limited to 'src/simpleanimation.h')
-rw-r--r-- | src/simpleanimation.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/simpleanimation.h b/src/simpleanimation.h index a56c31da..14793c2f 100644 --- a/src/simpleanimation.h +++ b/src/simpleanimation.h @@ -26,7 +26,10 @@ #include "resources/animation.h" +#include "utils/xml.h" + class Frame; +class Graphics; /** * This class is a leightweight alternative to the AnimatedSprite class. @@ -35,6 +38,10 @@ class Frame; class SimpleAnimation { public: + + /** + * Creates a simple animation with an already created animation + */ SimpleAnimation(Animation *animation): mAnimation(animation), mAnimationTime(0), @@ -42,6 +49,11 @@ class SimpleAnimation mCurrentFrame(mAnimation->getFrame(0)) {}; + /** + * Creates a simple animation that creates its animation from XML Data + */ + SimpleAnimation(xmlNodePtr animationNode); + ~SimpleAnimation(); void update(unsigned int timePassed); @@ -49,17 +61,10 @@ class SimpleAnimation Image *getCurrentImage() const; private: - /** The hosted animation. */ - Animation *mAnimation; - - /** Time in game ticks the current frame is shown. */ - unsigned int mAnimationTime; - - /** Index of current animation frame. */ - unsigned int mAnimationPhase; - - /** Current animation frame. */ - Frame *mCurrentFrame; + Animation *mAnimation; /**< The hosted animation */ + unsigned int mAnimationTime; /**< Time in game ticks the current frame is shown*/ + unsigned int mAnimationPhase; /**< Index of current animation phase*/ + Frame *mCurrentFrame; /**< Current animation phase */ }; #endif |