[Scummvm-cvs-logs] SF.net SVN: scummvm: [22344] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu May 4 15:53:01 CEST 2006
Revision: 22344
Author: fingolfin
Date: 2006-05-04 15:52:18 -0700 (Thu, 04 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22344&view=rev
Log Message:
-----------
Turned the last remaining few GameDetector methods into static methods
Modified Paths:
--------------
scummvm/trunk/backends/dc/DCLauncherDialog.h
scummvm/trunk/backends/dc/dcmain.cpp
scummvm/trunk/backends/dc/selector.cpp
scummvm/trunk/backends/morphos/morphos_start.cpp
scummvm/trunk/backends/wince/CELauncherDialog.cpp
scummvm/trunk/backends/wince/CELauncherDialog.h
scummvm/trunk/base/gameDetector.h
scummvm/trunk/base/main.cpp
scummvm/trunk/gui/launcher.cpp
scummvm/trunk/gui/launcher.h
Modified: scummvm/trunk/backends/dc/DCLauncherDialog.h
===================================================================
--- scummvm/trunk/backends/dc/DCLauncherDialog.h 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/backends/dc/DCLauncherDialog.h 2006-05-04 22:52:18 UTC (rev 22344)
@@ -22,11 +22,8 @@
*/
class DCLauncherDialog {
- private:
- GameDetector &_detector;
-
public:
- DCLauncherDialog(GameDetector &d) : _detector(d) {}
+ DCLauncherDialog() {}
int runModal();
};
Modified: scummvm/trunk/backends/dc/dcmain.cpp
===================================================================
--- scummvm/trunk/backends/dc/dcmain.cpp 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/backends/dc/dcmain.cpp 2006-05-04 22:52:18 UTC (rev 22344)
@@ -224,7 +224,7 @@
ConfMan.set("path", dir, base);
// Set the target.
- _detector.setTarget(base);
+ GameDetector::setTarget(base);
return 0;
}
Modified: scummvm/trunk/backends/dc/selector.cpp
===================================================================
--- scummvm/trunk/backends/dc/selector.cpp 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/backends/dc/selector.cpp 2006-05-04 22:52:18 UTC (rev 22344)
@@ -24,7 +24,6 @@
#include <common/stdafx.h>
#include <common/scummsys.h>
#include <base/engine.h>
-#include <base/gameDetector.h>
#include <base/plugins.h>
#include <backends/fs/fs.h>
#include "dc.h"
Modified: scummvm/trunk/backends/morphos/morphos_start.cpp
===================================================================
--- scummvm/trunk/backends/morphos/morphos_start.cpp 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/backends/morphos/morphos_start.cpp 2006-05-04 22:52:18 UTC (rev 22344)
@@ -36,7 +36,6 @@
#include "common/stdafx.h"
#include "scumm/scumm.h"
-#include "base/gameDetector.h"
#include "base/main.h"
#include "common/scaler.h"
#include "sound/mididrv.h"
Modified: scummvm/trunk/backends/wince/CELauncherDialog.cpp
===================================================================
--- scummvm/trunk/backends/wince/CELauncherDialog.cpp 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/backends/wince/CELauncherDialog.cpp 2006-05-04 22:52:18 UTC (rev 22344)
@@ -72,7 +72,7 @@
};
-CELauncherDialog::CELauncherDialog(GameDetector &detector) : GUI::LauncherDialog(detector) {
+CELauncherDialog::CELauncherDialog() : GUI::LauncherDialog() {
}
void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
Modified: scummvm/trunk/backends/wince/CELauncherDialog.h
===================================================================
--- scummvm/trunk/backends/wince/CELauncherDialog.h 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/backends/wince/CELauncherDialog.h 2006-05-04 22:52:18 UTC (rev 22344)
@@ -25,14 +25,13 @@
#include "backends/fs/fs.h"
-#include "base/gameDetector.h"
#include "base/plugins.h"
#include "gui/launcher.h"
class CELauncherDialog : public GUI::LauncherDialog {
public:
- CELauncherDialog(GameDetector &detector);
+ CELauncherDialog();
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
void addGame();
Modified: scummvm/trunk/base/gameDetector.h
===================================================================
--- scummvm/trunk/base/gameDetector.h 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/base/gameDetector.h 2006-05-04 22:52:18 UTC (rev 22344)
@@ -38,14 +38,14 @@
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
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/base/main.cpp 2006-05-04 22:52:18 UTC (rev 22344)
@@ -137,7 +137,7 @@
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 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
PluginManager::instance().loadPlugins();
}
- running = launcherDialog(detector, system);
+ running = launcherDialog(system);
}
// Deinit the timer
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/gui/launcher.cpp 2006-05-04 22:52:18 UTC (rev 22344)
@@ -434,8 +434,8 @@
#pragma mark -
-LauncherDialog::LauncherDialog(GameDetector &detector)
- : Dialog(0, 0, 320, 200), _detector(detector) {
+LauncherDialog::LauncherDialog()
+ : Dialog(0, 0, 320, 200) {
_drawingHints |= THEME_HINT_MAIN_DIALOG;
const int screenW = g_system->getOverlayWidth();
@@ -737,7 +737,7 @@
case kListItemDoubleClickedCmd:
// Print out what was selected
assert(item >= 0);
- _detector.setTarget(_domains[item]);
+ GameDetector::setTarget(_domains[item]);
close();
break;
case kListSelectionChangedCmd:
Modified: scummvm/trunk/gui/launcher.h
===================================================================
--- scummvm/trunk/gui/launcher.h 2006-05-04 21:44:36 UTC (rev 22343)
+++ scummvm/trunk/gui/launcher.h 2006-05-04 22:52:18 UTC (rev 22344)
@@ -25,8 +25,6 @@
#include "gui/dialog.h"
#include "common/str.h"
-class GameDetector;
-
namespace GUI {
class BrowserDialog;
@@ -37,7 +35,7 @@
typedef Common::String String;
typedef Common::StringList StringList;
public:
- LauncherDialog(GameDetector &detector);
+ LauncherDialog();
~LauncherDialog();
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
@@ -51,7 +49,6 @@
GraphicsWidget *_logo;
#endif
StringList _domains;
- GameDetector &_detector;
BrowserDialog *_browser;
virtual void handleScreenChanged();
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