[Scummvm-cvs-logs] SF.net SVN: scummvm: [22348] scummvm/trunk/base

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu May 4 16:38:01 CEST 2006


Revision: 22348
Author:   fingolfin
Date:     2006-05-04 16:37:50 -0700 (Thu, 04 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22348&view=rev

Log Message:
-----------
Removed last traces of class GameDetector

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
    scummvm/trunk/base/options.cpp
    scummvm/trunk/base/options.h
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-05-04 23:29:56 UTC (rev 22347)
+++ scummvm/trunk/base/main.cpp	2006-05-04 23:37:50 UTC (rev 22348)
@@ -399,11 +399,11 @@
 	OSystem &system = *g_system;
 	
 	// Register config manager defaults
-	GameDetector::registerDefaults();
+	Base::registerDefaults();
 
 	// Parse the command line
 	Common::StringMap settings;
-	command = GameDetector::parseCommandLine(settings, argc, argv);
+	command = Base::parseCommandLine(settings, argc, argv);
 
 	// Load the config file (possibly overriden via command line):
 	if (settings.contains("config")) {
@@ -457,7 +457,7 @@
 	
 
 	// Process the remaining command line settings
-	GameDetector::processSettings(command, settings);
+	Base::processSettings(command, settings);
 
 #if defined(__SYMBIAN32__) || defined(_WIN32_WCE)
 	// init keymap support here: we wanna move this somewhere else?

Modified: scummvm/trunk/base/options.cpp
===================================================================
--- scummvm/trunk/base/options.cpp	2006-05-04 23:29:56 UTC (rev 22347)
+++ scummvm/trunk/base/options.cpp	2006-05-04 23:37:50 UTC (rev 22348)
@@ -48,6 +48,8 @@
 #define DEFAULT_SAVE_PATH "Savegames"
 #endif
 
+namespace Base {
+
 static const char USAGE_STRING[] =
 	"%s: %s\n"
 	"Usage: %s [OPTIONS]... [GAME]\n"
@@ -150,7 +152,7 @@
 	exit(1);
 }
 
-void GameDetector::registerDefaults() {
+void registerDefaults() {
 
 	// Graphics
 	ConfMan.registerDefault("fullscreen", false);
@@ -315,7 +317,7 @@
 	}
 
 
-Common::String GameDetector::parseCommandLine(Common::StringMap &settings, int argc, char **argv) {
+Common::String parseCommandLine(Common::StringMap &settings, int argc, char **argv) {
 	const char *s, *s2;
 	
 	// argv[0] contains the name of the executable.
@@ -519,7 +521,7 @@
 }
 
 
-void GameDetector::processSettings(Common::String &target, Common::StringMap &settings) {
+void processSettings(Common::String &target, Common::StringMap &settings) {
 
 	// If a target was specified, check whether there is either a game
 	// domain (i.e. a target) matching this argument, or alternatively
@@ -562,3 +564,5 @@
 		ConfMan.set(key, value, Common::ConfigManager::kTransientDomain);
 	}
 }
+
+} // End of namespace Base

Modified: scummvm/trunk/base/options.h
===================================================================
--- scummvm/trunk/base/options.h	2006-05-04 23:29:56 UTC (rev 22347)
+++ scummvm/trunk/base/options.h	2006-05-04 23:37:50 UTC (rev 22348)
@@ -21,18 +21,18 @@
  *
  */
 
-#ifndef BASE_GAMEDETECTOR_H
-#define BASE_GAMEDETECTOR_H
+#ifndef BASE_OPTIONS_H
+#define BASE_OPTIONS_H
 
 #include "common/str.h"
 #include "common/config-manager.h"
-#include "base/game.h"
 
-class GameDetector {
-public:
-	static void registerDefaults();
-	static Common::String parseCommandLine(Common::StringMap &settings, int argc, char **argv);
-	static void processSettings(Common::String &target, Common::StringMap &settings);
-};
+namespace Base {
 
+void registerDefaults();
+Common::String parseCommandLine(Common::StringMap &settings, int argc, char **argv);
+void processSettings(Common::String &target, Common::StringMap &settings);
+
+} // End of namespace Base
+
 #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list