Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#927 closed defect

ZAK256: Missing opcode 02/82

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

Description

This opcode is used for audio CD commands.

Here is what to do:

r is the result b is the parameter

b == 0: if an audio track is playing: r = 0 else: r = 1

b == FF: I don't know what it's used for, but anyway it's never used in the scripts.

b == FE: if an audio track is playing: r = the SO block number else: r = 0

b == FD: pause the audio track r = anything

b == FC: unpause (start where it was when you paused) r = anything

b == a CD track number: r = track length in seconds

To check scummvm returns the right track length you can look at the global script #9 (0x888A in 49.LFL).

FD and FC are used to let the game load several resources without hanging when a CD track is playing. I guess it's already not a problem in scummvm :)

Ticket imported from: #762589. Ticket imported from: bugs/927.

Change History (4)

comment:1 by SF/hibernatus, 21 years ago

er, i forgot a little detail when i say "if an audio track is playing":

for b == 0 "playing" means "physically playing".

for b == FE "playing" means that an audio track is currently supposed to play. You don't care if it's paused, you still return the soundID.

comment:2 by SF/hibernatus, 21 years ago

About this:

b == 0: if an audio track is playing: r = 0 else: r = 1

You wrote the opposite in cvs. That function returns 0 when a track is playing. Anyway, it's not used from scripts either, only from code.

comment:3 by fingolfin, 21 years ago

This can be closed, the opcode is now implemented (although some parts, like (un)pausing the CD track, is not implemented, but that is already marked with a TODO in the source code).

comment:4 by fingolfin, 21 years ago

Owner: set to fingolfin
Status: newclosed
Note: See TracTickets for help on using tickets.