Opened 20 years ago

Closed 20 years ago

#1266 closed defect (fixed)

INDY3TOWNS: Biplane controls are haywire

Reported by: SF/cloney Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Indiana Jones 3


ScummVM 0.5.4cvs (Oct 8 2003 21:35:30), Win32

I've not got an FM Towns to compare this against, but I can't imagine it's right. I've only tried this after stealing the Biplane from the airport, not on the Biplane attached to the Zeppelin - I'll test that later today.

Basically, the controls have gone crazy. On the PC VGA version, the num-pad controls made the plane fly in the logical direction, with 5 being used to stop it moving.

On the FM Towns version, the keymap seems to be this:

1: Up+Left 2: Down+Left 3: Left 4: Up+Left 5: Up+Left 6: Down+Left 7: Left 8: Up+Right 9: Up+Right

This is fairly odd, as the keypad fighting works perfectly. Attached are two savegames - one's in the air, in the biplane, the other's at the airport, just before stealing it. For those unfamiliar, you get it started by following the instructions in "How to fly a Biplane", the manual in my inventory.

Ticket imported from: #820507. Ticket imported from: bugs/1266.

Attachments (3)

indy3towns.s07 (57.0 KB ) - added by SF/cloney 20 years ago.
Save in plane
indy3.s06 (57.9 KB ) - added by SF/cloney 20 years ago.
Save in airport
indy3towns.patch (784 bytes ) - added by fingolfin 20 years ago.
Workaround attempt #1

Download all attachments as: .zip

Change History (14)

by SF/cloney, 20 years ago

Attachment: indy3towns.s07 added

Save in plane

by SF/cloney, 20 years ago

Attachment: indy3.s06 added

Save in airport

comment:1 by fingolfin, 20 years ago

Very strange. At first I thought maybe a similiar hack as for Indy4's keyboard fighting is needed (they used PC scancodes to map the keys, not ascii). However, that can't really be the case since as you say, keyboard fighting *does* work. Anyway, since I doN't own the FMtowns version, there is little I can do. Debugging this probably requires figuring out which script controls the biplane; from there one can workout how it maps keys to actions.

comment:2 by SF/hibernatus, 20 years ago

I think it's a script bug that was fixed for the pc version. It doesn't work on UNZ either. The script LS 203 does more things than the pc version:

[0006] (38) if (Var[161] >= -256) { ... [00A5] (48) } else if (Var[161] == 54) { ... [00B9] (48) } else if (Var[161] == 52) { ...

With signed comparisons it's an obvious bug.

In the PC version it starts with if (Var[161] == 54) {

I tried removing that "if (Var[161] >= -256)" block and it worked.

comment:3 by SF/hibernatus, 20 years ago

Just a note: That case: Var[161] >= -256 && Var[161] < 0 (i guess that's what they meant) is for another controler (a gamepad according to unz).

comment:4 by SF/cloney, 20 years ago

Hmm. So is this patchable in ScummVM, and if so, should it be patched (according to the principles of the project)? Failing that, would it be possible to release some kind of patch seperate to the project that fixes it?

Obviously, that won't help if you're playing directly off CD, but I think most people run from their hard-drives.

comment:5 by SF/hibernatus, 20 years ago

Cloney: you can try that:

it adds the test for < 0 in LS 200 and LS 203. But a hack in scummvm would be nicer. I guess you can either remap the keyboard to the gamepad values which work in unz, or add a direct hack to fix the test.

comment:6 by fingolfin, 20 years ago

We definitely would *NOT* patch this, cloney, this would be against our principles.

However, we could potentially include a workaround in the code. For that, I would need details on the code. In particular, it would be useful if somebody could attach the buggy script (the .dmp). Or if somebody who actually has the game wants to write a patch, fine as well. The patch could work in various ways; one would be to insert a check into the ">=" operator opcode, which checks for INDY3+TOWNS+roomid+scriptid+comparison value -256, and in that case, just always returns false (instead of the computed value "true", if I understood hibernatus correctly).

comment:7 by SF/hibernatus, 20 years ago

in o5_lessOrEqual. roomid: 70 scriptid: 200 or 203 (but 200 isn't important actually) comparison value: -256 Jump anyway.

by fingolfin, 20 years ago

Attachment: indy3towns.patch added

Workaround attempt #1

comment:8 by fingolfin, 20 years ago

Owner: set to fingolfin

comment:9 by fingolfin, 20 years ago

Can you please check whether the attached patch helps? I don't have the means to test it myself. Thanks.

comment:10 by SF/hibernatus, 20 years ago

yes it does

comment:11 by fingolfin, 20 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.