Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6251 closed defect (fixed)

SCI: KQ5 Windows CD - Game Hangs Before Final Battle

Reported by: SF/jennibee Owned by: wjp
Priority: normal Component: Engine: SCI
Version: Keywords: script
Cc: Game: King's Quest 5

Description

On Windows 7 64-bit with the latest daily build, using King's Quest V Windows CD English, the game hangs right after you pick up Crispin's glowing wand before the final battle.

I've included a save game right before you pick up the wand.

Ticket imported from: #3605269. Ticket imported from: bugs/6251.

Attachments (1)

kq5-cd-win.000 (46.3 KB ) - added by SF/jennibee 11 years ago.

Download all attachments as: .zip

Change History (11)

by SF/jennibee, 11 years ago

Attachment: kq5-cd-win.000 added

comment:1 by SF/jennibee, 11 years ago

Summary: King's Quest V Windows CD - Game Hangs Before Final BattleSCI: KQ5 Windows CD - Game Hangs Before Final Battle

comment:2 by bluegr, 11 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

comment:3 by bluegr, 11 years ago

Fixed in the latest daily version of ScummVM.

This is a bug in the original resource files of the game, which are missing channel 15 (the signalling channel).

Songs 1840, 1843 and 1849 are all played during the ending, and are all missing signalling data, so the game scripts wait forever. In the original game, this bug manifested as an "out of heap" error: http://www.sierrahelp.com/Games/KingsQuest/KQ5Help.html

We now signal the game scripts to not wait forever. Mordack's appearing animation appears a bit earlier than it should, but that's better than having the game freeze.

Closing as fixed

comment:4 by bluegr, 11 years ago

Forgot to mention: The bug was fixed in commit 2e93ee2

comment:5 by wjp, 11 years ago

Resolution: fixed
Status: closednew

comment:6 by wjp, 11 years ago

This bug is not caused by missing signals, but rather by global 400.

The windows version of kq5 sets this global to 1 in the interpreter, and that makes the scripts skip these signal checks.

Unfortunately duplicating that in scummvm has the side effect of freezing the shape of the mouse cursor and making the mouse warp all over the place. (Seemingly on mouseover/mouseout events for GUI elements?)

comment:7 by wjp, 11 years ago

An effect of setting global 400 is that it switches to a 2 parameter SetCursor, which is interpreted as warp in SCI1. Using the SCI0 SetCursor for kq5win seems to fix these cursor issues. We should look at the scripts for other effects of this global.

comment:8 by wjp, 11 years ago

The scripts in kq5 use this global in three ways: change SetCursor calls, skip signal checks, and something less clear in startGame::doit, where it is read soon after a kPlatform call and before something involving detailLevel.

comment:9 by bluegr, 11 years ago

A script patch has been added for this by wjp/wjpalenstijn in commit e273a387a71944fb6c9ec735114c5c5774109761, therefore I'm closing this as "fixed"

comment:10 by bluegr, 11 years ago

Keywords: script added
Owner: changed from bluegr to wjp
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.