aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorKari Salminen2008-01-10 12:02:03 +0000
committerKari Salminen2008-01-10 12:02:03 +0000
commit6b372d97ee0ba2b3f5aa154599d167edd6b087b8 (patch)
tree9aef2c665cb0afc98d2a8db2f0ad8f34e3126f78 /engines
parent0ec8d35e4da14d6af53ead8001063b6ecf5f0fc5 (diff)
downloadscummvm-rg350-6b372d97ee0ba2b3f5aa154599d167edd6b087b8.tar.gz
scummvm-rg350-6b372d97ee0ba2b3f5aa154599d167edd6b087b8.tar.bz2
scummvm-rg350-6b372d97ee0ba2b3f5aa154599d167edd6b087b8.zip
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)).
svn-id: r30375
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/id.cpp8
-rw-r--r--engines/agi/keyboard.cpp16
-rw-r--r--engines/agi/op_cmd.cpp15
-rw-r--r--engines/agi/op_dbg.cpp2
4 files changed, 36 insertions, 5 deletions
diff --git a/engines/agi/id.cpp b/engines/agi/id.cpp
index 7286738be3..eb1d570889 100644
--- a/engines/agi/id.cpp
+++ b/engines/agi/id.cpp
@@ -114,6 +114,14 @@ int AgiEngine::setupV3Game(int ver, uint32 crc) {
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;
}
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index c4532941d6..78054e84b4 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -180,10 +180,18 @@ int AgiEngine::handleController(int key) {
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;
+ }
}
}
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 9e2d48feb3..6f98a00af5 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -664,7 +664,20 @@ cmd(release_key) {
}
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) {
diff --git a/engines/agi/op_dbg.cpp b/engines/agi/op_dbg.cpp
index 0676f944e4..cd7442c81c 100644
--- a/engines/agi/op_dbg.cpp
+++ b/engines/agi/op_dbg.cpp
@@ -269,6 +269,8 @@ struct AgiLogicnames logicNamesCmd[] = {
_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)
};