diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-07 20:38:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-24 00:08:35 +0300 |
commit | d1590377de1141144d59ca1160de2822177f6f2a (patch) | |
tree | a368b251dedc7164cadbfe459de4cf5c983acf98 /src/resources/sprite/spritedef.cpp | |
parent | 65422e722cfe0616c65498c71aa0651857dcc49a (diff) | |
download | manaverse-d1590377de1141144d59ca1160de2822177f6f2a.tar.gz manaverse-d1590377de1141144d59ca1160de2822177f6f2a.tar.bz2 manaverse-d1590377de1141144d59ca1160de2822177f6f2a.tar.xz manaverse-d1590377de1141144d59ca1160de2822177f6f2a.zip |
Add support for tinyxml2 for reading / writing xml files.
Diffstat (limited to 'src/resources/sprite/spritedef.cpp')
-rw-r--r-- | src/resources/sprite/spritedef.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp index 3eb30d27d..fc168b53f 100644 --- a/src/resources/sprite/spritedef.cpp +++ b/src/resources/sprite/spritedef.cpp @@ -197,7 +197,7 @@ void SpriteDef::substituteActions() substituteAction(SpriteAction::DEADRIDE, SpriteAction::DEAD); } -void SpriteDef::loadSprite(const XmlNodePtr spriteNode, +void SpriteDef::loadSprite(XmlNodeConstPtr spriteNode, const int variant, const std::string &palettes) { @@ -230,7 +230,7 @@ void SpriteDef::loadSprite(const XmlNodePtr spriteNode, BLOCK_END("SpriteDef::loadSprite") } -void SpriteDef::loadImageSet(const XmlNodePtr node, +void SpriteDef::loadImageSet(XmlNodeConstPtr node, const std::string &palettes) { const std::string name = XML::getProperty(node, "name", ""); @@ -275,7 +275,7 @@ const ImageSet *SpriteDef::getImageSet(const std::string &imageSetName) const return si->second; } -void SpriteDef::loadAction(const XmlNodePtr node, +void SpriteDef::loadAction(XmlNodeConstPtr node, const int variant_offset) { if (!node) @@ -315,7 +315,7 @@ void SpriteDef::loadAction(const XmlNodePtr node, } } -void SpriteDef::loadAnimation(const XmlNodePtr animationNode, +void SpriteDef::loadAnimation(XmlNodeConstPtr animationNode, Action *const action, const ImageSet *const imageSet0, const int variant_offset) const @@ -471,7 +471,7 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode, } // for frameNode } -void SpriteDef::includeSprite(const XmlNodePtr includeNode, const int variant) +void SpriteDef::includeSprite(XmlNodeConstPtr includeNode, const int variant) { std::string filename = XML::getProperty(includeNode, "file", ""); @@ -493,7 +493,7 @@ void SpriteDef::includeSprite(const XmlNodePtr includeNode, const int variant) SkipError_false); if (!doc) return; - const XmlNodePtr rootNode = doc->rootNode(); + XmlNodeConstPtr rootNode = doc->rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "sprite")) { |