[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.59,1.60

Nicolas Noble pixels at users.sourceforge.net
Mon May 6 22:13:03 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv15628

Modified Files:
	gameDetector.cpp 
Log Message:
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 =))


Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- gameDetector.cpp	6 May 2002 19:57:12 -0000	1.59
+++ gameDetector.cpp	7 May 2002 05:12:39 -0000	1.60
@@ -75,46 +75,49 @@
 		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)





More information about the Scummvm-git-logs mailing list