summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r--src/animatedsprite.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index 405bf42e..41857d8f 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -50,7 +50,8 @@ class AnimatedSprite
* @param filename the file of the sprite to animate
* @param variant the sprite variant
*/
- static AnimatedSprite *load(std::string const &filename, int variant = 0);
+ static AnimatedSprite *load(const std::string &filename,
+ int variant = 0);
/**
* Destructor.
@@ -60,50 +61,42 @@ class AnimatedSprite
/**
* Resets the animated sprite.
*/
- void
- reset();
+ void reset();
/**
* Plays an action using the current direction
*/
- void
- play(SpriteAction action);
+ void play(SpriteAction action);
/**
* Inform the animation of the passed time so that it can output the
* correct animation frame.
*/
- void
- update(int time);
+ void update(int time);
/**
* Draw the current animation frame at the coordinates given in screen
* pixels.
*/
- bool
- draw(Graphics* graphics, int posX, int posY) const;
+ bool draw(Graphics* graphics, int posX, int posY) const;
/**
* gets the width in pixels of the image of the current frame
*/
- int
- getWidth() const;
+ int getWidth() const;
/**
* gets the height in pixels of the image of the current frame
*/
- int
- getHeight() const;
+ int getHeight() const;
/**
* Sets the direction.
*/
- void
- setDirection(SpriteDirection direction);
+ void setDirection(SpriteDirection direction);
private:
- bool
- updateCurrentAnimation(unsigned int dt);
+ bool updateCurrentAnimation(unsigned int dt);
SpriteDirection mDirection; /**< The sprite direction. */
int mLastTime; /**< The last time update was called. */