diff options
-rw-r--r-- | engines/scumm/script.cpp | 19 | ||||
-rw-r--r-- | engines/scumm/script_v5.cpp | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 29f0c025d2..223e9822e2 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -708,25 +708,6 @@ void ScummEngine::writeVar(uint var, int value) { error("Illegal varbits (w)"); } -void ScummEngine_v5::getResultPos() { - int a; - - _resultVarNumber = fetchScriptWord(); - if (_resultVarNumber & 0x2000) { - a = fetchScriptWord(); - if (a & 0x2000) { - _resultVarNumber += readVar(a & ~0x2000); - } else { - _resultVarNumber += a & 0xFFF; - } - _resultVarNumber &= ~0x2000; - } -} - -void ScummEngine_v5::setResult(int value) { - writeVar(_resultVarNumber, value); -} - void ScummEngine::push(int a) { assert(_scummStackPos >= 0 && _scummStackPos < ARRAYSIZE(_vmStack)); _vmStack[_scummStackPos++] = a; diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 5c20e0dfd3..08afdb8ec9 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -377,6 +377,25 @@ int ScummEngine_v5::getVarOrDirectWord(byte mask) { return fetchScriptWordSigned(); } +void ScummEngine_v5::getResultPos() { + int a; + + _resultVarNumber = fetchScriptWord(); + if (_resultVarNumber & 0x2000) { + a = fetchScriptWord(); + if (a & 0x2000) { + _resultVarNumber += readVar(a & ~0x2000); + } else { + _resultVarNumber += a & 0xFFF; + } + _resultVarNumber &= ~0x2000; + } +} + +void ScummEngine_v5::setResult(int value) { + writeVar(_resultVarNumber, value); +} + void ScummEngine_v5::jumpRelative(bool cond) { // We explicitly call ScummEngine::fetchScriptWord() // to make this method work also in v0, which overloads |