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
This commit is contained in:
Kari Salminen 2008-01-10 12:02:03 +00:00
parent 0ec8d35e4d
commit 6b372d97ee
4 changed files with 36 additions and 5 deletions

View File

@ -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;
}

View File

@ -180,12 +180,20 @@ int AgiEngine::handleController(int key) {
if (!(getFeatures() & GF_AGIMOUSE)) {
/* Handle mouse button events */
if (key == BUTTON_LEFT) {
// 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;
}
}
}
v->flags &= ~ADJ_EGO_XY;

View File

@ -664,7 +664,20 @@ cmd(release_key) {
}
cmd(adj_ego_move_to_x_y) {
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) {

View File

@ -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)
};