[Scummvm-cvs-logs] CVS: scummvm/sky sound.cpp,1.31,1.32

Robert G?ffringmann lavosspawn at users.sourceforge.net
Mon Aug 18 13:37:07 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv12790/sky

Modified Files:
	sound.cpp 
Log Message:
fix sfx restart after restoring a savegame

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- sound.cpp	2 Aug 2003 16:53:46 -0000	1.31
+++ sound.cpp	18 Aug 2003 20:36:55 -0000	1.32
@@ -1083,8 +1083,10 @@
 
 	_sampleRates = _soundData + sRateTabOfs;
 	_sfxInfo = _soundData + _sfxBaseOfs;
-	for (uint8 cnt = 0; cnt < 4; cnt++)
-		_sfxQueue[cnt].count = 0;
+	// if we just restored a savegame, the sfxqueue holds the sound we need to restart
+	if (!(SkyState::_systemVars.systemFlags & SF_GAME_RESTORED))
+		for (uint8 cnt = 0; cnt < 4; cnt++)
+			_sfxQueue[cnt].count = 0;
 }
 
 void SkySound::playSound(uint16 sound, uint16 volume, uint8 channel) {





More information about the Scummvm-git-logs mailing list