[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.460,1.461

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Mon Jan 23 11:09:06 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10903

Modified Files:
	script_v6.cpp 
Log Message:
Added workaround (the nicer one) for a CoMI script bug that would cause
ScummVM to hang on the PSP. See bug #1398195. (For now, I'm only doing this
on the trunk since CoMI on the PSP is considered unsupported/unbearable
with ScummVM 0.8.x.)


Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.460
retrieving revision 1.461
diff -u -d -r1.460 -r1.461
--- script_v6.cpp	18 Jan 2006 17:39:47 -0000	1.460
+++ script_v6.cpp	23 Jan 2006 19:08:47 -0000	1.461
@@ -2254,6 +2254,18 @@
 	int num = getStackList(list, ARRAYSIZE(list));
 
 	_sound->soundKludge(list, num);
+
+	// WORKAROUND for bug #1398195: The room-11-2016 script contains a
+	// slight bug causing it to busy-wait for a sound to finish. Even under
+	// the best of circumstances, this will cause the game to hang briefly.
+	// On platforms where threading is cooperative, it will cause the game
+	// to hang indefinitely. We identify the buggy part of the script by
+	// looking for a soundKludge() opcode immediately followed by a jump.
+
+	if (_gameId == GID_CMI && _roomResource == 11 && vm.slot[_currentScript].number == 2016 && *_scriptPointer == 0x66) {
+		debug(3, "Working around script bug in room-11-2016");
+		o6_breakHere();
+	}
 }
 
 void ScummEngine_v6::o6_isAnyOf() {





More information about the Scummvm-git-logs mailing list