[Scummvm-cvs-logs] SF.net SVN: scummvm:[35114] scummvm/trunk/engines/saga/animation.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Nov 18 18:37:01 CET 2008


Revision: 35114
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35114&view=rev
Author:   thebluegr
Date:     2008-11-18 17:37:01 +0000 (Tue, 18 Nov 2008)

Log Message:
-----------
Cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/saga/animation.cpp

Modified: scummvm/trunk/engines/saga/animation.cpp
===================================================================
--- scummvm/trunk/engines/saga/animation.cpp	2008-11-18 17:03:55 UTC (rev 35113)
+++ scummvm/trunk/engines/saga/animation.cpp	2008-11-18 17:37:01 UTC (rev 35114)
@@ -462,11 +462,7 @@
 }
 
 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::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::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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list