summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.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/resources/spritedef.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/resources/spritedef.h')
-rw-r--r--src/resources/spritedef.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 88f9b7b7..49a4ca51 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -71,7 +71,7 @@ class SpriteDef : public Resource
/**
* Loads a sprite definition file.
*/
- static SpriteDef *load(std::string const &file, int variant);
+ static SpriteDef *load(const std::string &file, int variant);
/**
* Returns the specified action.
@@ -81,8 +81,7 @@ class SpriteDef : public Resource
/**
* Converts a string into a SpriteAction enum.
*/
- static SpriteAction
- makeSpriteAction(const std::string &action);
+ static SpriteAction makeSpriteAction(const std::string &action);
/**
* Converts a string into a SpriteDirection enum.
@@ -111,27 +110,24 @@ class SpriteDef : public Resource
/**
* Loads an imageset element.
*/
- void loadImageSet(xmlNodePtr node, std::string const &palettes);
+ void loadImageSet(xmlNodePtr node, const std::string &palettes);
/**
* Loads an action element.
*/
- void
- loadAction(xmlNodePtr node, int variant_offset);
+ void loadAction(xmlNodePtr node, int variant_offset);
/**
* Loads an animation element.
*/
- void
- loadAnimation(xmlNodePtr animationNode,
- Action *action, ImageSet *imageSet,
- int variant_offset);
+ void loadAnimation(xmlNodePtr animationNode,
+ Action *action, ImageSet *imageSet,
+ int variant_offset);
/**
* Include another sprite into this one.
*/
- void
- includeSprite(xmlNodePtr includeNode);
+ void includeSprite(xmlNodePtr includeNode);
/**
* Complete missing actions by copying existing ones.
@@ -142,8 +138,7 @@ class SpriteDef : public Resource
* When there are no animations defined for the action "complete", its
* animations become a copy of those of the action "with".
*/
- void
- substituteAction(SpriteAction complete, SpriteAction with);
+ void substituteAction(SpriteAction complete, SpriteAction with);
typedef std::map<std::string, ImageSet*> ImageSets;