diff options
author | Travis Howell | 2004-02-22 16:08:13 +0000 |
---|---|---|
committer | Travis Howell | 2004-02-22 16:08:13 +0000 |
commit | 371cfa810f5ceaa7f05a1b0fd670dfa0f0ace5e1 (patch) | |
tree | fa8a73f237aa73d988ab9b661d01aeb485fbff6a | |
parent | 16b71220080a280751c8e9e532c89a623c6dd980 (diff) | |
download | scummvm-rg350-371cfa810f5ceaa7f05a1b0fd670dfa0f0ace5e1.tar.gz scummvm-rg350-371cfa810f5ceaa7f05a1b0fd670dfa0f0ace5e1.tar.bz2 scummvm-rg350-371cfa810f5ceaa7f05a1b0fd670dfa0f0ace5e1.zip |
This should fix zak lotto bug correctly.
svn-id: r12989
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 18 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 8 |
3 files changed, 17 insertions, 10 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 34ef531c36..504d35bd9c 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -289,6 +289,7 @@ protected: void o2_setState04(); void o2_setState08(); void o2_startScript(); + void o2_stopScript(); void o2_subtract(); void o2_subIndirect(); void o2_switchCostumeSet(); diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index f1cc18b4ab..839aa00875 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -158,7 +158,7 @@ void ScummEngine_v2::setupOpcodes() { /* 60 */ OPCODE(o2_cursorCommand), OPCODE(o2_putActor), - OPCODE(o5_stopScript), + OPCODE(o2_stopScript), OPCODE(o5_getActorFacing), /* 64 */ OPCODE(o2_loadRoomWithEgo), @@ -318,7 +318,7 @@ void ScummEngine_v2::setupOpcodes() { /* E0 */ OPCODE(o2_cursorCommand), OPCODE(o2_putActor), - OPCODE(o5_stopScript), + OPCODE(o2_stopScript), OPCODE(o5_getActorFacing), /* E4 */ OPCODE(o2_loadRoomWithEgo), @@ -1114,6 +1114,20 @@ void ScummEngine_v2::o2_startScript() { runScript(script, 0, 0, 0); } +void ScummEngine_v2::o2_stopScript() { + int script; + + script = getVarOrDirectByte(PARAM_1); + + if (script == 0) + script = vm.slot[_currentScript].number; + + if (_currentScript != 0) { + if (vm.slot[_currentScript].number == script) + stopScript(script); + } +} + void ScummEngine_v2::o2_panCameraTo() { panCameraTo(getVarOrDirectByte(PARAM_1) * 8, 0); } diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index c5debfa771..925593738c 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -2308,14 +2308,6 @@ void ScummEngine_v5::o5_stopScript() { script = getVarOrDirectByte(PARAM_1); - if ((_gameId == GID_ZAK) && (_roomResource == 7) && (vm.slot[_currentScript].number == 10001)) { - // FIXME: Nasty hack for bug #771499 - // Don't let the exit script for room 7 stop the buy script (24), - // switching to the number selection keypad (script 15) - if ((script == 24) && isScriptRunning(15)) - return; - } - if (!script) stopObjectCode(); else |