diff options
author | Oliver Kiehl | 2003-05-29 15:40:46 +0000 |
---|---|---|
committer | Oliver Kiehl | 2003-05-29 15:40:46 +0000 |
commit | ae73d6d7bf7f1b981c77e00a5852cec5fcbfaeeb (patch) | |
tree | 4cd0bdb432d740403b5ac99343c706fd4270879c | |
parent | 36f6b0e20fba97d6e1bf6ca4d78aafcb7c8977d6 (diff) | |
download | scummvm-rg350-ae73d6d7bf7f1b981c77e00a5852cec5fcbfaeeb.tar.gz scummvm-rg350-ae73d6d7bf7f1b981c77e00a5852cec5fcbfaeeb.tar.bz2 scummvm-rg350-ae73d6d7bf7f1b981c77e00a5852cec5fcbfaeeb.zip |
some minor cleanup
svn-id: r8104
-rw-r--r-- | sky/logic.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp index dd9ef4f6cb..fbd0bf99db 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -191,8 +191,7 @@ void SkyLogic::arAnim() { uint16 *logicList = (uint16 *)SkyState::fetchCompact(_scriptVariables[LOGIC_LIST_NO]); Compact *cpt = 0; - uint16 id; - while ((id = *logicList++) != 0) { // get an id + while (uint16 id = *logicList++) { // get an id if (id == 0xffff) { // address change? logicList = (uint16 *)SkyState::fetchCompact(*logicList); // get new logic list @@ -297,7 +296,7 @@ void SkyLogic::mainAnim() { _compact->extCompact->arAnimIndex = 0; // reset position } - uint16 dir = 0; + uint16 dir; while ((dir = _compact->extCompact->dir) != *(sequence + 1)) { // ok, setup turning _compact->extCompact->dir = *(sequence + 1); @@ -311,21 +310,21 @@ void SkyLogic::mainAnim() { } }; - uint16 **animList = (uint16 **)SkyCompact::getCompactElem(_compact, + uint16 *animList = *(uint16 **)SkyCompact::getCompactElem(_compact, C_ANIM_UP + _compact->extCompact->megaSet + dir * 4); uint16 arAnimIndex = _compact->extCompact->arAnimIndex; - if (!(*animList)[arAnimIndex/2]) { + if (!animList[arAnimIndex/2]) { arAnimIndex = 0; _compact->extCompact->arAnimIndex = 0; // reset } _compact->extCompact->arAnimIndex += S_LENGTH; - *sequence -= (*animList)[(S_COUNT + arAnimIndex)/2]; // reduce the distance to travel - _compact->frame = (*animList)[(S_FRAME + arAnimIndex)/2]; // new graphic frame - _compact->xcood += (*animList)[(S_AR_X + arAnimIndex)/2]; // update x coordinate - _compact->ycood += (*animList)[(S_AR_Y + arAnimIndex)/2]; // update y coordinate + *sequence -= animList[(S_COUNT + arAnimIndex)/2]; // reduce the distance to travel + _compact->frame = animList[(S_FRAME + arAnimIndex)/2]; // new graphic frame + _compact->xcood += animList[(S_AR_X + arAnimIndex)/2]; // update x coordinate + _compact->ycood += animList[(S_AR_Y + arAnimIndex)/2]; // update y coordinate } void SkyLogic::arTurn() { |