[Scummvm-cvs-logs] CVS: scummvm/scumm script_v5.cpp,1.99,1.100

Max Horn fingolfin at users.sourceforge.net
Fri May 23 05:09:05 CEST 2003


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

Modified Files:
	script_v5.cpp 
Log Message:
clarified / tightened the o5_actorSet hack for actor 0 (it seems to be there for the same reasons as in V2: only to set a default actor talk color)

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- script_v5.cpp	23 May 2003 01:33:43 -0000	1.99
+++ script_v5.cpp	23 May 2003 12:08:36 -0000	1.100
@@ -402,18 +402,22 @@
 	int i, j;
 
 	if (act == 0) {
+		// This case happens in Zak256 (and maybe elsewhere, to set the default talk color (9).
+		// For now, we hack this to modify actor 1 instead, but clearly that's bad.
+		// Better might be to modify _string[0].color, or even add a new dedicated
+		// 'default talk color' variable.
 		act = 1;
-		warning("o5_actorSet: act = 0, setting to 1 as a workaround");
+		ScriptSlot *ss = &vm.slot[_currentScript];
+		warning("o5_actorSet: act = 0, setting to 1 as a workaround (%d:%d:0x%X)", _roomResource,
+			ss->number, _scriptPointer - _scriptOrgPointer);
 	}
 
 	a = derefActorSafe(act, "actorSet");
+	assert(a);
 
 	while ((_opcode = fetchScriptByte()) != 0xFF) {
 		if (_features & GF_SMALL_HEADER)
 			_opcode = (_opcode & 0xE0) | convertTable[(_opcode & 0x1F) - 1];
-
-		if (!a)
-			return;
 
 		switch (_opcode & 0x1F) {
 		case 0:										/* dummy case */





More information about the Scummvm-git-logs mailing list