diff options
author | Reid <reidyaro@gmail.com> | 2012-01-25 22:05:36 +0100 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2012-01-25 22:05:36 +0100 |
commit | 8b612abb42853a22c1a9545e2c9280d154646543 (patch) | |
tree | f466167087c2b2de4b8aa9e6d1d1986f72f84147 /src/resources/emotedb.cpp | |
parent | a913dd41df61760de6ece552f941e002251ff54c (diff) | |
parent | d340b5a27a8f3b05d1764da9c114f5f59bd0cd46 (diff) | |
download | manaplus-8b612abb42853a22c1a9545e2c9280d154646543.tar.gz manaplus-8b612abb42853a22c1a9545e2c9280d154646543.tar.bz2 manaplus-8b612abb42853a22c1a9545e2c9280d154646543.tar.xz manaplus-8b612abb42853a22c1a9545e2c9280d154646543.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/resources/emotedb.cpp')
-rw-r--r-- | src/resources/emotedb.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp index c456c49e4..c6126a57b 100644 --- a/src/resources/emotedb.cpp +++ b/src/resources/emotedb.cpp @@ -52,9 +52,9 @@ void EmoteDB::load() logger->log1("Initializing emote database..."); XML::Document doc("emotes.xml"); - xmlNodePtr rootNode = doc.rootNode(); + XmlNodePtr rootNode = doc.rootNode(); - if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "emotes")) + if (!rootNode || !xmlNameEqual(rootNode, "emotes")) { logger->log1("Emote Database: Error while loading emotes.xml!"); return; @@ -63,7 +63,7 @@ void EmoteDB::load() //iterate <emote>s for_each_xml_child_node(emoteNode, rootNode) { - if (!xmlStrEqual(emoteNode->name, BAD_CAST "emote")) + if (!xmlNameEqual(emoteNode, "emote")) continue; int id = XML::getProperty(emoteNode, "id", -1); @@ -81,7 +81,7 @@ void EmoteDB::load() if (!spriteNode->xmlChildrenNode) continue; - if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) + if (xmlNameEqual(spriteNode, "sprite")) { EmoteSprite *currentSprite = new EmoteSprite; std::string file = paths.getStringValue("sprites") @@ -92,7 +92,7 @@ void EmoteDB::load() currentSprite->name = XML::getProperty(spriteNode, "name", ""); currentInfo->sprites.push_back(currentSprite); } - else if (xmlStrEqual(spriteNode->name, BAD_CAST "particlefx")) + else if (xmlNameEqual(spriteNode, "particlefx")) { std::string particlefx = reinterpret_cast<const char*>( spriteNode->xmlChildrenNode->content); @@ -108,7 +108,7 @@ void EmoteDB::load() XML::Document doc2("graphics/sprites/manaplus_emotes.xml"); rootNode = doc2.rootNode(); - if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "emotes")) + if (!rootNode || !xmlNameEqual(rootNode, "emotes")) { logger->log1("Emote Database: Error while loading" " manaplus_emotes.xml!"); @@ -118,7 +118,7 @@ void EmoteDB::load() //iterate <emote>s for_each_xml_child_node(emoteNode, rootNode) { - if (!xmlStrEqual(emoteNode->name, BAD_CAST "emote")) + if (!xmlNameEqual(emoteNode, "emote")) continue; int id = XML::getProperty(emoteNode, "id", -1); @@ -136,7 +136,7 @@ void EmoteDB::load() if (!spriteNode->xmlChildrenNode) continue; - if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) + if (xmlNameEqual(spriteNode, "sprite")) { EmoteSprite *currentSprite = new EmoteSprite; std::string file = paths.getStringValue("sprites") @@ -147,7 +147,7 @@ void EmoteDB::load() currentSprite->name = XML::getProperty(spriteNode, "name", ""); currentInfo->sprites.push_back(currentSprite); } - else if (xmlStrEqual(spriteNode->name, BAD_CAST "particlefx")) + else if (xmlNameEqual(spriteNode, "particlefx")) { std::string particlefx = reinterpret_cast<const char*>( spriteNode->xmlChildrenNode->content); |