diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-30 13:59:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-20 21:58:39 +0300 |
commit | bc3a7cf853510ffe1e42dc683f854d360f6528c7 (patch) | |
tree | 9898f13eafc3e1a20388d8d592bfcc05c8f50ba7 /src/particle/particle.cpp | |
parent | a058af57bddd4a4394401cc75d33461e17aab8c1 (diff) | |
download | manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.gz manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.bz2 manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.xz manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.zip |
Add pugixml backend incomplete.
Add some defines for xml nodes manipulation.
With pugixml backend no xml writing.
Diffstat (limited to 'src/particle/particle.cpp')
-rw-r--r-- | src/particle/particle.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 2555cfb23..f22f11252 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -338,11 +338,8 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile, else if ((node = XML::findFirstChildByName(effectChildNode, "image"))) { std::string imageSrc; - if (node && node->xmlChildrenNode) - { - imageSrc = reinterpret_cast<const char*>( - node->xmlChildrenNode->content); - } + if (node && XmlHaveChildContent(node)) + imageSrc = XmlChildContent(node); if (!imageSrc.empty() && !dyePalettes.empty()) Dye::instantiate(imageSrc, dyePalettes); Image *const img = resourceManager->getImage(imageSrc); @@ -393,11 +390,8 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile, else if (xmlNameEqual(emitterNode, "deatheffect")) { std::string deathEffect; - if (node && node->xmlChildrenNode) - { - deathEffect = reinterpret_cast<const char*>( - emitterNode->xmlChildrenNode->content); - } + if (node && XmlHaveChildContent(node)) + deathEffect = XmlChildContent(emitterNode); char deathEffectConditions = 0x00; if (XML::getBoolProperty(emitterNode, "on-floor", true)) |