aboutsummaryrefslogtreecommitdiff
path: root/queen/sound.cpp
diff options
context:
space:
mode:
authorJoost Peters2004-02-21 20:50:56 +0000
committerJoost Peters2004-02-21 20:50:56 +0000
commit6e50033d07011d8fcae941c5c10530081d522db0 (patch)
treedc54f1db5504e24bd9794b41eb12009d854faeb8 /queen/sound.cpp
parent0301ccc8a88283d02b65749fd21f90e71582f14d (diff)
downloadscummvm-rg350-6e50033d07011d8fcae941c5c10530081d522db0.tar.gz
scummvm-rg350-6e50033d07011d8fcae941c5c10530081d522db0.tar.bz2
scummvm-rg350-6e50033d07011d8fcae941c5c10530081d522db0.zip
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. :) svn-id: r12976
Diffstat (limited to 'queen/sound.cpp')
-rw-r--r--queen/sound.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/queen/sound.cpp b/queen/sound.cpp
index ccfcf23a5d..c403d32b1c 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -77,6 +77,9 @@ void Sound::waitFinished(bool isSpeech) {
}
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(uint16 sfx, bool isSpeech) {
}
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"