aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-07-23 10:00:03 +0200
committeruruk2014-07-23 10:00:03 +0200
commitb15b1043f91996c5213d7f1b5aa46202703a572b (patch)
treedc7fee1d5e1871273099e4d642304a5833432a9b
parent71a9ead967180344310f28b329158cd5e812be31 (diff)
downloadscummvm-rg350-b15b1043f91996c5213d7f1b5aa46202703a572b.tar.gz
scummvm-rg350-b15b1043f91996c5213d7f1b5aa46202703a572b.tar.bz2
scummvm-rg350-b15b1043f91996c5213d7f1b5aa46202703a572b.zip
CGE2: Updgrade checkSaySwitch().
Now it takes into account the "Speech volume" option in the Launcher and it only plays the keyClick() sound if the button is really switched, not every time it's clicked.
-rw-r--r--engines/cge2/cge2_main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 37821fb375..4d38b1034b 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -833,6 +833,10 @@ void CGE2Engine::checkSaySwitch() {
bool speechMute = mute;
if (!speechMute)
speechMute = ConfMan.getBool("speech_mute");
+ if (!speechMute) {
+ int speechVolume = ConfMan.getInt("speech_volume");
+ speechMute = speechVolume == 0;
+ }
if (mute || speechMute) {
_sayVox = false;
@@ -842,6 +846,7 @@ void CGE2Engine::checkSaySwitch() {
if (_oldSayVox != _sayVox) {
_commandHandlerTurbo->addCommand(kCmdSeq, 129, _sayVox, nullptr);
_commandHandlerTurbo->addCommand(kCmdSeq, 128, _sayCap, nullptr);
+ keyClick();
}
_oldSayVox = _sayVox;
@@ -1160,7 +1165,6 @@ void CGE2Engine::switchCap() {
_sayCap = !_sayCap;
if (!_sayCap)
_sayVox = true;
- keyClick();
checkSaySwitch();
}
}
@@ -1170,7 +1174,6 @@ void CGE2Engine::switchVox() {
_sayVox = !_sayVox;
if (!_sayVox)
_sayCap = true;
- keyClick();
checkSaySwitch();
}
}