diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-10-04 03:33:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-10-04 03:33:13 +0300 |
commit | 29549cf31a03e2ac7290afaa7442b3b9519d4e7c (patch) | |
tree | cb01d06c5d2349ca5c6e843f07e251f3a85ae50b /src/resources/sprite/animatedsprite.cpp | |
parent | 2ec30fd9bac60bb7e4752e3bba0036c078019d0a (diff) | |
download | manaverse-29549cf31a03e2ac7290afaa7442b3b9519d4e7c.tar.gz manaverse-29549cf31a03e2ac7290afaa7442b3b9519d4e7c.tar.bz2 manaverse-29549cf31a03e2ac7290afaa7442b3b9519d4e7c.tar.xz manaverse-29549cf31a03e2ac7290afaa7442b3b9519d4e7c.zip |
Move FrameType enum into enums directory.
Diffstat (limited to 'src/resources/sprite/animatedsprite.cpp')
-rw-r--r-- | src/resources/sprite/animatedsprite.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp index 60a2d7f9d..546c3a415 100644 --- a/src/resources/sprite/animatedsprite.cpp +++ b/src/resources/sprite/animatedsprite.cpp @@ -215,7 +215,7 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2 { // move code from Animation::isTerminator(*mFrame) if (!mFrame || !mAnimation || (!mFrame->image - && mFrame->type == Frame::ANIMATION)) + && mFrame->type == FrameType::ANIMATION)) { return false; } @@ -224,8 +224,8 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2 while ((mFrameTime > CAST_U32(mFrame->delay) && mFrame->delay > 0) || - (mFrame->type != Frame::ANIMATION && - mFrame->type != Frame::PAUSE)) + (mFrame->type != FrameType::ANIMATION && + mFrame->type != FrameType::PAUSE)) { bool fail(true); mFrameTime -= CAST_U32(mFrame->delay); @@ -239,12 +239,12 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2 { fail = true; } - else if ((mFrame->type == Frame::LABEL + else if ((mFrame->type == FrameType::LABEL && !mFrame->nextAction.empty())) { fail = false; } - else if (mFrame->type == Frame::GOTO && + else if (mFrame->type == FrameType::GOTO && !mFrame->nextAction.empty()) { const int rand = mFrame->rand; @@ -255,7 +255,7 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2 { const Frame *restrict const frame = &mAnimation->mFrames[i]; - if (frame->type == Frame::LABEL && + if (frame->type == FrameType::LABEL && mFrame->nextAction == frame->nextAction) { mFrameIndex = CAST_U32(i); @@ -277,7 +277,7 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2 fail = false; } } - else if (mFrame->type == Frame::JUMP && + else if (mFrame->type == FrameType::JUMP && !mFrame->nextAction.empty()) { const int rand = mFrame->rand; @@ -290,7 +290,7 @@ bool AnimatedSprite::updateCurrentAnimation(const unsigned int time) restrict2 } // copy code from Animation::isTerminator(*mFrame) else if (!mFrame->image && - mFrame->type == Frame::ANIMATION) + mFrame->type == FrameType::ANIMATION) { const int rand = mFrame->rand; if (rand == 100 || |