summaryrefslogtreecommitdiff
path: root/src/animation.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-02 23:05:46 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-02 23:05:46 +0000
commit8676da1517a86105e4cb4970fd3a7886f7d0c214 (patch)
tree5c4b3b7748c62d9375799f375e13c4b58a89498a /src/animation.h
parent8714de88fe9715b5a4014f16d15bc55f8860cdcf (diff)
downloadmana-8676da1517a86105e4cb4970fd3a7886f7d0c214.tar.gz
mana-8676da1517a86105e4cb4970fd3a7886f7d0c214.tar.bz2
mana-8676da1517a86105e4cb4970fd3a7886f7d0c214.tar.xz
mana-8676da1517a86105e4cb4970fd3a7886f7d0c214.zip
Some cleanups, fixes and a small start on a solution for the animated sprite
synchronization problem (resetting all animations).
Diffstat (limited to 'src/animation.h')
-rw-r--r--src/animation.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/animation.h b/src/animation.h
index f2c40194..c5b277b7 100644
--- a/src/animation.h
+++ b/src/animation.h
@@ -55,16 +55,32 @@ class Animation
*/
Animation();
- void addPhase(int image, unsigned int delay, int offsetX, int offsetY);
+ void
+ addPhase(int image, unsigned int delay, int offsetX, int offsetY);
- void update(unsigned int time);
+ void
+ update(unsigned int time);
- int getCurrentPhase() const;
+ int
+ getCurrentPhase() const;
- int getOffsetX() const { return (*iCurrentPhase).offsetX; };
- int getOffsetY() const { return (*iCurrentPhase).offsetY; };
+ /**
+ * Returns the x offset of the current frame.
+ */
+ int
+ getOffsetX() const { return (*iCurrentPhase).offsetX; };
- int getLength();
+ /**
+ * Returns the y offset of the current frame.
+ */
+ int
+ getOffsetY() const { return (*iCurrentPhase).offsetY; };
+
+ /**
+ * Returns the length of this animation.
+ */
+ int
+ getLength();
protected:
std::list<AnimationPhase> mAnimationPhases;