aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v5.cpp')
-rw-r--r--scumm/script_v5.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 04a4a96bd7..3f332e75e4 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -402,19 +402,23 @@ 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;
- 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 */
getVarOrDirectByte(0x80);