Skip to content

Commit

Permalink
SHERLOCK: Use ConfMan.registerDefault to simply reading options
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 16, 2015
1 parent d9a7d87 commit 62ce7a9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions engines/sherlock/sherlock.cpp
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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");
}

/**
Expand Down

0 comments on commit 62ce7a9

Please sign in to comment.