[Scummvm-cvs-logs] CVS: scummvm/scumm script_v1.cpp,1.29,1.30

Max Horn fingolfin at users.sourceforge.net
Tue Nov 26 04:31:07 CET 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv32681

Modified Files:
	script_v1.cpp 
Log Message:
possible fix for bug #642894; cleanup/additional debug output

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v1.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- script_v1.cpp	23 Nov 2002 20:58:46 -0000	1.29
+++ script_v1.cpp	26 Nov 2002 12:30:47 -0000	1.30
@@ -1285,9 +1285,10 @@
 
 	room = getVarOrDirectByte(0x80);
 	
-	// FIXME - the following 'if' is needed for Zak256 and MonkeyVGA, but might
-	// cause regression in other games.
-	if (room != _currentRoom)
+	// For small header games, we only call startScene if the room
+	// actually changed. This avoid unwanted (wrong) fades in Zak256
+	// and others. OTOH, it seems to cause a problem in newer games.
+	if (!(_features & GF_SMALL_HEADER) || room != _currentRoom)
 		startScene(room, 0, 0);
 	_fullRedraw = 1;
 }
@@ -1589,27 +1590,27 @@
 
 	case 0x1F + 1:
 		// TODO
-		warning("o5_resourceRoutines %d not yet handled", _opcode);
+		warning("o5_resourceRoutines %d not yet handled (script %d)", _opcode,  vm.slot[_currentScript].number);
 		break;
 	case 0x20 + 1:
 		// TODO
-		warning("o5_resourceRoutines %d not yet handled", _opcode);
+		warning("o5_resourceRoutines %d not yet handled (script %d)", _opcode,  vm.slot[_currentScript].number);
 		break;
 	case 0x22 + 1:
 		// TODO
 		foo = getVarOrDirectByte(0x40);
-		warning("o5_resourceRoutines %d not yet handled", _opcode);
+		warning("o5_resourceRoutines %d not yet handled (script %d)", _opcode,  vm.slot[_currentScript].number);
 		break;
 	case 0x23 + 1:
 		// TODO
 		foo = getVarOrDirectByte(0x40);
 		bar = fetchScriptByte();
-		warning("o5_resourceRoutines %d not yet handled", _opcode);
+		warning("o5_resourceRoutines %d not yet handled (script %d)", _opcode,  vm.slot[_currentScript].number);
 		break;
 	case 0x24 + 1:
 		// TODO
 		foo = getVarOrDirectByte(0x40);
-		warning("o5_resourceRoutines %d not yet handled", _opcode);
+		warning("o5_resourceRoutines %d not yet handled (script %d)", _opcode,  vm.slot[_currentScript].number);
 		break;
 
 	default:
@@ -1881,7 +1882,7 @@
 	int a;
 	int i = 0;
 	byte *name = NULL;
-	unsigned char work[255];
+	unsigned char work[256];
 	
 	// Read in new name
 	while ((a = fetchScriptByte()) != 0) {
@@ -2089,14 +2090,13 @@
 	case 3:											/* set string char */
 		a = getVarOrDirectByte(0x80);
 		b = getVarOrDirectByte(0x40);
+		c = getVarOrDirectByte(0x20);
 		ptr = getResourceAddress(rtString, a);
-		if (!(_gameId == GID_LOOM256)) {	/* FIXME - LOOM256 */
+		if (_gameId != GID_LOOM256) {	/* FIXME - LOOM256 */
 			if (ptr == NULL)
 				error("String %d does not exist", a);
-			c = getVarOrDirectByte(0x20);
 			ptr[b] = c;
-		} else
-			getVarOrDirectByte(0x20);
+		}
 
 		break;
 





More information about the Scummvm-git-logs mailing list