aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v0.cpp
diff options
context:
space:
mode:
authorTobias Gunkel2012-01-29 17:11:54 +0100
committerTobias Gunkel2012-02-11 08:29:52 +0100
commit984c2a05e4e4ec643c1135c6b087f6e7faf1997f (patch)
tree64a11454410530323743d86cae3ae7e5ba1bba54 /engines/scumm/script_v0.cpp
parentd4ddd2ca840fc91cd75cdb4545db30f2f0a78722 (diff)
downloadscummvm-rg350-984c2a05e4e4ec643c1135c6b087f6e7faf1997f.tar.gz
scummvm-rg350-984c2a05e4e4ec643c1135c6b087f6e7faf1997f.tar.bz2
scummvm-rg350-984c2a05e4e4ec643c1135c6b087f6e7faf1997f.zip
SCUMM: replace o_beginOverride() with o2_beginOverride()
In contrast to the comment in o_beginOverride() VAR(VAR_OVERRIDE) is not set in the disassembly. In addition the cutscene stack-pointer is always 0 as this feature is not used in v0. This makes o_beginOverride() work the same way o2_beginOverride() and so it is not needed anymore. Note that fetchScriptWord() was changed to ScummEngine::fetchScriptWord() in o2_beginOverride() as ScummEngine_v0::fetchScriptWord() only fetches a byte. As we need two bytes here we have to use ScummEngine::fetchScriptWord().
Diffstat (limited to 'engines/scumm/script_v0.cpp')
-rw-r--r--engines/scumm/script_v0.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index 46052cdf49..a7187237f3 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -145,7 +145,7 @@ void ScummEngine_v0::setupOpcodes() {
OPCODE(0x56, o_getActorMoving);
OPCODE(0x57, o2_clearState08);
/* 58 */
- OPCODE(0x58, o_beginOverride);
+ OPCODE(0x58, o2_beginOverride);
OPCODE(0x59, o_stopCurrentScript);
OPCODE(0x5a, o2_add);
OPCODE(0x5b, o_getActorBitVar);
@@ -952,23 +952,6 @@ void ScummEngine_v0::o_endCutscene() {
}
}
-void ScummEngine_v0::o_beginOverride() {
- const int idx = vm.cutSceneStackPointer;
- assert(0 <= idx && idx < 5);
-
- vm.cutScenePtr[idx] = _scriptPointer - _scriptOrgPointer;
- vm.cutSceneScript[idx] = _currentScript;
-
- // Skip the jump instruction following the override instruction
- // (the jump is responsible for "skipping" cutscenes, and the reason
- // why we record the current script position in vm.cutScenePtr).
- fetchScriptByte();
- ScummEngine::fetchScriptWord();
-
- // This is based on disassembly
- VAR(VAR_OVERRIDE) = 0;
-}
-
void ScummEngine_v0::o_setOwnerOf() {
int obj, owner;