aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v5.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-23 12:08:36 +0000
committerMax Horn2003-05-23 12:08:36 +0000
commitf802c2a7ba65e5625d9946aa8c42dd40127c2fee (patch)
tree09e5d6a505205b842fa0402f679bb336ea5ed63f /scumm/script_v5.cpp
parentbdaefa6727c645db5e64d5b32db29321d2b0b010 (diff)
downloadscummvm-rg350-f802c2a7ba65e5625d9946aa8c42dd40127c2fee.tar.gz
scummvm-rg350-f802c2a7ba65e5625d9946aa8c42dd40127c2fee.tar.bz2
scummvm-rg350-f802c2a7ba65e5625d9946aa8c42dd40127c2fee.zip
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)
svn-id: r7857
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);