[Scummvm-cvs-logs] CVS: scummvm/base gameDetector.cpp,1.46,1.47 gameDetector.h,1.18,1.19 main.cpp,1.18,1.19
Max Horn
fingolfin at users.sourceforge.net
Sat Nov 1 18:19:07 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/wince wince.cpp,1.23,1.24
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common debugger.cpp,1.1,1.2 debugger.h,1.1,1.2 module.mk,1.11,1.12 singleton.h,1.1,1.2 system.h,1.45,1.46
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv15749/base
Modified Files:
gameDetector.cpp gameDetector.h main.cpp
Log Message:
turned NewGui into a singleton, and made OSystem a pseudo-singleton; added Widget::findWidget (preparing to add support for nested widgets, for the tab widget)
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gameDetector.cpp 1 Nov 2003 19:12:10 -0000 1.46
+++ gameDetector.cpp 2 Nov 2003 02:18:12 -0000 1.47
@@ -22,7 +22,6 @@
#include "stdafx.h"
-#include "backends/intern.h"
#include "base/engine.h"
#include "base/gameDetector.h"
#include "base/plugins.h"
@@ -585,31 +584,6 @@
}
return true;
-}
-
-OSystem *GameDetector::createSystem() {
- int gfx_mode = parseGraphicsMode(ConfMan.get("gfx_mode")); // FIXME: Get rid of this again!
-
-#if defined(USE_NULL_DRIVER)
- return OSystem_NULL_create();
-#elif defined(__DC__)
- return OSystem_Dreamcast_create();
-#elif defined(X11_BACKEND)
- return OSystem_X11_create();
-#elif defined(__MORPHOS__)
- return OSystem_MorphOS_create(gfx_mode, ConfMan.getBool("fullscreen"));
-#elif defined(_WIN32_WCE)
- return OSystem_WINCE3_create();
-#elif defined(MACOS_CARBON)
- return OSystem_MAC_create(gfx_mode, ConfMan.getBool("fullscreen"));
-#elif defined(__GP32__) // ph0x
- return OSystem_GP32_create(GFX_NORMAL, true);
-#elif defined(__PALM_OS__) //chrilith
- return OSystem_PALMOS_create(gfx_mode, ConfMan.getBool("fullscreen"));
-#else
- /* SDL is the default driver for now */
- return OSystem_SDL_create(gfx_mode);
-#endif
}
Engine *GameDetector::createEngine(OSystem *sys) {
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- gameDetector.h 28 Oct 2003 17:07:22 -0000 1.18
+++ gameDetector.h 2 Nov 2003 02:18:12 -0000 1.19
@@ -74,7 +74,6 @@
Engine *createEngine(OSystem *system);
- static OSystem *createSystem();
static SoundMixer *createMixer();
static MidiDriver *createMidi(int midiDriver);
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- main.cpp 1 Nov 2003 19:13:48 -0000 1.18
+++ main.cpp 2 Nov 2003 02:18:12 -0000 1.19
@@ -83,9 +83,6 @@
const char *gScummVMFullVersion = "ScummVM 0.5.4cvs (" __DATE__ " " __TIME__ ")";
-NewGui *g_gui = 0;
-OSystem *g_system = 0;
-
#if defined(WIN32) && defined(NO_CONSOLE)
#include <cstdio>
#define STDOUT_FILE TEXT("stdout.txt")
@@ -186,7 +183,7 @@
system->set_palette(dummy_palette, 0, 16);
- LauncherDialog dlg(g_gui, detector);
+ LauncherDialog dlg(detector);
dlg.runModal();
}
@@ -244,8 +241,7 @@
detector.parseCommandLine(argc, argv);
// Create the system object
- OSystem *system = detector.createSystem();
- g_system = system;
+ OSystem *system = OSystem::instance();
// Create the timer services
g_timer = new Timer(system);
@@ -254,9 +250,6 @@
prop.caption = gScummVMFullVersion;
system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop);
- // Create the GUI manager
- g_gui = new NewGui(system);
-
// Unless a game was specified, show the launcher dialog
if (detector._targetName.isEmpty())
launcherDialog(detector, system);
@@ -306,8 +299,6 @@
// Free up memory
delete engine;
}
-
- delete g_gui;
// ...and quit (the return 0 should never be reached)
system->quit();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/wince wince.cpp,1.23,1.24
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common debugger.cpp,1.1,1.2 debugger.h,1.1,1.2 module.mk,1.11,1.12 singleton.h,1.1,1.2 system.h,1.45,1.46
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list