[ scummvm-Patches-886058 ] Possible fix for Sam & Max music glitch

SourceForge.net noreply at sourceforge.net
Wed Jan 28 09:34:13 CET 2004


Patches item #886058, was opened at 2004-01-28 09:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=886058&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Possible fix for Sam & Max music glitch

Initial Comment:
I've begun play-testing Sam & Max (talkie version) with
a January 27 CVS snapshot, but got side-tracked on the
following bug: When Doug tells me about the Ball of
Twine, the music goes silent.

This is what the script looks like:

[0D2E] (5D)       if (ifClassOfIs(102,[19])) {
[0D3B] (AC)         soundKludge([14,29,0,1,60,40])
[0D51] (5F)         startScriptQuick(45,[102,1,1])
[0D61] (6C)         break()
[0D62] (AC)         soundKludge([14,29,0,1,127,100])
[0D78] (**)       }

IMUSE command 14 is the Sam and Max "parameter fade",
which is here used to fade down the volume of the Mole
Man theme to 60. The US map is shown to reveal the
location of the Ball of Twine, and then the Mole Man
theme is faded back up. In theory.

Unfortunately it's not able to find player 29.
Apparently the US map script does one of those
temporary save/restore kind of things, and
ScummEngine::loadState() will call
_sound->stopAllSounds(), causing the music to stop.

The iMUSE state was not saved (and therefore not
restored) because _saveSound is 0 and
_saveLoadCompatible is 1. I can only assume that this
is deliberate, but it does mean that the music won't be
restarted. So in that case we shouldn't call
stopAllSounds(). Maybe not stopCD() either, but the CD
state is always saved as far as I can see.

Normally I might have simply applied this right away,
but since we're getting close to 0.6.0 I'd like some
feedback first to make sure I'm not missing anything
important.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=886058&group_id=37116




More information about the Scummvm-tracker mailing list