diff options
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v6he.cpp | 1 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 28 |
3 files changed, 26 insertions, 4 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 519f5e2e81..1829539068 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -636,6 +636,7 @@ protected: void o7_pickupObject(); void o7_arrayOps(); void o7_dimArray(); + void o7_jumpToScript(); void o7_startScript(); void o7_startSound(); void o7_cursorCommand(); diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index 718d47b1a9..5e9edb0ca3 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -1265,6 +1265,7 @@ void ScummEngine_v6he::decodeParseString(int m, int n) { _string[m].no_talk_anim = true; break; case 75: // SO_TEXTSTRING + case 194: // HE 7.2 switch (m) { case 0: actorTalk(_scriptPointer); diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index dc75e6330c..d9a50c223b 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -318,7 +318,7 @@ void ScummEngine_v7he::setupOpcodes() { OPCODE(o6_invalid), /* D4 */ OPCODE(o6_shuffle), - OPCODE(o6_jumpToScript), + OPCODE(o7_jumpToScript), OPCODE(o6_band), OPCODE(o6_bor), /* D8 */ @@ -496,15 +496,20 @@ void ScummEngine_v7he::o7_readINI() { int retval; // we pretend that we don't have .ini file - len = resStrLen(_scriptPointer); - _scriptPointer += len + 1; - type = pop(); + if (_heversion <= 71) { + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + } + + type = fetchScriptByte(); switch (type) { case 1: // number + case 6: // HE 7.2 push(0); break; case 2: // string + case 7: // HE 7.2 defineArray(0, kStringArray, 0, 0); retval = readVar(0); writeArray(0, 0, 0, 0); @@ -751,6 +756,21 @@ void ScummEngine_v7he::o7_arrayOps() { } } +void ScummEngine_v7he::o7_jumpToScript() { + if (_heversion <= 71) { + ScummEngine_v6::o6_jumpToScript(); + return; + } + int args[16]; + int script, flags; + + getStackList(args, ARRAYSIZE(args)); + script = pop(); + flags = fetchScriptByte(); + stopObjectCode(); + runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args); +} + void ScummEngine_v7he::o7_startScript() { if (_heversion <= 71) { ScummEngine_v6::o6_startScript(); |