summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/spritedef.cpp')
-rw-r--r--src/resources/spritedef.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 3eb1d92b..28db0452 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -46,7 +46,7 @@ Action *SpriteDef::getAction(SpriteAction action) const
return i->second;
}
-SpriteDef *SpriteDef::load(std::string const &animationFile, int variant)
+SpriteDef *SpriteDef::load(const std::string &animationFile, int variant)
{
std::string::size_type pos = animationFile.find('|');
std::string palettes;
@@ -121,7 +121,7 @@ void SpriteDef::loadSprite(xmlNodePtr spriteNode, int variant,
}
}
-void SpriteDef::loadImageSet(xmlNodePtr node, std::string const &palettes)
+void SpriteDef::loadImageSet(xmlNodePtr node, const std::string &palettes)
{
const std::string name = XML::getProperty(node, "name", "");
@@ -146,8 +146,7 @@ void SpriteDef::loadImageSet(xmlNodePtr node, std::string const &palettes)
mImageSets[name] = imageSet;
}
-void
-SpriteDef::loadAction(xmlNodePtr node, int variant_offset)
+void SpriteDef::loadAction(xmlNodePtr node, int variant_offset)
{
const std::string actionName = XML::getProperty(node, "name", "");
const std::string imageSetName = XML::getProperty(node, "imageset", "");
@@ -187,10 +186,9 @@ SpriteDef::loadAction(xmlNodePtr node, int variant_offset)
}
}
-void
-SpriteDef::loadAnimation(xmlNodePtr animationNode,
- Action *action, ImageSet *imageSet,
- int variant_offset)
+void SpriteDef::loadAnimation(xmlNodePtr animationNode,
+ Action *action, ImageSet *imageSet,
+ int variant_offset)
{
const std::string directionName =
XML::getProperty(animationNode, "direction", "");
@@ -267,8 +265,7 @@ SpriteDef::loadAnimation(xmlNodePtr animationNode,
} // for frameNode
}
-void
-SpriteDef::includeSprite(xmlNodePtr includeNode)
+void SpriteDef::includeSprite(xmlNodePtr includeNode)
{
// TODO: Perform circular dependency check, since it's easy to crash the
// client this way.
@@ -289,8 +286,7 @@ SpriteDef::includeSprite(xmlNodePtr includeNode)
loadSprite(rootNode, 0);
}
-void
-SpriteDef::substituteAction(SpriteAction complete, SpriteAction with)
+void SpriteDef::substituteAction(SpriteAction complete, SpriteAction with)
{
if (mActions.find(complete) == mActions.end())
{
@@ -324,8 +320,7 @@ SpriteDef::~SpriteDef()
}
}
-SpriteAction
-SpriteDef::makeSpriteAction(const std::string& action)
+SpriteAction SpriteDef::makeSpriteAction(const std::string &action)
{
if (action == "" || action == "default") {
return ACTION_DEFAULT;
@@ -377,8 +372,7 @@ SpriteDef::makeSpriteAction(const std::string& action)
}
}
-SpriteDirection
-SpriteDef::makeSpriteDirection(const std::string& direction)
+SpriteDirection SpriteDef::makeSpriteDirection(const std::string& direction)
{
if (direction == "" || direction == "default") {
return DIRECTION_DEFAULT;
@@ -397,5 +391,5 @@ SpriteDef::makeSpriteDirection(const std::string& direction)
}
else {
return DIRECTION_INVALID;
- };
+ }
}