Opened 18 years ago

Closed 14 years ago

#2555 closed defect (fixed)

ZAK FM-TOWNS: Keyboard shortcut problems

Reported by: SF/chaos548 Owned by: athrxx
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Zak McKracken

Description

- Using SCUMM 0.82 (latest build) - F1-F4 keys to switch between characters don't work. Also, the shortcut for push (i.e. "q"), which works fine at the beginning of the game, stops working after the first time one switches to a character on Mars. - Language is English - Running on WinXP - Attached is a savegame where keys don't work (F1-F4 aswell as q)

Ticket imported from: #1463434. Ticket imported from: bugs/2555.

Attachments (1)

zakTowns.s01 (19.8 KB ) - added by SF/chaos548 18 years ago.
Save game where keys don't work

Download all attachments as: .zip

Change History (20)

by SF/chaos548, 18 years ago

Attachment: zakTowns.s01 added

Save game where keys don't work

comment:1 by Kirben, 18 years ago

Please add comments to existing bug report, instead of adding another bug report, next time.

There are no F1 - F8 shortcuts in the FM-TOWNS version of Zak McKracken.

comment:2 by SF/chaos548, 18 years ago

Why wouldn't F1-F4 work just like in the original? And why are F1-F4 listed as active keys in the help menu if they are not supposed to work? Also, why does "q" no longer work after the first time one switches to a character on Mars. Thx.

comment:3 by sev-, 18 years ago

Kirben, any idea on what should we do with this report?

comment:4 by Kirben, 18 years ago

Owner: set to Kirben

comment:5 by Kirben, 18 years ago

The F1 - F8 shortcuts aren't available in the FM-TOWNS version of the game, they don't exist in the scripts. So should be removed from the help section for FM-TOWNS version.

The manual for the game is only in Japanese, so I'm not sure what other keyboard shortcuts the original verison offered.

I'm can reproduce the issue with the 'q' keyboard shortcut failing, after switching to Mars for first time. I will check if that occurs in the original game too.

comment:6 by sev-, 18 years ago

What is the status of this item?

comment:7 by Kirben, 18 years ago

The 'q' keyboard shortcut failing,after switching to Mars for first time, is ScummVM specific and still occurs

comment:8 by fingolfin, 18 years ago

Verb shortcuts are set by scripts... Maybe we interpret something wrong there. Or maybe there is a script error, but the original interpreter hard coded some keyboard shortcuts (which would seem odd, but could still be the case...)

comment:9 by fingolfin, 17 years ago

Background: The V1/V2 versions of the games didn't have to set verb hotkeys, rather, those were statically assigned by the engine.

So when they updated the scripts for V3, they had to insert the require opcodes to set the keyboard opcodes. From the looks of it, they simply "forgot" to do that in several cases. To take the "Push" verb as an example, consider this excerpt from some of the Zak FM-TOWNS script dumps I have sitting on my HD (and note that the New() verb opcode will reset everything in that verb, including the hotkey):

./script-107.txt:[02A6] (7A) VerbOps(1,[New(),Text("Push"),On()]) ./script-118.txt:[011C] (7A) VerbOps(1,[New(),Text("Push"),Key(113),SetXY(0,152),On()]) ./script-143.txt:[0016] (7A) VerbOps(1,[New(),Text("Push"),SetXY(0,152),On()]) ./script-15.txt:[01DF] (7A) VerbOps(1,[New(),Text("Push"),On()]) ./script-164.txt:[0126] (7A) VerbOps(1,[New(),Text("Push"),SetXY(0,152),On()]) ./script-165.txt:[03B2] (7A) VerbOps(1,[New(),Text("Push"),SetXY(0,152),On()]) ./script-23.txt:[01FE] (7A) VerbOps(1,[New(),Text("Push"),Key(113),SetXY(0,152),On()]) ./script-36.txt:[0000] (7A) VerbOps(1,[New(),Text("Push"),Key(113),SetXY(0,152),On()])

As such, either the problem occurs with the original engine, too (I am not sure whether Kirben meant that he confirmed the problem did *not* occur in the original); or we need to handle the verbops differently for Zak TOWNS. Maybe the "key" value is *not* reset by verbOps.New() ?

comment:10 by Kirben, 17 years ago

To be clear, the problem doesn't occur when using the original game under Unz (FM-TOWNS emulator).

I checked disassembly and the verb key is always reset to 0 for new verbs.

comment:11 by bluegr, 17 years ago

Revision 26288 (patch #1687013 - Zak FM-Towns: F1-F4 person switching) fixed the F1-F4 keys

I too get the problem with the "q" key. For me, it happens whenever I switch to another character. It gets fixed if I walk into Lou's Loans (where some of the verbs are changed) and then go outside.

comment:12 by sev-, 17 years ago

What is the status of this item?

comment:13 by Kirben, 17 years ago

Owner: Kirben removed

comment:14 by Kirben, 17 years ago

Unchanged, the 'q' keyboard shortcut still fails, after switching to Mars for the first time.

comment:15 by fingolfin, 17 years ago

As I previously stated, the only thing I can think of is that maybe they used a modified engine which did never reset the "key" value of a verb, resp. they still used hard coded hotkey assignments, like in the V1/V2 version of the game.

We could implement a workaround based on that assumption. And/or maybe somebody could check the original code (via disasm).

comment:16 by athrxx, 14 years ago

I have investigated this a bit. o5_verbOps() case 9 (SO_VERB_NEW) works slightly different in SCUMM 3 FM TOWNS (I don't know about DOS). I think I have fixed this (at least I matched the code with disasm).

This won't fix old savegames, though (since the verb states and their broken key values will be restored from the save game).

Could you test whether the key shortcuts still get broken when switching characters for the first time?

comment:17 by raziel-, 14 years ago

At least for me this doesn't happen in the latest revision.

F1-F4 work as do the keyboard shortcuts, before, while and after switching to Mars (Leslie, Melissa).

I haven't tested it while actually being on Mars with Zak.

If that is needed too i will play along until i get there

comment:18 by athrxx, 14 years ago

Owner: set to athrxx
Resolution: fixed
Status: newclosed

comment:19 by athrxx, 14 years ago

Okay, then I'll close this as fixed. Thanks for testing, Raziel. (No need to have Zak on Mars. The bug should have occured as soon as characters get switched for the first time)

Note: See TracTickets for help on using tickets.