Opened 4 years ago

Closed 4 years ago

#6761 closed defect (fixed)

ZVISION: Missing sounds when using the knocker in Zork: Nemesis

Reported by: eriktorbjorn Owned by: RichieSams
Priority: normal Component: Engine: ZVision
Keywords: Cc:
Game: Zork Nemesis

Description

Current ScummVM git snapshot, English version of the game

When using the knocker on the door near the beginning of the game, there's supposed to be a sound when dragging it to the top or bottom position. In ScummVM, I only get a sound effect if I release the knocker and let it fall to the bottom position. And even then there's a slight error, because in the original I get two sounds if I let go of the knocker, because it bounces once.

My very limited understanding of ZVision is that the knocker is a LeverControl, and that its current position is stored as a "state value" that's checked by a puzzle script. If I change it so that this state value is also updated in LeverControl::onMouseMove() I do get the sound when dragging to the top and bottom positions, but I still don't get the double sound on the bounce.

(I also noticed that the mouse cursor seems to behave a bit different. In the DOS version, it remains a hand while dragging, and you can't drag it away from the knocker. In ScummVM, it changes back to an arrow, and you can drag it away.)

Ticket imported from: bugs/6761.

Change History (4)

comment:1 Changed 4 years ago by bluegr

Owner: set to RichieSams
Resolution: fixed

comment:2 Changed 4 years ago by bluegr

There are a lot of small bugs in this bug report regarding that puzzle, which should all now be fixed with the following commits:

Multiple sounds issue:
28e27ea1d94f1df4c8e68216c086cb57c396ccd8
9f00880aa40abb7584a007e10591ee5aa593ae7a

Cursor dragging issue:
4f28cec6ac7ef68df373f6c1139a852150789851

Hand cursor issue:
89f233f4881589b925e871becbf3ec1b08db108e

The puzzle behavior looks correct to me now. Can you verify, so that we can close this as resolved?

comment:3 Changed 4 years ago by RichieSams

Yes and no. All are fixed.
However the cursor will not reset to idle until the user moves the mouse
after releasing left click. This is because the script manager caches the
mouse events and processes one per frame. Therefore, the results of the
script manager's onClick() aren't relayed back to the the local variable
where the reset happens.

To solve the problem, perhaps we can have a member variable somewhere store
the name of the cursor. Changing the cursor would only change the name.
Then at the end of the frame, the cursor would be resolved, and actual
blitting would take place.

I can tackle this, but I won't be free until Sunday.

comment:4 Changed 4 years ago by RichieSams

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