summaryrefslogtreecommitdiff
path: root/src/resources/monsterdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-10 21:06:33 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-10 21:06:33 +0300
commit5edddb1313ed0dc275e6ae70b8a1780ded3a590d (patch)
treefffa478013e8f3622c4e7f85eeb71609cb352322 /src/resources/monsterdb.cpp
parenta057817a0983b3a3190f6773101f788f2c6278ba (diff)
downloadmv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.tar.gz
mv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.tar.bz2
mv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.tar.xz
mv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.zip
Replace xmlStrEqual to xmlNameEqual.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r--src/resources/monsterdb.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index e6901fa2f..9d295db35 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -54,7 +54,7 @@ void MonsterDB::load()
XML::Document doc("monsters.xml");
XmlNodePtr rootNode = doc.rootNode();
- if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "monsters"))
+ if (!rootNode || !xmlNameEqual(rootNode, "monsters"))
{
logger->log("Monster Database: Error while loading monster.xml!");
mLoaded = true;
@@ -71,7 +71,7 @@ void MonsterDB::load()
//iterate <monster>s
for_each_xml_child_node(monsterNode, rootNode)
{
- if (!xmlStrEqual(monsterNode->name, BAD_CAST "monster"))
+ if (!xmlNameEqual(monsterNode, "monster"))
continue;
BeingInfo *currentInfo = new BeingInfo;
@@ -119,7 +119,7 @@ void MonsterDB::load()
if (!spriteNode->xmlChildrenNode)
continue;
- if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite"))
+ if (xmlNameEqual(spriteNode, "sprite"))
{
SpriteReference *currentSprite = new SpriteReference;
currentSprite->sprite = reinterpret_cast<const char*>(
@@ -129,7 +129,7 @@ void MonsterDB::load()
spriteNode, "variant", 0);
display.sprites.push_back(currentSprite);
}
- else if (xmlStrEqual(spriteNode->name, BAD_CAST "sound"))
+ else if (xmlNameEqual(spriteNode, "sound"))
{
std::string event = XML::getProperty(spriteNode, "event", "");
const char *filename;
@@ -172,7 +172,7 @@ void MonsterDB::load()
currentInfo->getName().c_str());
}
}
- else if (xmlStrEqual(spriteNode->name, BAD_CAST "attack"))
+ else if (xmlNameEqual(spriteNode, "attack"))
{
const int id = XML::getProperty(spriteNode, "id", 0);
const std::string particleEffect = XML::getProperty(
@@ -185,7 +185,7 @@ void MonsterDB::load()
currentInfo->addAttack(id, spriteAction,
particleEffect, missileParticle);
}
- else if (xmlStrEqual(spriteNode->name, BAD_CAST "particlefx"))
+ else if (xmlNameEqual(spriteNode, "particlefx"))
{
display.particles.push_back(reinterpret_cast<const char*>(
spriteNode->xmlChildrenNode->content));