aboutsummaryrefslogtreecommitdiff
path: root/gameDetector.cpp
diff options
context:
space:
mode:
authorNicolas Noble2002-05-07 05:12:39 +0000
committerNicolas Noble2002-05-07 05:12:39 +0000
commit76370a99c9eeab5b74b4d09f1e6e8c59137c88ba (patch)
treeba2c504ddb956b3499e2e514433642de1f1d6001 /gameDetector.cpp
parent16842878bafacdf84d0ba9d058ed1898a77fbd95 (diff)
downloadscummvm-rg350-76370a99c9eeab5b74b4d09f1e6e8c59137c88ba.tar.gz
scummvm-rg350-76370a99c9eeab5b74b4d09f1e6e8c59137c88ba.tar.bz2
scummvm-rg350-76370a99c9eeab5b74b4d09f1e6e8c59137c88ba.zip
Sorted the updateconfig() fonction to match the command line parsing.
BTW Endy, if you add an config-file option, you better add it to the updateconfig() fonction, otherwise it won't reload =)) svn-id: r4223
Diffstat (limited to 'gameDetector.cpp')
-rw-r--r--gameDetector.cpp47
1 files changed, 25 insertions, 22 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp
index 6b1bce0fd4..26f9de269d 100644
--- a/gameDetector.cpp
+++ b/gameDetector.cpp
@@ -75,46 +75,49 @@ void GameDetector::updateconfig()
else
_amiga = false;
+ if ((val = scummcfg->get("cdrom")))
+ _cdrom = atoi(val);
+
+ if ((val = scummcfg->get("music_driver")))
+ if (!parseMusicDriver(val)) {
+ printf("Error in the config file: invalid music_driver.\n");
+ printf(USAGE_STRING);
+ exit(-1);
+ }
+
if ((val = scummcfg->get("fullscreen", "scummvm")))
if (!scumm_stricmp(val, "true"))
_fullScreen = true;
else
_fullScreen = false;
- if ((val = scummcfg->get("path")))
- _gameDataPath = Scumm::Strdup(val);
-
- if ((val = scummcfg->get("tempo")))
- _gameTempo = strtol(val, NULL, 0);
+ if ((val = scummcfg->get("gfx_mode")))
+ if ((_gfx_mode = parseGraphicsMode(val)) == -1) {
+ printf("Error in the config file: invalid gfx_mode.\n");
+ printf(USAGE_STRING);
+ exit(-1);
+ }
if ((val = scummcfg->get("music_volume")))
_music_volume = atoi(val);
- if ((val = scummcfg->get("sfx_volume")))
- _sfx_volume = atoi(val);
-
if ((val = scummcfg->get("nosubtitles")))
if (!scumm_stricmp(val, "true"))
_noSubtitles = true;
else
_noSubtitles = false;
- if ((val = scummcfg->get("music_driver")))
- if (!parseMusicDriver(val)) {
- printf("Error in the config file: invalid music_driver.\n");
- printf(USAGE_STRING);
- exit(-1);
- }
+ if ((val = scummcfg->get("path")))
+ _gameDataPath = Scumm::Strdup(val);
- if ((val = scummcfg->get("gfx_mode")))
- if ((_gfx_mode = parseGraphicsMode(val)) == -1) {
- printf("Error in the config file: invalid gfx_mode.\n");
- printf(USAGE_STRING);
- exit(-1);
- }
+ if ((val = scummcfg->get("sfx_volume")))
+ _sfx_volume = atoi(val);
- if ((val = scummcfg->get("cdrom")))
- _cdrom = atoi(val);
+ if ((val = scummcfg->get("tempo")))
+ _gameTempo = strtol(val, NULL, 0);
+
+ if ((val = scummcfg->get("talkspeed")))
+ _talkspeed = atoi(val);
}
void GameDetector::parseCommandLine(int argc, char **argv)