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/simpleanimation.cpp | |
parent | a913dd41df61760de6ece552f941e002251ff54c (diff) | |
parent | d340b5a27a8f3b05d1764da9c114f5f59bd0cd46 (diff) | |
download | plus-8b612abb42853a22c1a9545e2c9280d154646543.tar.gz plus-8b612abb42853a22c1a9545e2c9280d154646543.tar.bz2 plus-8b612abb42853a22c1a9545e2c9280d154646543.tar.xz plus-8b612abb42853a22c1a9545e2c9280d154646543.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/simpleanimation.cpp')
-rw-r--r-- | src/simpleanimation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp index 31f0c7af0..2b7cc328d 100644 --- a/src/simpleanimation.cpp +++ b/src/simpleanimation.cpp @@ -2,7 +2,7 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011 The ManaPlus Developers + * Copyright (C) 2011-2012 The ManaPlus Developers * * This file is part of The ManaPlus Client. * @@ -44,7 +44,7 @@ SimpleAnimation::SimpleAnimation(Animation *animation): { } -SimpleAnimation::SimpleAnimation(xmlNodePtr animationNode, +SimpleAnimation::SimpleAnimation(XmlNodePtr animationNode, const std::string& dyePalettes): mAnimation(new Animation), mAnimationTime(0), @@ -136,7 +136,7 @@ Image *SimpleAnimation::getCurrentImage() const return nullptr; } -void SimpleAnimation::initializeAnimation(xmlNodePtr animationNode, +void SimpleAnimation::initializeAnimation(XmlNodePtr animationNode, const std::string& dyePalettes) { mInitialized = false; @@ -161,7 +161,7 @@ void SimpleAnimation::initializeAnimation(xmlNodePtr animationNode, return; // Get animation frames - for (xmlNodePtr frameNode = animationNode->xmlChildrenNode; + for (XmlNodePtr frameNode = animationNode->xmlChildrenNode; frameNode; frameNode = frameNode->next) { int delay = XML::getProperty(frameNode, "delay", 0); @@ -171,7 +171,7 @@ void SimpleAnimation::initializeAnimation(xmlNodePtr animationNode, offsetY -= imageset->getHeight() - 32; offsetX -= imageset->getWidth() / 2 - 16; - if (xmlStrEqual(frameNode->name, BAD_CAST "frame")) + if (xmlNameEqual(frameNode, "frame")) { int index = XML::getProperty(frameNode, "index", -1); @@ -192,7 +192,7 @@ void SimpleAnimation::initializeAnimation(xmlNodePtr animationNode, if (mAnimation) mAnimation->addFrame(img, delay, offsetX, offsetY, rand); } - else if (xmlStrEqual(frameNode->name, BAD_CAST "sequence")) + else if (xmlNameEqual(frameNode, "sequence")) { int start = XML::getProperty(frameNode, "start", -1); int end = XML::getProperty(frameNode, "end", -1); @@ -218,7 +218,7 @@ void SimpleAnimation::initializeAnimation(xmlNodePtr animationNode, start++; } } - else if (xmlStrEqual(frameNode->name, BAD_CAST "end")) + else if (xmlNameEqual(frameNode, "end")) { if (mAnimation) mAnimation->addTerminator(rand); |