Opened 16 years ago

Closed 16 years ago

#1266 closed defect (fixed)

INDY3TOWNS: Biplane controls are haywire

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

Description

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 16 years ago.
Save in plane
indy3.s06 (57.9 KB) - added by SF/cloney 16 years ago.
Save in airport
indy3towns.patch (784 bytes) - added by fingolfin 16 years ago.
Workaround attempt #1

Download all attachments as: .zip

Change History (14)

Changed 16 years ago by SF/cloney

Attachment: indy3towns.s07 added

Save in plane

Changed 16 years ago by SF/cloney

Attachment: indy3.s06 added

Save in airport

comment:1 Changed 16 years ago by fingolfin

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 Changed 16 years ago by SF/hibernatus

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 Changed 16 years ago by SF/hibernatus

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 Changed 16 years ago by SF/cloney

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 Changed 16 years ago by SF/hibernatus

Cloney: you can try that:
http://hibernatus34.free.fr/pv/00.ips
http://hibernatus34.free.fr/pv/70.ips

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 Changed 16 years ago by fingolfin

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 Changed 16 years ago by SF/hibernatus

http://hibernatus34.free.fr/pv/LS_0200
http://hibernatus34.free.fr/pv/LS_0203

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

Changed 16 years ago by fingolfin

Attachment: indy3towns.patch added

Workaround attempt #1

comment:8 Changed 16 years ago by fingolfin

Owner: set to fingolfin

comment:9 Changed 16 years ago by fingolfin

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

comment:10 Changed 16 years ago by SF/hibernatus

yes it does

comment:11 Changed 16 years ago by fingolfin

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