From 29549cf31a03e2ac7290afaa7442b3b9519d4e7c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Oct 2016 03:33:13 +0300 Subject: Move FrameType enum into enums directory. --- src/resources/animation/animation.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/resources/animation/animation.cpp') diff --git a/src/resources/animation/animation.cpp b/src/resources/animation/animation.cpp index 22ca96fd7..1a10f5224 100644 --- a/src/resources/animation/animation.cpp +++ b/src/resources/animation/animation.cpp @@ -45,7 +45,7 @@ void Animation::addFrame(Image *const image, const int delay, const int rand) noexcept2 { Frame frame - = { image, delay, offsetX, offsetY, rand, Frame::ANIMATION, "" }; + = { image, delay, offsetX, offsetY, rand, FrameType::ANIMATION, "" }; mFrames.push_back(frame); mDuration += delay; } @@ -57,30 +57,30 @@ void Animation::addTerminator(const int rand) noexcept2 bool Animation::isTerminator(const Frame &candidate) noexcept2 { - return (!candidate.image && candidate.type == Frame::ANIMATION); + return (!candidate.image && candidate.type == FrameType::ANIMATION); } void Animation::addJump(const std::string &name, const int rand) noexcept2 { - Frame frame = { nullptr, 0, 0, 0, rand, Frame::JUMP, name }; + Frame frame = { nullptr, 0, 0, 0, rand, FrameType::JUMP, name }; mFrames.push_back(frame); } void Animation::addLabel(const std::string &name) noexcept2 { - Frame frame = { nullptr, 0, 0, 0, 100, Frame::LABEL, name }; + Frame frame = { nullptr, 0, 0, 0, 100, FrameType::LABEL, name }; mFrames.push_back(frame); } void Animation::addGoto(const std::string &name, const int rand) noexcept2 { - Frame frame = { nullptr, 0, 0, 0, rand, Frame::GOTO, name }; + Frame frame = { nullptr, 0, 0, 0, rand, FrameType::GOTO, name }; mFrames.push_back(frame); } void Animation::addPause(const int delay, const int rand) noexcept2 { - Frame frame = { nullptr, delay, 0, 0, rand, Frame::PAUSE, "" }; + Frame frame = { nullptr, delay, 0, 0, rand, FrameType::PAUSE, "" }; mFrames.push_back(frame); } @@ -89,7 +89,7 @@ void Animation::setLastFrameDelay(const int delay) noexcept2 for (FramesRevIter it = mFrames.rbegin(), it_end = mFrames.rend(); it != it_end; ++ it) { - if ((*it).type == Frame::ANIMATION && (*it).image) + if ((*it).type == FrameType::ANIMATION && (*it).image) { (*it).delay = delay; break; -- cgit v1.2.3-60-g2f50