From b27a871f870df854a6db0f4530d4596483927bb1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 2 Nov 2003 02:18:16 +0000 Subject: 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) svn-id: r11045 --- sword2/console.cpp | 2 +- sword2/sword2.cpp | 3 --- sword2/sword2.h | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) (limited to 'sword2') diff --git a/sword2/console.cpp b/sword2/console.cpp index 89d6d26978..db54937152 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -48,7 +48,7 @@ static void Var_set(int var, int val) { } Debugger::Debugger(Sword2Engine *s) - : Common::Debugger(s->_newgui) { + : Common::Debugger() { _vm = s; // Register commands diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp index a823e255d9..1d31f4ef05 100644 --- a/sword2/sword2.cpp +++ b/sword2/sword2.cpp @@ -52,7 +52,6 @@ extern bool isSmartphone(void); #endif -extern NewGui *g_gui; extern uint16 _debugLevel; static const GameSettings sword2_settings[] = { @@ -117,7 +116,6 @@ Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) _detector = detector; g_sword2 = this; - _newgui = NULL; _debugger = NULL; _features = detector->_game.features; _targetName = strdup(detector->_targetName.c_str()); @@ -139,7 +137,6 @@ Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) g_display = _display = new Display(640, 480); gui = new Gui(); - _newgui = g_gui; _debugger = new Debugger(this); _lastPaletteRes = 0; diff --git a/sword2/sword2.h b/sword2/sword2.h index cb71de2772..34f77b7ebd 100644 --- a/sword2/sword2.h +++ b/sword2/sword2.h @@ -34,8 +34,6 @@ enum { GF_DEMO = 1 << 0 }; -class NewGui; - namespace Sword2 { // Bodge for PCF76 version so that their demo CD can be labelled "PCF76" @@ -140,7 +138,6 @@ public: Sound *_sound; Display *_display; - NewGui *_newgui; Debugger *_debugger; Common::RandomSource _rnd; -- cgit v1.2.3