aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-06-26 14:38:48 +0000
committerMax Horn2003-06-26 14:38:48 +0000
commit2f11bb5dd7d88bee1cb683ab4f78ceac8c7a7a93 (patch)
tree759a46164620c46d260441daf84172238b087ac4 /scumm
parent0f293acf96dde86ed9594905118a9500825cb48f (diff)
downloadscummvm-rg350-2f11bb5dd7d88bee1cb683ab4f78ceac8c7a7a93.tar.gz
scummvm-rg350-2f11bb5dd7d88bee1cb683ab4f78ceac8c7a7a93.tar.bz2
scummvm-rg350-2f11bb5dd7d88bee1cb683ab4f78ceac8c7a7a93.zip
fix for 'default talk color' use of actorSet opcode (fix for bug #755888)
svn-id: r8655
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v5.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 147fc401b2..24fb2c86be 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -402,14 +402,18 @@ void Scumm_v5::o5_actorSet() {
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");