summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-17 20:10:51 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-17 20:10:51 +0100
commit1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb (patch)
tree02556c7271844901a023b84b0fa84982ccff9bff /src/animatedsprite.h
parent3dba40474d5b1525e8723139ae7be7576967feea (diff)
downloadmana-client-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.gz
mana-client-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.bz2
mana-client-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.xz
mana-client-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.zip
Code reformatting
Mainly making sure 'const std::string &' is used everywhere instead of 'std::string const &'. The former has always been the preferred order in this project.
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. */