[Scummvm-cvs-logs] CVS: scummvm/sky logic.cpp,1.55,1.56

Oliver Kiehl olki at users.sourceforge.net
Thu May 29 08:41:12 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv18848

Modified Files:
	logic.cpp 
Log Message:
some minor cleanup


Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- logic.cpp	29 May 2003 15:02:36 -0000	1.55
+++ logic.cpp	29 May 2003 15:40:46 -0000	1.56
@@ -191,8 +191,7 @@
 	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 @@
 		_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 @@
 		}
 	};
 
-	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() {





More information about the Scummvm-git-logs mailing list