aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/lab.cpp
diff options
context:
space:
mode:
authorStrangerke2015-11-30 00:34:43 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:44 +0100
commit771e558d905ee467280482d62697dc66d969ed2b (patch)
treee9eeada2ac2552d74c7213b00ef45270721b0a6e /engines/lab/lab.cpp
parent0c84355f4ae5651e7667b9aa0d2d3c6c28f21496 (diff)
downloadscummvm-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.cpp9
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