diff options
author | Joost Peters | 2006-01-17 00:24:01 +0000 |
---|---|---|
committer | Joost Peters | 2006-01-17 00:24:01 +0000 |
commit | 98a949f5b74753543cef43975ea56ede7047e739 (patch) | |
tree | 45ec3ef40871789be44881386e8f6e1f9fb0140b | |
parent | 6f445e3d8d9a3c48bf412b4b97a14b7166711903 (diff) | |
download | scummvm-rg350-98a949f5b74753543cef43975ea56ede7047e739.tar.gz scummvm-rg350-98a949f5b74753543cef43975ea56ede7047e739.tar.bz2 scummvm-rg350-98a949f5b74753543cef43975ea56ede7047e739.zip |
Commit patch #1171517 by salty-horse (save speech and sfx preferences BASS engine in config file)
svn-id: r20063
-rw-r--r-- | base/gameDetector.cpp | 1 | ||||
-rw-r--r-- | sky/control.cpp | 4 | ||||
-rw-r--r-- | sky/sky.cpp | 8 |
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; |