[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.107,1.108
Max Horn
fingolfin at users.sourceforge.net
Sat May 3 04:45:34 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20424
Modified Files:
sound.cpp
Log Message:
hack that avoids buglet where music doesn't stop in MonkeyVGA/EGA
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- sound.cpp 1 May 2003 00:04:05 -0000 1.107
+++ sound.cpp 3 May 2003 11:42:25 -0000 1.108
@@ -423,6 +423,21 @@
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);
More information about the Scummvm-git-logs
mailing list