From ad276ae0d4679aee9d7e6082fa602b49c6fd940a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 17 Dec 2008 20:23:33 +0100 Subject: 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) --- src/animatedsprite.h | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'src/animatedsprite.h') 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. */ -- cgit v1.2.3-60-g2f50