diff options
author | Max Horn | 2006-05-04 22:52:18 +0000 |
---|---|---|
committer | Max Horn | 2006-05-04 22:52:18 +0000 |
commit | 6321cfc874ee95b9b2471783a18f4173fb60ab78 (patch) | |
tree | d656ceb19a97ef038c61390e316aa6d50e63c6dc /base | |
parent | c319e972467beb3b824af01bc707ea225c38572e (diff) | |
download | scummvm-rg350-6321cfc874ee95b9b2471783a18f4173fb60ab78.tar.gz scummvm-rg350-6321cfc874ee95b9b2471783a18f4173fb60ab78.tar.bz2 scummvm-rg350-6321cfc874ee95b9b2471783a18f4173fb60ab78.zip |
Turned the last remaining few GameDetector methods into static methods
svn-id: r22344
Diffstat (limited to 'base')
-rw-r--r-- | base/gameDetector.h | 6 | ||||
-rw-r--r-- | base/main.cpp | 17 |
2 files changed, 11 insertions, 12 deletions
diff --git a/base/gameDetector.h b/base/gameDetector.h index ebb642b57d..48714a73d3 100644 --- a/base/gameDetector.h +++ b/base/gameDetector.h @@ -38,14 +38,14 @@ public: GameDetector(); static Common::String parseCommandLine(Common::StringMap &settings, int argc, char **argv); - void processSettings(Common::String &target, Common::StringMap &settings); - const Plugin *detectMain(); + static void processSettings(Common::String &target, Common::StringMap &settings); + static const Plugin *detectMain(); public: static GameDescriptor findGame(const String &gameName, const Plugin **plugin = NULL); //protected: - void setTarget(const String &name); // TODO: This should be protected + static void setTarget(const String &name); // TODO: This should be protected }; #endif diff --git a/base/main.cpp b/base/main.cpp index a3c24ed30c..8ea0dd2688 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -137,7 +137,7 @@ static void setupDummyPalette(OSystem &system) { system.setPalette(dummy_palette, 0, 16); } -static bool launcherDialog(GameDetector &detector, OSystem &system) { +static bool launcherDialog(OSystem &system) { system.beginGFXTransaction(); // Set the user specified graphics mode (if any). @@ -155,11 +155,11 @@ static bool launcherDialog(GameDetector &detector, OSystem &system) { setupDummyPalette(system); #if defined(_WIN32_WCE) - CELauncherDialog dlg(detector); + CELauncherDialog dlg; #elif defined(__DC__) - DCLauncherDialog dlg(detector); + DCLauncherDialog dlg; #else - GUI::LauncherDialog dlg(detector); + GUI::LauncherDialog dlg; #endif return (dlg.runModal() != -1); } @@ -380,8 +380,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // Process the remaining command line settings - GameDetector detector; - detector.processSettings(command, settings); + GameDetector::processSettings(command, settings); #if defined(__SYMBIAN32__) || defined(_WIN32_WCE) // init keymap support here: we wanna move this somewhere else? @@ -408,7 +407,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // Unless a game was specified, show the launcher dialog if (ConfMan.getActiveDomainName().empty()) { - running = launcherDialog(detector, system); + running = launcherDialog(system); // Discard any command line options. Those that affect the graphics // mode etc. already have should have been handled by the backend at @@ -422,7 +421,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // cleanly, so this is now enabled to encourage people to fix bits :) while (running) { // Verify the given game name is a valid supported game - const Plugin *plugin = detector.detectMain(); + const Plugin *plugin = GameDetector::detectMain(); if (plugin) { // Unload all plugins not needed for this game, // to save memory @@ -442,7 +441,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { PluginManager::instance().loadPlugins(); } - running = launcherDialog(detector, system); + running = launcherDialog(system); } // Deinit the timer |