[Scummvm-cvs-logs] CVS: scummvm/queen graphics.cpp,1.95,1.96 logic.cpp,1.187,1.188 talk.cpp,1.90,1.91

Joost Peters joostp at users.sourceforge.net
Sat Feb 21 12:33:05 CET 2004


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1890/queen

Modified Files:
	graphics.cpp logic.cpp talk.cpp 
Log Message:
Fix for bug #899881 (Sounds played when sound turned off)


Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- graphics.cpp	21 Feb 2004 08:52:25 -0000	1.95
+++ graphics.cpp	21 Feb 2004 20:20:34 -0000	1.96
@@ -343,7 +343,8 @@
 			if (pbs->animating) {
 				pbs->animOneStep();
 				if (pbs->frameNum > 500) { // SFX frame
-					_vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
+					if (_vm->sound()->sfxOn())
+						_vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
 					pbs->frameNum -= 500;
 				}
 			}
@@ -1112,7 +1113,8 @@
 	// this problem since their playSfx() function returns immediately
 	// if a sound is already being played.
 	if (_lastSoundIndex == 0 || _index - _lastSoundIndex >= SFX_SKIP) {
-		_vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
+		if (_vm->sound()->sfxOn())
+			_vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
 		_lastSoundIndex = _index;
 	}
 }

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- logic.cpp	11 Feb 2004 21:13:16 -0000	1.187
+++ logic.cpp	21 Feb 2004 20:20:35 -0000	1.188
@@ -1723,7 +1723,8 @@
 	lightningBob->y = 0;
 
 	// 23/2/95 - Play lightning SFX
-	_vm->sound()->playSfx(currentRoomSfx(), false);
+	if (_vm->sound()->sfxOn())
+		_vm->sound()->playSfx(currentRoomSfx(), false);
 
 	_vm->bankMan()->unpack(18, lightningBob->frameNum, 15);
 	_vm->bankMan()->unpack(4,  planeBob    ->frameNum, 15);

Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- talk.cpp	21 Feb 2004 08:52:25 -0000	1.90
+++ talk.cpp	21 Feb 2004 20:20:35 -0000	1.91
@@ -773,7 +773,8 @@
 
 		if (frame > 500) {
 			frame -= 500;
-			_vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
+			if (_vm->sound()->sfxOn())
+				_vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
 		}
 
 		if (torso) {





More information about the Scummvm-git-logs mailing list