diff options
author | Paul Gilbert | 2015-05-15 20:02:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-15 20:02:40 -0400 |
commit | 62ce7a9c839f82121c14ce8357d107bc1ba70244 (patch) | |
tree | 7757c7cd164bdc170c0cc3d23d781b9fd439b8d7 /engines/sherlock/sherlock.cpp | |
parent | d9a7d87b1908da6f249a1b16110ae3fd3cc9ed07 (diff) | |
download | scummvm-rg350-62ce7a9c839f82121c14ce8357d107bc1ba70244.tar.gz scummvm-rg350-62ce7a9c839f82121c14ce8357d107bc1ba70244.tar.bz2 scummvm-rg350-62ce7a9c839f82121c14ce8357d107bc1ba70244.zip |
SHERLOCK: Use ConfMan.registerDefault to simply reading options
Diffstat (limited to 'engines/sherlock/sherlock.cpp')
-rw-r--r-- | engines/sherlock/sherlock.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp index d6fe0c69aa..95da79d988 100644 --- a/engines/sherlock/sherlock.cpp +++ b/engines/sherlock/sherlock.cpp @@ -106,7 +106,7 @@ Common::Error SherlockEngine::run() { initialize(); // Flag for whether to show original saves dialog rather than the ScummVM GMM - _showOriginalSavesDialog = ConfMan.hasKey("originalsaveload") && ConfMan.getBool("originalsaveload"); + _showOriginalSavesDialog = ConfMan.getBool("originalsaveload"); // If requested, load a savegame instead of showing the intro if (ConfMan.hasKey("save_slot")) { @@ -214,17 +214,18 @@ void SherlockEngine::loadConfig() { // Load sound settings syncSoundSettings(); - // Load other settings - if (ConfMan.hasKey("font")) - _screen->setFont(ConfMan.getInt("font")); - if (ConfMan.hasKey("fade_style")) - _screen->_fadeStyle = ConfMan.getBool("fade_style"); - if (ConfMan.hasKey("help_style")) - _ui->_helpStyle = ConfMan.getBool("help_style"); - if (ConfMan.hasKey("window_style")) - _ui->_windowStyle = ConfMan.getInt("window_style"); - if (ConfMan.hasKey("portraits_on")) - _people->_portraitsOn = ConfMan.getBool("portraits_on"); + ConfMan.registerDefault("font", 1); + ConfMan.registerDefault("fade_style", false); + ConfMan.registerDefault("help_style", false); + ConfMan.registerDefault("window_style", 1); + ConfMan.registerDefault("portraits_on", true); + ConfMan.registerDefault("originalsaveload", false); + + _screen->setFont(ConfMan.getInt("font")); + _screen->_fadeStyle = ConfMan.getBool("fade_style"); + _ui->_helpStyle = ConfMan.getBool("help_style"); + _ui->_windowStyle = ConfMan.getInt("window_style"); + _people->_portraitsOn = ConfMan.getBool("portraits_on"); } /** |