diff options
author | Kari Salminen | 2008-01-05 20:35:18 +0000 |
---|---|---|
committer | Kari Salminen | 2008-01-05 20:35:18 +0000 |
commit | d604f51d4245bc770bd12609be0984f15bc77dd1 (patch) | |
tree | 0fb2aa2b06c0a314bfe2c405227c595f13b90638 /engines/agi | |
parent | aa38a8eb965ce923ed655964cf3e2be5ea254a1a (diff) | |
download | scummvm-rg350-d604f51d4245bc770bd12609be0984f15bc77dd1.tar.gz scummvm-rg350-d604f51d4245bc770bd12609be0984f15bc77dd1.tar.bz2 scummvm-rg350-d604f51d4245bc770bd12609be0984f15bc77dd1.zip |
Implement unknown test command 19 (hopefully) properly and name it unofficially as the in.motion.using.mouse-command.
svn-id: r30251
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/op_dbg.cpp | 5 | ||||
-rw-r--r-- | engines/agi/op_test.cpp | 15 |
2 files changed, 12 insertions, 8 deletions
diff --git a/engines/agi/op_dbg.cpp b/engines/agi/op_dbg.cpp index d1a8aa5909..0676f944e4 100644 --- a/engines/agi/op_dbg.cpp +++ b/engines/agi/op_dbg.cpp @@ -64,7 +64,10 @@ struct AgiLogicnames logicNamesTest[] = { _L("compare.strings", 2, 0x00), _L("obj.in.box", 5, 0x00), _L("center.posn", 5, 0x00), - _L("right.posn", 5, 0x00) + _L("right.posn", 5, 0x00), + + /* Haven't seen an official name for this command so tried to name it descriptively. */ + _L("in.motion.using.mouse", 0, 0x00) }; struct AgiLogicnames logicNamesIf[] = { diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index 7e843e5c56..5ca7534eb0 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -336,13 +336,14 @@ int AgiEngine::testIfCode(int lognum) { ec = testObjRight(p[0], p[1], p[2], p[3], p[4]); break; case 0x13: // Unknown test command 19 - // Used at least by the Amiga version of Gold Rush! in logic.001. - // Don't know what this actually does in the Amiga executable but - // evaluating this to false seems to fix the bug #1745950 - // (GR: Birds stuck in opening screen (Amiga version)). - // FIXME: This hack was taken from NAGI. Need to check it with disassembly. - warning("op_test: Amiga-specific testcase 19 was triggered"); - ec = false; + // My current theory is that this command checks whether the ego is currently moving + // and that that movement has been caused using the mouse and not using the keyboard. + // I base this theory on the game's behaviour on an Amiga emulator, not on disassembly. + // This command is used at least in the Amiga version of Gold Rush! v2.05 1989-03-09 + // (AGI 2.316) in logics 1, 3, 5, 6, 137 and 192 (Logic.192 revealed this command's nature). + // TODO: Check this command's implementation using disassembly just to be sure. + ec = game.viewTable[0].flags & ADJ_EGO_XY; + debugC(7, kDebugLevelScripts, "op_test: in.motion.using.mouse = %d (Amiga-specific testcase 19)", ec ? "true" : "false"); break; default: ec = false; |