aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/macventure/gui.cpp7
-rw-r--r--engines/macventure/macventure.cpp79
-rw-r--r--engines/macventure/macventure.h7
3 files changed, 53 insertions, 40 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 3aac7e1ada..7b6c7e3486 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -338,7 +338,12 @@ bool Gui::loadWindows() {
void Gui::loadInventoryWindow() {
WindowData data;
- data.bounds = Common::Rect(5, 30, 125, 190);
+ GlobalSettings settings = _engine->getGlobalSettings();
+ data.bounds = Common::Rect(
+ settings.invLeft,
+ settings.invTop,
+ settings.invLeft + settings.invWidth,
+ settings.invTop + settings.invHeight);
data.title = "Inventory";
data.visible = true;
data.hasCloseBox = false;
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 6e2d7edaab..5827ecc370 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -93,6 +93,47 @@ Common::Error MacVentureEngine::run() {
return Common::kNoError;
}
+void MacVentureEngine::requestQuit() {
+ _shouldQuit = true;
+}
+
+void MacVentureEngine::requestUnpause() {
+ _paused = false;
+}
+
+const GlobalSettings& MacVentureEngine::getGlobalSettings() {
+ return _globalSettings;
+}
+
+// Data retrieval
+
+bool MacVentureEngine::isPaused() {
+ return _paused;
+}
+
+Common::String MacVentureEngine::getCommandsPausedString() {
+ return Common::String("Click to continue");
+}
+
+void MacVentureEngine::processEvents() {
+ Common::Event event;
+
+ while (_eventMan->pollEvent(event)) {
+ if (_gui->processEvent(event))
+ continue;
+
+ switch (event.type) {
+ case Common::EVENT_QUIT:
+ _shouldQuit = true;
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+// Data loading
+
bool MacVentureEngine::loadGlobalSettings() {
Common::MacResIDArray resArray;
Common::SeekableReadStream *res;
@@ -130,7 +171,8 @@ bool MacVentureEngine::loadGlobalSettings() {
_globalSettings.cmdArgCnts = new uint8[_globalSettings.numCommands];
res->read(_globalSettings.cmdArgCnts, _globalSettings.numCommands);
-
+ _globalSettings.commands = new uint8[_globalSettings.numCommands];
+ res->read(_globalSettings.commands, _globalSettings.numCommands);
return true;
}
@@ -138,40 +180,5 @@ bool MacVentureEngine::loadGlobalSettings() {
return false;
}
-void MacVentureEngine::requestQuit() {
- _shouldQuit = true;
-}
-
-void MacVentureEngine::requestUnpause() {
- _paused = false;
-}
-
-// Data retrieval
-
-bool MacVentureEngine::isPaused() {
- return _paused;
-}
-
-Common::String MacVentureEngine::getCommandsPausedString() {
- return Common::String("Click to continue");
-}
-
-void MacVentureEngine::processEvents() {
- Common::Event event;
-
- while (_eventMan->pollEvent(event)) {
- if (_gui->processEvent(event))
- continue;
-
- switch (event.type) {
- case Common::EVENT_QUIT:
- _shouldQuit = true;
- break;
- default:
- break;
- }
- }
-}
-
} // End of namespace MacVenture
diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h
index ffc1c2a9f2..da1f66a277 100644
--- a/engines/macventure/macventure.h
+++ b/engines/macventure/macventure.h
@@ -82,16 +82,17 @@ public:
void requestQuit();
void requestUnpause();
- // Data loading
- bool loadGlobalSettings();
-
// Data retrieval
bool isPaused();
Common::String getCommandsPausedString();
+ const GlobalSettings& getGlobalSettings();
private:
void processEvents();
+ // Data loading
+ bool loadGlobalSettings();
+
private: // Attributes
const ADGameDescription *_gameDescription;