diff options
author | Strangerke | 2015-11-30 00:34:43 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:33:44 +0100 |
commit | 771e558d905ee467280482d62697dc66d969ed2b (patch) | |
tree | e9eeada2ac2552d74c7213b00ef45270721b0a6e /engines/lab/lab.cpp | |
parent | 0c84355f4ae5651e7667b9aa0d2d3c6c28f21496 (diff) | |
download | scummvm-rg350-771e558d905ee467280482d62697dc66d969ed2b.tar.gz scummvm-rg350-771e558d905ee467280482d62697dc66d969ed2b.tar.bz2 scummvm-rg350-771e558d905ee467280482d62697dc66d969ed2b.zip |
LAB: Move the global variable g_resource to the main engine class
Diffstat (limited to 'engines/lab/lab.cpp')
-rw-r--r-- | engines/lab/lab.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index b2e779f07e..3792f2b0d3 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -73,6 +73,10 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) _nextKeyOut = 0; _isHiRes = false; + + _event = nullptr; + _resource = nullptr; + //const Common::FSNode gameDataDir(ConfMan.get("path")); //SearchMan.addSubDirectoryMatching(gameDataDir, "game"); //SearchMan.addSubDirectoryMatching(gameDataDir, "game/pict"); @@ -83,6 +87,9 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc) LabEngine::~LabEngine() { // Remove all of our debug levels here DebugMan.clearAllDebugChannels(); + + delete _event; + delete _resource; } Common::Error LabEngine::run() { @@ -92,9 +99,9 @@ Common::Error LabEngine::run() { initGraphics(640, 480, true); _event = new EventManager(this); + _resource = new Resource(this); g_music = new Music(); - g_resource = new Resource(); if (getPlatform() == Common::kPlatformWindows) { // Check if this is the Wyrmkeep trial |