diff options
author | Jussi Pitkanen | 2011-06-17 16:07:43 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2011-08-13 23:27:17 +0100 |
commit | e4a1193d22142be750e20ab0a32f03f8c11cf950 (patch) | |
tree | a94aef3b2469c50a85641233bb59f10947701e25 /engines/agi/op_test.cpp | |
parent | 2289ba88b64dd53d48d0d47138a553ab4452adc2 (diff) | |
download | scummvm-rg350-e4a1193d22142be750e20ab0a32f03f8c11cf950.tar.gz scummvm-rg350-e4a1193d22142be750e20ab0a32f03f8c11cf950.tar.bz2 scummvm-rg350-e4a1193d22142be750e20ab0a32f03f8c11cf950.zip |
AGI: Add last undefined V1 test command that tests if a bit of var is set
Also fix skipInstruction() for V1.
Diffstat (limited to 'engines/agi/op_test.cpp')
-rw-r--r-- | engines/agi/op_test.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index 70d0cc0483..a99a4eafc4 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -155,6 +155,10 @@ void condSaid3(AgiGame *state, uint8 *p) { state->testResult = true; } +void condBit(AgiGame *state, uint8 *p) { + state->testResult = (getvar(p[1]) >> p[0]) & 1; +} + void condCompareStrings(AgiGame *state, uint8 *p) { debugC(7, kDebugLevelScripts, "comparing [%s], [%s]", state->strings[p[0]], state->strings[p[1]]); state->testResult = state->_vm->testCompareStrings(p[0], p[1]); @@ -446,7 +450,7 @@ void AgiEngine::skipInstruction(byte op) { AgiGame *state = &_game; if (op >= 0xFC) return; - if (op == 0x0E) // said + if (op == 0x0E && state->_vm->getVersion() >= 0x2000) // said ip += *(code + ip) * 2 + 1; else ip += logicNamesTest[op].argumentsLength(); |