summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r--src/animatedsprite.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index e87a9885..73dfa529 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -33,6 +33,7 @@
class Action;
class Graphics;
class Spriteset;
+struct AnimationPhase;
enum SpriteAction
{
@@ -97,7 +98,8 @@ class AnimatedSprite
* Inform the animation of the passed time so that it can output the
* correct animation phase.
*/
- void update(int time);
+ void
+ update(int time);
/**
* Draw the current animation phase at the coordinates given in screen
@@ -107,13 +109,13 @@ class AnimatedSprite
draw(Graphics* graphics, Sint32 posX, Sint32 posY) const;
/**
- * gets the width in pixels of the current animation phase.
+ * Returns the width in pixels of the current animation phase.
*/
int
getWidth() const;
/**
- * gets the height in pixels of the current animation phase.
+ * Returns the height in pixels of the current animation phase.
*/
int
getHeight() const;
@@ -136,6 +138,12 @@ class AnimatedSprite
substituteAction(SpriteAction complete, SpriteAction with);
/**
+ * Returns the current animation frame.
+ */
+ const AnimationPhase*
+ getCurrentPhase() const;
+
+ /**
* Gets an integer property from an xmlNodePtr.
*
* TODO: Same function is present in MapReader. Should probably be