diff options
author | Max Horn | 2003-11-10 01:04:12 +0000 |
---|---|---|
committer | Max Horn | 2003-11-10 01:04:12 +0000 |
commit | e34f2b8b3321a576c2ae612470d07cb3e7bc91f5 (patch) | |
tree | 350146bd56be39f91232ed50f7fa2d3330011ab3 /base | |
parent | 63c6944492ad4bfa0ffbc811e4d1bad9f8452008 (diff) | |
download | scummvm-rg350-e34f2b8b3321a576c2ae612470d07cb3e7bc91f5.tar.gz scummvm-rg350-e34f2b8b3321a576c2ae612470d07cb3e7bc91f5.tar.bz2 scummvm-rg350-e34f2b8b3321a576c2ae612470d07cb3e7bc91f5.zip |
cut down on unnecessary GameDetector references
svn-id: r11239
Diffstat (limited to 'base')
-rw-r--r-- | base/engine.cpp | 4 | ||||
-rw-r--r-- | base/engine.h | 4 | ||||
-rw-r--r-- | base/gameDetector.cpp | 2 | ||||
-rw-r--r-- | base/gameDetector.h | 3 |
4 files changed, 7 insertions, 6 deletions
diff --git a/base/engine.cpp b/base/engine.cpp index 50bccb4746..4e8bb4a749 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -32,10 +32,10 @@ /* FIXME - BIG HACK for MidiEmu */ Engine *g_engine = 0; -Engine::Engine(GameDetector *detector, OSystem *syst) +Engine::Engine(OSystem *syst) : _system(syst), _gameDataPath(ConfMan.get("path")) { g_engine = this; - _mixer = detector->createMixer(); + _mixer = GameDetector::createMixer(); _timer = g_timer; diff --git a/base/engine.h b/base/engine.h index 9d77668c40..a37cd08198 100644 --- a/base/engine.h +++ b/base/engine.h @@ -30,9 +30,7 @@ extern const char *gScummVMBuildDate; // e.g. "2003-06-24" extern const char *gScummVMFullVersion; // e.g. "ScummVM 0.4.1 (2003-06-24)" class SoundMixer; -class GameDetector; class Timer; -struct GameSettings; class Engine { public: @@ -44,7 +42,7 @@ protected: const Common::String _gameDataPath; public: - Engine(GameDetector *detector, OSystem *syst); + Engine(OSystem *syst); virtual ~Engine(); // Invoke the main engine loop using this method diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index 6dd67aa8bf..ef12840b24 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -500,9 +500,11 @@ bool GameDetector::detectGame() { _game = findGame(realGame, &_plugin); if (_game.gameName) { + _gameName = _game.gameName; printf("Trying to start game '%s'\n", _game.description); return true; } else { + _gameName.clear(); printf("Failed game detection\n"); return false; } diff --git a/base/gameDetector.h b/base/gameDetector.h index 1bad32078d..d57cdb5b06 100644 --- a/base/gameDetector.h +++ b/base/gameDetector.h @@ -64,7 +64,8 @@ public: bool detectMain(); String _targetName; - GameSettings _game; + String _gameName; + GameSettings _game; // TODO: Eventually get rid of _game or at least make it protected const Plugin *_plugin; bool _dumpScripts; |