aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-05-04 23:37:50 +0000
committerMax Horn2006-05-04 23:37:50 +0000
commit2dcf2c36ad6f71839c333bbed58a732cd00a4189 (patch)
tree82dcbe0ad87141565d2d270178570d1119fe01be
parent64d9224b5493c404ea1b6ebb3e9693e5c1f4abfb (diff)
downloadscummvm-rg350-2dcf2c36ad6f71839c333bbed58a732cd00a4189.tar.gz
scummvm-rg350-2dcf2c36ad6f71839c333bbed58a732cd00a4189.tar.bz2
scummvm-rg350-2dcf2c36ad6f71839c333bbed58a732cd00a4189.zip
Removed last traces of class GameDetector
svn-id: r22348
-rw-r--r--base/main.cpp6
-rw-r--r--base/options.cpp10
-rw-r--r--base/options.h20
3 files changed, 20 insertions, 16 deletions
diff --git a/base/main.cpp b/base/main.cpp
index c708ff4cb5..77ffe10605 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -399,11 +399,11 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
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 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
// 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?
diff --git a/base/options.cpp b/base/options.cpp
index accbcf67cf..315bc3a8a4 100644
--- a/base/options.cpp
+++ b/base/options.cpp
@@ -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 @@ static void usage(const char *s, ...) {
exit(1);
}
-void GameDetector::registerDefaults() {
+void registerDefaults() {
// Graphics
ConfMan.registerDefault("fullscreen", false);
@@ -315,7 +317,7 @@ void GameDetector::registerDefaults() {
}
-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 @@ unknownOption:
}
-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 @@ void GameDetector::processSettings(Common::String &target, Common::StringMap &se
ConfMan.set(key, value, Common::ConfigManager::kTransientDomain);
}
}
+
+} // End of namespace Base
diff --git a/base/options.h b/base/options.h
index 93f3668137..a48303083c 100644
--- a/base/options.h
+++ b/base/options.h
@@ -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