[Scummvm-cvs-logs] SF.net SVN: scummvm: [30251] scummvm/trunk/engines/agi

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Sat Jan 5 21:35:18 CET 2008


Revision: 30251
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30251&view=rev
Author:   buddha_
Date:     2008-01-05 12:35:18 -0800 (Sat, 05 Jan 2008)

Log Message:
-----------
Implement unknown test command 19 (hopefully) properly and name it unofficially as the in.motion.using.mouse-command.

Modified Paths:
--------------
    scummvm/trunk/engines/agi/op_dbg.cpp
    scummvm/trunk/engines/agi/op_test.cpp

Modified: scummvm/trunk/engines/agi/op_dbg.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_dbg.cpp	2008-01-05 17:43:53 UTC (rev 30250)
+++ scummvm/trunk/engines/agi/op_dbg.cpp	2008-01-05 20:35:18 UTC (rev 30251)
@@ -64,7 +64,10 @@
 	_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[] = {

Modified: scummvm/trunk/engines/agi/op_test.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_test.cpp	2008-01-05 17:43:53 UTC (rev 30250)
+++ scummvm/trunk/engines/agi/op_test.cpp	2008-01-05 20:35:18 UTC (rev 30251)
@@ -336,13 +336,14 @@
 			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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list