[Scummvm-cvs-logs] CVS: scummvm/scumm script_v5.cpp,1.126,1.127

Max Horn fingolfin at users.sourceforge.net
Thu Jun 26 07:39:22 CEST 2003


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

Modified Files:
	script_v5.cpp 
Log Message:
fix for 'default talk color' use of actorSet opcode (fix for bug #755888)

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- script_v5.cpp	24 Jun 2003 17:31:35 -0000	1.126
+++ script_v5.cpp	26 Jun 2003 14:38:48 -0000	1.127
@@ -402,14 +402,18 @@
 	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;
-		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);
+		// This case happens in Zak256 (and maybe elsewhere), to set the
+		// default talk color (9).
+		while ((_opcode = fetchScriptByte()) != 0xFF) {
+			if (_features & GF_SMALL_HEADER)
+				_opcode = (_opcode & 0xE0) | convertTable[(_opcode & 0x1F) - 1];
+				
+			if (_opcode== 12)
+				_string[0].color = getVarOrDirectByte(0x80);
+			else
+				error("o5_actorSet: Invalid sub opcode %d in actor 0 case", _opcode);
+		}
+		return;
 	}
 
 	a = derefActor(act, "o5_actorSet");





More information about the Scummvm-git-logs mailing list