[Scummvm-cvs-logs] CVS: scummvm/sky logic.cpp,1.24,1.25

Oliver Kiehl olki at users.sourceforge.net
Fri May 23 07:28:07 CEST 2003


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

Modified Files:
	logic.cpp 
Log Message:
I must have been drunk when I coded this....


Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- logic.cpp	16 May 2003 15:33:17 -0000	1.24
+++ logic.cpp	23 May 2003 14:27:53 -0000	1.25
@@ -66,17 +66,17 @@
 }
 
 void SkyLogic::engine() {
-	Compact *compact2 = SkyState::fetchCompact(_scriptVariables[LOGIC_LIST_NO]);
+	uint16 *logicList = (uint16 *)SkyState::fetchCompact(_scriptVariables[LOGIC_LIST_NO]);
 
-	while (compact2->logic) { // 0 means end of list
-		if (compact2->logic == 0xffff) {
+	while (uint16 id = *logicList++) { // 0 means end of list
+		if (id == 0xffff) {
 			// Change logic data address
-			compact2 = SkyState::fetchCompact(compact2->status);
+			logicList = (uint16 *)SkyState::fetchCompact(id);
 			continue;
 		}
 
-		_scriptVariables[CUR_ID] = compact2->logic;
-		_compact = SkyState::fetchCompact(compact2->logic);
+		_scriptVariables[CUR_ID] = id;
+		_compact = SkyState::fetchCompact(id);
 
 		// check the id actually wishes to be processed
 		if (!(_compact->status & (1 << 6)))
@@ -1260,7 +1260,7 @@
 		uint16 width = ((dataFileHeader *)data)->s_width;
 		width >>= 1;
 
-		for (uint16 i = height; i > 0; i++) {
+		for (uint16 i = height; i > 0; i--) {
 			for (uint16 j = width; j > 0; j--) {
 				if (!*data) // only change 0's
 					*data = 1;





More information about the Scummvm-git-logs mailing list