aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_v1.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-01-27 15:30:53 +0000
committerJohannes Schickel2008-01-27 15:30:53 +0000
commitfec6e22cc92358b08d4e0f62e5db18119e5f2e6d (patch)
tree892f345ecfb354870ff72abcedc98dadaa3f0a1b /engines/kyra/gui_v1.cpp
parentfa5271d8366b40f20d645b31d5e3dad188a515e0 (diff)
downloadscummvm-rg350-fec6e22cc92358b08d4e0f62e5db18119e5f2e6d.tar.gz
scummvm-rg350-fec6e22cc92358b08d4e0f62e5db18119e5f2e6d.tar.bz2
scummvm-rg350-fec6e22cc92358b08d4e0f62e5db18119e5f2e6d.zip
- slightly refactored user settings handling
- added user some settings handling for HoF svn-id: r30653
Diffstat (limited to 'engines/kyra/gui_v1.cpp')
-rw-r--r--engines/kyra/gui_v1.cpp93
1 files changed, 0 insertions, 93 deletions
diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp
index d51f1e2fee..6c9b822955 100644
--- a/engines/kyra/gui_v1.cpp
+++ b/engines/kyra/gui_v1.cpp
@@ -37,99 +37,6 @@
namespace Kyra {
-void KyraEngine_v1::registerDefaultSettings() {
- // Most settings already have sensible defaults. This one, however, is
- // specific to the Kyra engine.
- ConfMan.registerDefault("walkspeed", 2);
- ConfMan.registerDefault("cdaudio", (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98));
-}
-
-void KyraEngine_v1::readSettings() {
- int talkspeed = ConfMan.getInt("talkspeed");
-
- // The default talk speed is 60. This should be mapped to "Normal".
-
- if (talkspeed == 0)
- _configTextspeed = 3; // Clickable
- if (talkspeed <= 50)
- _configTextspeed = 0; // Slow
- else if (talkspeed <= 150)
- _configTextspeed = 1; // Normal
- else
- _configTextspeed = 2; // Fast
-
- _configWalkspeed = ConfMan.getInt("walkspeed");
- _configMusic = ConfMan.getBool("music_mute") ? 0 : ((ConfMan.getBool("cdaudio") && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) ? 2 : 1);
- _configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1;
-
- _sound->enableMusic(_configMusic);
- _sound->enableSFX(_configSounds);
-
- bool speechMute = ConfMan.getBool("speech_mute");
- bool subtitles = ConfMan.getBool("subtitles");
-
- if (!speechMute && subtitles)
- _configVoice = 2; // Voice & Text
- else if (!speechMute && !subtitles)
- _configVoice = 1; // Voice only
- else
- _configVoice = 0; // Text only
-
- setWalkspeed(_configWalkspeed);
-}
-
-void KyraEngine_v1::writeSettings() {
- bool speechMute, subtitles;
- int talkspeed;
-
- switch (_configTextspeed) {
- case 0: // Slow
- talkspeed = 1;
- break;
- case 1: // Normal
- talkspeed = 60;
- break;
- case 2: // Fast
- talkspeed = 255;
- break;
- default: // Clickable
- talkspeed = 0;
- break;
- }
-
- ConfMan.setInt("talkspeed", talkspeed);
- ConfMan.setInt("walkspeed", _configWalkspeed);
- ConfMan.setBool("music_mute", _configMusic == 0);
- ConfMan.setBool("cdaudio", _configMusic == 2);
- ConfMan.setBool("sfx_mute", _configSounds == 0);
-
- switch (_configVoice) {
- case 0: // Text only
- speechMute = true;
- subtitles = true;
- break;
- case 1: // Voice only
- speechMute = false;
- subtitles = false;
- break;
- default: // Voice & Text
- speechMute = false;
- subtitles = true;
- break;
- }
-
- if (!_configMusic)
- _sound->beginFadeOut();
-
- _sound->enableMusic(_configMusic);
- _sound->enableSFX(_configSounds);
-
- ConfMan.setBool("speech_mute", speechMute);
- ConfMan.setBool("subtitles", subtitles);
-
- ConfMan.flushToDisk();
-}
-
void KyraEngine_v1::initMainButtonList() {
_haveScrollButtons = false;
_buttonList = &_buttonData[0];