summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.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/resources/spritedef.h
parent3dba40474d5b1525e8723139ae7be7576967feea (diff)
downloadmana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.gz
mana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.bz2
mana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.xz
mana-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/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 56b9a713..0c3e443b 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -81,7 +81,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.
@@ -91,8 +91,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);
private:
/**
@@ -114,27 +113,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.
@@ -145,8 +141,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);
/**
* Converts a string into a SpriteDirection enum.