aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/gameDetector.cpp1
-rw-r--r--sky/control.cpp4
-rw-r--r--sky/sky.cpp8
3 files changed, 12 insertions, 1 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index 0444f164e2..f187924959 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -147,6 +147,7 @@ GameDetector::GameDetector() {
ConfMan.registerDefault("platform", Common::kPlatformPC);
ConfMan.registerDefault("language", "en");
ConfMan.registerDefault("speech_mute", false);
+ ConfMan.registerDefault("sfx_mute", false);
ConfMan.registerDefault("subtitles", false);
ConfMan.registerDefault("boot_param", 0);
ConfMan.registerDefault("save_slot", -1);
diff --git a/sky/control.cpp b/sky/control.cpp
index 90adcf7f05..95b7e1a9cf 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -714,6 +714,9 @@ uint16 Control::toggleFx(ConResource *pButton) {
pButton->_text = 0x7000 + 86;
_statusBar->setToText(0x7000 + 86);
}
+
+ ConfMan.set("sfx_mute", (SkyEngine::_systemVars.systemFlags & SF_FX_OFF) != 0);
+
pButton->drawToScreen(WITH_MASK);
buttonControl(pButton);
_system->updateScreen();
@@ -737,6 +740,7 @@ uint16 Control::toggleText(void) {
}
ConfMan.set("subtitles", (flags & SF_ALLOW_TEXT) != 0);
+ ConfMan.set("speech_mute", (flags & SF_ALLOW_SPEECH) == 0);
SkyEngine::_systemVars.systemFlags |= flags;
diff --git a/sky/sky.cpp b/sky/sky.cpp
index 88020be035..7b2fcbba88 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -308,6 +308,9 @@ int SkyEngine::init(GameDetector &detector) {
if (!_mixer->isReady())
warning("Sound initialisation failed");
+ if (ConfMan.getBool("sfx_mute")) {
+ SkyEngine::_systemVars.systemFlags |= SF_FX_OFF;
+ }
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_floppyIntro = ConfMan.getBool("alt_intro");
@@ -330,7 +333,6 @@ int SkyEngine::init(GameDetector &detector) {
}
if (isCDVersion()) {
- _systemVars.systemFlags |= SF_ALLOW_SPEECH;
if (ConfMan.hasKey("nosubtitles")) {
warning("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead");
if (!ConfMan.getBool("nosubtitles"))
@@ -339,6 +341,10 @@ int SkyEngine::init(GameDetector &detector) {
if (ConfMan.getBool("subtitles"))
_systemVars.systemFlags |= SF_ALLOW_TEXT;
+
+ if (!ConfMan.getBool("speech_mute"))
+ _systemVars.systemFlags |= SF_ALLOW_SPEECH;
+
} else
_systemVars.systemFlags |= SF_ALLOW_TEXT;