[Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.56,1.57

Max Horn fingolfin at users.sourceforge.net
Tue Dec 24 06:07:02 CET 2002


Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv15821

Modified Files:
	descumm6.cpp 
Log Message:
fixed setActorAnimVar; allow 'while' to be turned off (there is still a bug in the 'while' code which can sometimes break 'else-if' detection it seems)

Index: descumm6.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm6.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- descumm6.cpp	24 Dec 2002 13:50:47 -0000	1.56
+++ descumm6.cpp	24 Dec 2002 14:06:03 -0000	1.57
@@ -153,6 +153,7 @@
 byte dontOutputIfs = 0;
 byte dontOutputElse = 0;
 byte dontOutputElseif = 0;
+byte dontOutputWhile = 0;
 byte dontShowOpcode = 0;
 byte dontShowOffsets = 0;
 byte haltOnError;
@@ -1251,7 +1252,7 @@
 		pendingElseOpcode = g_jump_opcode;
 		pendingElseIndent = num_block_stack;
 	} else {
-		if (num_block_stack) {
+		if (num_block_stack && !dontOutputWhile) {
 			BlockStack *p = &block_stack[num_block_stack - 1];
 			if (p->isWhile && cur == p->to)
 				return;		// A 'while' ends here.
@@ -1281,7 +1282,7 @@
 	}
 
 	if (!dontOutputIfs && maybeAddIf(cur, to)) {
-		if (block_stack[num_block_stack - 1].isWhile) {
+		if (!dontOutputWhile && block_stack[num_block_stack - 1].isWhile) {
 			e = strecpy(e, "while (");
 		} else
 			e = strecpy(e, "if (");
@@ -1627,7 +1628,7 @@
 				"\x78p|actorSpecialDraw,"
 				"\x79pp|setActorTalkPos,"
 				"\x7Ap|initActor,"			// = setCurActor ? 
-				"\x7Bp|setActorAnimVar,"
+				"\x7Bpp|setActorAnimVar,"
 				"\x7C|setActorIgnoreTurnsOn,"
 				"\x7D|setActorIgnoreTurnsOff,"
 				"\x7E|newActor,"
@@ -2535,6 +2536,9 @@
 					break;
 				case 'f':
 					dontOutputElseif = 1;
+					break;
+				case 'w':
+					dontOutputWhile = 1;
 					break;
 				case 'c':
 					dontShowOpcode = 1;





More information about the Scummvm-git-logs mailing list