[Scummvm-cvs-logs] CVS: scummvm/queen graphics.cpp,1.96,1.97 logic.cpp,1.188,1.189 sound.cpp,1.35,1.36 talk.cpp,1.91,1.92

Joost Peters joostp at users.sourceforge.net
Sat Feb 21 13:04:00 CET 2004


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

Modified Files:
	graphics.cpp logic.cpp sound.cpp talk.cpp 
Log Message:
I am an idiot.
Better fix for bug #899881 (Sounds played when sound turned off) - I forgot I added the isSpeech flag a while back. :)


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

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

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/sound.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- sound.cpp	25 Jan 2004 22:10:23 -0000	1.35
+++ sound.cpp	21 Feb 2004 20:50:56 -0000	1.36
@@ -77,6 +77,9 @@
 }
 
 void Sound::playSfx(uint16 sfx, bool isSpeech) {
+	if (isSpeech && !speechOn()) return;
+        else if (!sfxOn()) return;
+
 	if (sfx != 0) {
 		char name[13];
 		strcpy(name, _sfxName[sfx - 1]);
@@ -87,6 +90,9 @@
 }
 
 void Sound::playSfx(const char *base, bool isSpeech) {
+	if (isSpeech && !speechOn()) return;
+	else if (!sfxOn()) return;
+	
 	char name[13];
 	strcpy(name, base);
 	// alter filename to add zeros and append ".SB"

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





More information about the Scummvm-git-logs mailing list