diff options
author | Filippos Karapetis | 2008-11-18 17:37:01 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-11-18 17:37:01 +0000 |
commit | df694b3de1c68ca52f671f58c5e7b7141e3de340 (patch) | |
tree | 6732e218386363a9f98859ccf5566ae67607ab8c | |
parent | d99ab163ccef6b0723c75a9c345075521e8043c4 (diff) | |
download | scummvm-rg350-df694b3de1c68ca52f671f58c5e7b7141e3de340.tar.gz scummvm-rg350-df694b3de1c68ca52f671f58c5e7b7141e3de340.tar.bz2 scummvm-rg350-df694b3de1c68ca52f671f58c5e7b7141e3de340.zip |
Cleanup
svn-id: r35114
-rw-r--r-- | engines/saga/animation.cpp | 60 |
1 files changed, 10 insertions, 50 deletions
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 493c05022c..9d66162aa6 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -462,11 +462,7 @@ void Anim::link(int16 animId1, int16 animId2) { } void Anim::setCycles(uint16 animId, int cycles) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->cycles = cycles; + getAnimation(animId)->cycles = cycles; } int Anim::getCycles(uint16 animId) { @@ -606,27 +602,15 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) { } void Anim::stop(uint16 animId) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->state = ANIM_PAUSE; + getAnimation(animId)->state = ANIM_PAUSE; } void Anim::finish(uint16 animId) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->state = ANIM_STOPPING; + getAnimation(animId)->state = ANIM_STOPPING; } void Anim::resume(uint16 animId, int cycles) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->cycles += cycles; + getAnimation(animId)->cycles += cycles; play(animId, 0, true); } @@ -649,51 +633,27 @@ void Anim::reset() { } void Anim::setFlag(uint16 animId, uint16 flag) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->flags |= flag; + getAnimation(animId)->flags |= flag; } void Anim::clearFlag(uint16 animId, uint16 flag) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->flags &= ~flag; + getAnimation(animId)->flags &= ~flag; } void Anim::setFrameTime(uint16 animId, int time) { - AnimationData *anim; - - anim = getAnimation(animId); - - anim->frameTime = time; + getAnimation(animId)->frameTime = time; } int Anim::getFrameTime(uint16 animId) { - AnimationData *anim; - - anim = getAnimation(animId); - - return anim->frameTime; + return getAnimation(animId)->frameTime; } bool Anim::isPlaying(uint16 animId) { - AnimationData *anim; - - anim = getAnimation(animId); - - return (anim->state == ANIM_PLAYING); + return (getAnimation(animId)->state == ANIM_PLAYING); } int16 Anim::getCurrentFrame(uint16 animId) { - AnimationData *anim; - - anim = getAnimation(animId); - - return anim->currentFrame; + return getAnimation(animId)->currentFrame; } void Anim::decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_t bufLength) { |