summaryrefslogtreecommitdiff
path: root/src/animation.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-29 23:59:08 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-29 23:59:08 +0000
commite8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3 (patch)
treee8dc775e12f6b4eb0a6d56448f05286c774bbb8a /src/animation.h
parent0e8c09433f3a193b5a94a1ad572d8237113cdfbf (diff)
downloadmana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.gz
mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.bz2
mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.xz
mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.zip
Merged trunk changes from revision 2618 to 2716 into the 0.1.0 branch.
Diffstat (limited to 'src/animation.h')
-rw-r--r--src/animation.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/animation.h b/src/animation.h
index 60dcd287..605d8cb1 100644
--- a/src/animation.h
+++ b/src/animation.h
@@ -61,10 +61,25 @@ class Animation
void
reset();
+ /**
+ * Appends a new animation at the end of the sequence
+ */
void
addPhase(int image, unsigned int delay, int offsetX, int offsetY);
+ /**
+ * Appends an animation terminator that states that the animation
+ * should not loop
+ */
void
+ addTerminator();
+
+ /**
+ * Updates animation phase.
+ * true indicates a still running animation while false indicates a
+ * finished animation
+ */
+ bool
update(unsigned int time);
int
@@ -89,6 +104,7 @@ class Animation
getLength();
protected:
+ static bool isTerminator(AnimationPhase);
std::list<AnimationPhase> mAnimationPhases;
std::list<AnimationPhase>::iterator iCurrentPhase;
unsigned int mTime;