[Scummvm-cvs-logs] SF.net SVN: scummvm: [30375] scummvm/trunk/engines/agi
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Thu Jan 10 13:02:20 CET 2008
Revision: 30375
http://scummvm.svn.sourceforge.net/scummvm/?rev=30375&view=rev
Author: buddha_
Date: 2008-01-10 04:02:03 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Disable moving using mouse in mines (Rooms 147-162) and 'adj.ego.move.to.x.y'-command (Which uses 2 arguments) in Amiga's Gold Rush. This temporary hack fixes bug #1733297 (GR: Actor stuck (Amiga version)).
Modified Paths:
--------------
scummvm/trunk/engines/agi/id.cpp
scummvm/trunk/engines/agi/keyboard.cpp
scummvm/trunk/engines/agi/op_cmd.cpp
scummvm/trunk/engines/agi/op_dbg.cpp
Modified: scummvm/trunk/engines/agi/id.cpp
===================================================================
--- scummvm/trunk/engines/agi/id.cpp 2008-01-10 12:00:10 UTC (rev 30374)
+++ scummvm/trunk/engines/agi/id.cpp 2008-01-10 12:02:03 UTC (rev 30375)
@@ -114,6 +114,14 @@
logicNamesCmd[0xad].numArgs = 1;
}
+ // FIXME: Apply this fix to other games also that use 2 arguments for command 182.
+ // 'adj.ego.move.to.x.y' (i.e. command 182) takes 2 arguments for at least the
+ // Amiga Gold Rush! (v2.05 1989-03-09) using Amiga AGI 2.316. Amiga's Gold Rush
+ // has been set to use AGI 3.149 in ScummVM so that's why this initialization is
+ // here and not in setupV2Game.
+ if (getGameID() == GID_GOLDRUSH && getPlatform() == Common::kPlatformAmiga)
+ logicNamesCmd[182].numArgs = 2;
+
return ec;
}
Modified: scummvm/trunk/engines/agi/keyboard.cpp
===================================================================
--- scummvm/trunk/engines/agi/keyboard.cpp 2008-01-10 12:00:10 UTC (rev 30374)
+++ scummvm/trunk/engines/agi/keyboard.cpp 2008-01-10 12:02:03 UTC (rev 30375)
@@ -180,10 +180,18 @@
if (!(getFeatures() & GF_AGIMOUSE)) {
/* Handle mouse button events */
if (key == BUTTON_LEFT) {
- v->flags |= ADJ_EGO_XY;
- v->parm1 = WIN_TO_PIC_X(g_mouse.x);
- v->parm2 = WIN_TO_PIC_Y(g_mouse.y);
- return true;
+ // FIXME: Implement adj.ego.move.to.x.y-command properly (With 2 arguments) and remove this hack.
+ // This is a hack for preventing mouse usage in the mines (Rooms 147-162) in Amiga Gold Rush as
+ // moving with mouse bugs in the mines because adj.ego.move.to.x.y isn't properly implemented yet.
+ if (getGameID() == GID_GOLDRUSH && getPlatform() == Common::kPlatformAmiga && _game.vars[0] >= 147 && _game.vars[0] <= 162) {
+ messageBox("Use yer arrow keys ta walk.");
+ return true;
+ } else {
+ v->flags |= ADJ_EGO_XY;
+ v->parm1 = WIN_TO_PIC_X(g_mouse.x);
+ v->parm2 = WIN_TO_PIC_Y(g_mouse.y);
+ return true;
+ }
}
}
Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp 2008-01-10 12:00:10 UTC (rev 30374)
+++ scummvm/trunk/engines/agi/op_cmd.cpp 2008-01-10 12:02:03 UTC (rev 30375)
@@ -664,7 +664,20 @@
}
cmd(adj_ego_move_to_x_y) {
- game.viewTable[0].flags |= ADJ_EGO_XY;
+ switch (logicNamesCmd[182].numArgs) {
+ case 2:
+ // TODO: Implement the 2 arguments using variant of 'adj.ego.move.to.x.y'.
+ // It's used at least in Amiga Gold Rush! (v2.05 1989-03-09, Amiga AGI 2.316)
+ // in logics 130 and 150 (Using arguments (0, 0), (0, 7), (0, 8), (9, 9), (-9, 9)).
+ // I may be wrong about the (-9, 9) argument pair though, it may just be (247, 9).
+ debugC(4, kDebugLevelScripts, "Unsupported command adj.ego.move.to.x.y(%d, %d)",
+ (int8) p0, (int8) p1);
+ break;
+ case 0:
+ default:
+ game.viewTable[0].flags |= ADJ_EGO_XY;
+ break;
+ }
}
cmd(parse) {
Modified: scummvm/trunk/engines/agi/op_dbg.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_dbg.cpp 2008-01-10 12:00:10 UTC (rev 30374)
+++ scummvm/trunk/engines/agi/op_dbg.cpp 2008-01-10 12:02:03 UTC (rev 30375)
@@ -269,6 +269,8 @@
_L("fence.mouse", 4, 0x00), /* B3 */
_L("mouse.posn", 2, 0x00), /* B4 */
_L("release.key", 0, 0x00), /* B5 */
+
+ /* 2 args for at least the Amiga Gold Rush! (v2.05 1989-03-09) using Amiga AGI 2.316. */
_L("adj.ego.move.to.xy", 0, 0x00), /* B6 */
_L(NULL, 0, 0x00)
};
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