diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/progressindicator.cpp | 2 | ||||
-rw-r--r-- | src/particle/particleemitter.cpp | 8 | ||||
-rw-r--r-- | src/resources/animation/animation.cpp | 8 | ||||
-rw-r--r-- | src/resources/animation/animation.h | 6 | ||||
-rw-r--r-- | src/resources/animation/simpleanimation.cpp | 2 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 2 | ||||
-rw-r--r-- | src/resources/sprite/spritedef.cpp | 2 |
7 files changed, 26 insertions, 4 deletions
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index 7c633e377..efe44c625 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -41,7 +41,7 @@ ProgressIndicator::ProgressIndicator(const Widget2 *const widget) : if (images) { - Animation *const anim = new Animation; + Animation *const anim = new Animation("progress indicator"); for (ImageSet::size_type i = 0, fsz = images->size(); i < fsz; ++i) diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index 44486e98e..fccbeeced 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -49,7 +49,15 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode, const std::string& dyePalettes) : mParticleTarget(target), mMap(map), + mOutput(), + mOutputPause(), mParticleImage(nullptr), + mParticleAnimation("particle animation"), + mParticleRotation("particle rotation"), + mParticleAlpha(), + mDeathEffect(), + mParticleChildEmitters(), + mTempSets(), mOutputPauseLeft(0), mDeathEffectConditions(0), mParticleFollow(false) diff --git a/src/resources/animation/animation.cpp b/src/resources/animation/animation.cpp index 5af1f7dbb..e505bc215 100644 --- a/src/resources/animation/animation.cpp +++ b/src/resources/animation/animation.cpp @@ -26,6 +26,14 @@ Animation::Animation() noexcept : mFrames(), + mName("animation"), + mDuration(0) +{ +} + +Animation::Animation(const std::string &name) noexcept : + mFrames(), + mName(name), mDuration(0) { } diff --git a/src/resources/animation/animation.h b/src/resources/animation/animation.h index 0c0b7c6e4..55668f324 100644 --- a/src/resources/animation/animation.h +++ b/src/resources/animation/animation.h @@ -45,6 +45,8 @@ class Animation final : public MemoryCounter public: Animation() noexcept; + explicit Animation(const std::string &name) noexcept; + /** * Appends a new animation at the end of the sequence. */ @@ -86,6 +88,9 @@ class Animation final : public MemoryCounter int calcMemoryLocal() const override final; + std::string getCounterName() const override + { return mName; } + /** * Determines whether the given animation frame is a terminator. */ @@ -93,6 +98,7 @@ class Animation final : public MemoryCounter protected: Frames mFrames; + std::string mName; int mDuration; }; diff --git a/src/resources/animation/simpleanimation.cpp b/src/resources/animation/simpleanimation.cpp index e4c0d8a3f..8f0bfba0b 100644 --- a/src/resources/animation/simpleanimation.cpp +++ b/src/resources/animation/simpleanimation.cpp @@ -49,7 +49,7 @@ SimpleAnimation::SimpleAnimation(Animation *const animation) : SimpleAnimation::SimpleAnimation(const XmlNodePtr animationNode, const std::string& dyePalettes) : - mAnimation(new Animation), + mAnimation(new Animation("simple animation")), mAnimationTime(0), mAnimationPhase(0), mCurrentFrame(nullptr), diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 5d29c64f4..8fda33a9b 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -1085,7 +1085,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, const int tileGID = firstGid + XML::getProperty( childNode, "id", 0); - Animation *ani = new Animation; + Animation *ani = new Animation("from map"); if (isProps) { diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp index a19c1b267..e0919b10b 100644 --- a/src/resources/sprite/spritedef.cpp +++ b/src/resources/sprite/spritedef.cpp @@ -316,7 +316,7 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode, return; } - Animation *const animation = new Animation; + Animation *const animation = new Animation(directionName); action->setAnimation(directionType, animation); // Get animation frames |