Index: scumm/sound.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v retrieving revision 1.339 diff -u -r1.339 sound.cpp --- scumm/sound.cpp 25 Jun 2004 12:11:34 -0000 1.339 +++ scumm/sound.cpp 28 Jun 2004 08:34:26 -0000 @@ -69,6 +69,7 @@ _endOfMouthSync(false), _curSoundPos(0), _overrideFreq(0), + _sndMode(0), _currentCDSound(0), _soundsPaused(false), _sfxMode(0) { @@ -567,11 +568,9 @@ // // Do any other games than these need this hack? // - // HACK: Checking for script 99 in Sam & Max is to keep Conroy's song - // from being interrupted. if (mode == 1 && (_vm->_gameId == GID_TENTACLE - || (_vm->_gameId == GID_SAMNMAX && !_vm->isScriptRunning(99)))) { + || (_vm->_gameId == GID_SAMNMAX && _sndMode == 1))) { id = 777777; _vm->_mixer->stopID(id); } @@ -810,7 +809,7 @@ } } -void Sound::talkSound(uint32 a, uint32 b, int mode, int frame) { +void Sound::talkSound(uint32 a, uint32 b, int mode, int frame, int sndMode) { if (mode == 1) { _talk_sound_a1 = a; _talk_sound_b1 = b; @@ -819,6 +818,7 @@ _talk_sound_b2 = b; } + _sndMode = sndMode; _talk_sound_frame = frame; _talk_sound_mode |= mode; } Index: scumm/sound.h =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v retrieving revision 1.66 diff -u -r1.66 sound.h --- scumm/sound.h 22 Jun 2004 10:39:46 -0000 1.66 +++ scumm/sound.h 28 Jun 2004 08:34:26 -0000 @@ -71,6 +71,7 @@ uint _curSoundPos; int _overrideFreq; + int _sndMode; int _currentCDSound; public: @@ -94,7 +95,7 @@ void stopSound(int a); void stopAllSounds(); void soundKludge(int *list, int num); - void talkSound(uint32 a, uint32 b, int mode, int frame); + void talkSound(uint32 a, uint32 b, int mode, int frame, int sndMode = 1); void setupSound(); void pauseSounds(bool pause); Index: scumm/string.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v retrieving revision 1.221 diff -u -r1.221 string.cpp --- scumm/string.cpp 7 May 2004 07:33:10 -0000 1.221 +++ scumm/string.cpp 28 Jun 2004 08:34:28 -0000 @@ -54,8 +54,10 @@ // and setting VAR_V6_SOUNDMODE beforehand. See patch 609791. // FIXME: There are other VAR_V6_SOUNDMODE states, as // mentioned in the patch. FIXME after iMUSE is done. - if (_gameId != GID_SAMNMAX || (VAR(VAR_V6_SOUNDMODE) != 2)) - _sound->talkSound(a, b, 1, -1); + if (_gameId != GID_SAMNMAX || (VAR(VAR_V6_SOUNDMODE) != 2)) { + int sndMode = VAR(VAR_V6_SOUNDMODE); + _sound->talkSound(a, b, 1, -1, sndMode); + } } }