aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/macventure/detection.cpp10
-rw-r--r--engines/macventure/macventure.cpp6
-rw-r--r--engines/macventure/macventure.h16
3 files changed, 25 insertions, 7 deletions
diff --git a/engines/macventure/detection.cpp b/engines/macventure/detection.cpp
index ade07a0853..88fb85d650 100644
--- a/engines/macventure/detection.cpp
+++ b/engines/macventure/detection.cpp
@@ -27,7 +27,13 @@
#include "macventure/macventure.h"
-#include "macventure.h"
+namespace MacVenture {
+
+ const char *MacVentureEngine::getGameFileName() const {
+ return _gameDescription->filesDescriptions[0].fileName;
+ }
+
+}
namespace MacVenture {
@@ -68,6 +74,8 @@ bool MacVentureMetaEngine::createInstance(OSystem * syst, Engine ** engine, cons
}
+
+
} // End of namespace MacVenture
#if PLUGIN_ENABLED_DYNAMIC(MACVENTURE)
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index ef47d93f1a..3f576373e0 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -64,6 +64,10 @@ Common::Error MacVentureEngine::run() {
// Your main even loop should be (invoked from) here.
debug("MacVentureEngine::go: Hello, World!");
+ _resourceManager = new Common::MacResManager();
+ if (!_resourceManager->open(getGameFileName()))
+ error("Could not open %s as a resource fork", getGameFileName());
+
_shouldQuit = false;
while (!_shouldQuit) {
processEvents();
@@ -90,4 +94,6 @@ void MacVentureEngine::processEvents() {
}
}
}
+
+
} // End of namespace MacVenture
diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h
index 5f655b9e59..9be560c46e 100644
--- a/engines/macventure/macventure.h
+++ b/engines/macventure/macventure.h
@@ -23,14 +23,11 @@
#ifndef MACVENTURE_H
#define MACVENTURE_H
+#include "engines/engine.h"
#include "common/debug.h"
#include "common/random.h"
+#include "common/macresman.h"
-#include "engines/engine.h"
-
-#include "graphics/managed_surface.h"
-#include "graphics/macgui/macwindowmanager.h"
-
#include "gui/debugger.h"
#include "macventure/gui.h"
@@ -64,15 +61,22 @@ public:
private:
void processEvents();
-private:
+private: // Attributes
+
const ADGameDescription *_gameDescription;
Common::RandomSource *_rnd;
+
+ Common::MacResManager *_resourceManager;
Console *_debugger;
Gui *_gui;
bool _shouldQuit;
+
+private: // Methods
+
+ const char* getGameFileName() const;
};