summaryrefslogtreecommitdiff
path: root/src/sprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sprite.h')
-rw-r--r--src/sprite.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/sprite.h b/src/sprite.h
index d8345ab8..2bcd754a 100644
--- a/src/sprite.h
+++ b/src/sprite.h
@@ -33,19 +33,25 @@ class Sprite
/**
* Resets the sprite.
+ *
+ * @returns true if the sprite changed, false otherwise
*/
- virtual void reset() = 0;
+ virtual bool reset() = 0;
/**
- * Plays an action using the current direction
+ * Plays an action using the current direction.
+ *
+ * @returns true if the sprite changed, false otherwise
*/
- virtual void play(SpriteAction action) = 0;
+ virtual bool play(SpriteAction action) = 0;
/**
* Inform the animation of the passed time so that it can output the
* correct animation frame.
+ *
+ * @returns true if the sprite changed, false otherwise
*/
- virtual void update(int time) = 0;
+ virtual bool update(int time) = 0;
/**
* Draw the current animation frame at the coordinates given in screen
@@ -66,12 +72,14 @@ class Sprite
/**
* Returns a reference to the current image being drawn.
*/
- virtual Image* getImage() const = 0;
+ virtual const Image* getImage() const = 0;
/**
* Sets the direction.
+ *
+ * @returns true if the sprite changed, false otherwise
*/
- virtual void setDirection(SpriteDirection direction) = 0;
+ virtual bool setDirection(SpriteDirection direction) = 0;
/**
* Sets the alpha value of the animated sprite