[Scummvm-cvs-logs] CVS: scummvm/sword2/driver d_sound.cpp,1.108,1.109

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sat Mar 13 04:14:08 CET 2004


Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1866/driver

Modified Files:
	d_sound.cpp 
Log Message:
Fixed a slight logic error in the music fading. At this point the code
should only check if the music is fading, not in which direction. (Also
made a minor cleanup.)


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- d_sound.cpp	28 Feb 2004 12:58:13 -0000	1.108
+++ d_sound.cpp	13 Mar 2004 12:05:01 -0000	1.109
@@ -469,14 +469,14 @@
 	// If both music streams are playing, one of them will have to go.
 
 	if (_music[0]._streaming && _music[1]._streaming) {
-		if (_music[0]._fading == 0 && _music[1]._fading == 0) {
+		if (!_music[0]._fading && !_music[1]._fading) {
 			// None of them are fading. This shouldn't happen, so
 			// just pick one and be done with it.
 			primaryStream = 0;
-		} else if (_music[0]._fading != 0 && _music[1]._fading == 0) {
+		} else if (_music[0]._fading && !_music[1]._fading) {
 			// Stream 0 is fading, so pick that one.
 			primaryStream = 0;
-		} else if (_music[0]._fading == 0 && _music[1]._fading > 0) {
+		} else if (!_music[0]._fading && _music[1]._fading) {
 			// Stream 1 is fading, so pick that one.
 			primaryStream = 1;
 		} else {





More information about the Scummvm-git-logs mailing list