summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-17 20:23:33 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-04 21:41:25 +0100
commitad276ae0d4679aee9d7e6082fa602b49c6fd940a (patch)
treedf3ff4eb6a315faaf722815c4af1e6398a40e81f /src/animatedsprite.h
parent33130dd288f5842f0edde0fff8618cdfe3afc856 (diff)
downloadmana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.gz
mana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.bz2
mana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.xz
mana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.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. (cherry picked from mainline)
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. */