summaryrefslogtreecommitdiff
path: root/src/simpleanimation.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-06-04 21:48:47 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-06-04 21:48:47 +0000
commita353543dd4da3c489a84f6f17125fdd0e1be2349 (patch)
tree5e447a0f9a3fd50f58a48f39bbb77d392d78af36 /src/simpleanimation.h
parentab072dddb231895ba7b6762eda9fa70af961b0fb (diff)
downloadMana-a353543dd4da3c489a84f6f17125fdd0e1be2349.tar.gz
Mana-a353543dd4da3c489a84f6f17125fdd0e1be2349.tar.bz2
Mana-a353543dd4da3c489a84f6f17125fdd0e1be2349.tar.xz
Mana-a353543dd4da3c489a84f6f17125fdd0e1be2349.zip
Merged 0.0 changes from revision 3234 to 3317 to trunk.
Diffstat (limited to 'src/simpleanimation.h')
-rw-r--r--src/simpleanimation.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/simpleanimation.h b/src/simpleanimation.h
index a56c31da..561c540d 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,9 @@ class Frame;
class SimpleAnimation
{
public:
+ /**
+ * Creates a simple animation with an already created animation.
+ */
SimpleAnimation(Animation *animation):
mAnimation(animation),
mAnimationTime(0),
@@ -42,6 +48,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);
@@ -55,10 +66,10 @@ class SimpleAnimation
/** Time in game ticks the current frame is shown. */
unsigned int mAnimationTime;
- /** Index of current animation frame. */
+ /** Index of current animation phase. */
unsigned int mAnimationPhase;
- /** Current animation frame. */
+ /** Current animation phase. */
Frame *mCurrentFrame;
};