diff options
author | Max Horn | 2003-05-03 11:42:25 +0000 |
---|---|---|
committer | Max Horn | 2003-05-03 11:42:25 +0000 |
commit | 029b99691a34c59feabefca83c3e979a63ca8a7e (patch) | |
tree | 7efcbc32d9199ff2485283f591470a9f6631df13 /scumm | |
parent | 14a90f1339c6531e6267ae4cb23ba2016af22ec5 (diff) | |
download | scummvm-rg350-029b99691a34c59feabefca83c3e979a63ca8a7e.tar.gz scummvm-rg350-029b99691a34c59feabefca83c3e979a63ca8a7e.tar.bz2 scummvm-rg350-029b99691a34c59feabefca83c3e979a63ca8a7e.zip |
hack that avoids buglet where music doesn't stop in MonkeyVGA/EGA
svn-id: r7280
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/sound.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index a34b9d83b9..1f0abc11c5 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -423,6 +423,21 @@ void Sound::playSound(int soundID) { if (_scumm->_features & GF_OLD_BUNDLE) return; // FIXME + if (_scumm->_gameId == GID_MONKEY_VGA || _scumm->_gameId == GID_MONKEY_EGA) { + // FIXME: This evil hack works around the fact that in some + // places in MonkeyVGA, the music is never explicitly stopped. + // Rather it seems that starting a new music is supposed to + // automatically stop the old song. + // This hack relays on the fact that we currently don't support SFX + // in these games, only music. Once we add SFX support, we'll have to + // revise it / replace it by a proper fix. + static int lastSound = -1; + if (lastSound > 0 && ptr) { + stopSound(lastSound); + lastSound = soundID; + } + } + if (_scumm->_imuse) { _scumm->getResourceAddress(rtSound, soundID); _scumm->_imuse->startSound(soundID); |