summaryrefslogtreecommitdiff
path: root/src/animation.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2006-09-20 23:34:11 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2006-09-20 23:34:11 +0000
commit073d6ba7ad9f4052dcefd0fc64fd705b0e9c8f79 (patch)
tree1838ff9e6a2c54519f2b61af8d54388f2feabfde /src/animation.h
parent0d2c09435711a5bcb4dfbd7d7900de6c415361ee (diff)
downloadmana-client-073d6ba7ad9f4052dcefd0fc64fd705b0e9c8f79.tar.gz
mana-client-073d6ba7ad9f4052dcefd0fc64fd705b0e9c8f79.tar.bz2
mana-client-073d6ba7ad9f4052dcefd0fc64fd705b0e9c8f79.tar.xz
mana-client-073d6ba7ad9f4052dcefd0fc64fd705b0e9c8f79.zip
tweaks at the animation system (mostly about fixing the looping attack animations of the monsters)
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;