aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/access.cpp17
-rw-r--r--engines/access/access.h4
-rw-r--r--engines/access/bubble_box.cpp16
-rw-r--r--engines/access/bubble_box.h4
4 files changed, 30 insertions, 11 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 996780dfe7..af3b2cc089 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -106,6 +106,10 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
AccessEngine::~AccessEngine() {
delete _animation;
delete _bubbleBox;
+ delete _helpBox;
+ delete _travelBox;
+ delete _invBox;
+ delete _aboutBox;
delete _char;
delete _debugger;
delete _events;
@@ -151,7 +155,18 @@ void AccessEngine::initialize() {
// Create sub-objects of the engine
_animation = new AnimationManager(this);
- _bubbleBox = new BubbleBox(this);
+ _bubbleBox = new BubbleBox(this, TYPE_2, 64, 32, 130, 122, 0, 0, 0, 0, "");
+ if (getGameID() == GType_MartianMemorandum) {
+ _helpBox = new BubbleBox(this, TYPE_1, 64, 24, 146, 122, 1, 32, 2, 76, "HELP");
+ _travelBox = new BubbleBox(this, TYPE_1, 64, 32, 194, 122, 1, 24, 2, 74, "TRAVEL");
+ _invBox = new BubbleBox(this, TYPE_1, 64, 32, 146, 122, 1, 32, 2, 76, "INVENTORY");
+ _aboutBox = new BubbleBox(this, TYPE_1, 64, 32, 194, 122, 1, 32, 2, 76, "ASK ABOUT");
+ } else {
+ _helpBox = nullptr;
+ _travelBox = nullptr;
+ _invBox = nullptr;
+ _aboutBox = nullptr;
+ }
_char = new CharManager(this);
_debugger = Debugger::init(this);
_events = new EventsManager(this);
diff --git a/engines/access/access.h b/engines/access/access.h
index e26dce1de6..3d839f64a3 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -137,6 +137,10 @@ protected:
public:
AnimationManager *_animation;
BubbleBox *_bubbleBox;
+ BubbleBox *_helpBox;
+ BubbleBox *_travelBox;
+ BubbleBox *_invBox;
+ BubbleBox *_aboutBox;
CharManager *_char;
Debugger *_debugger;
EventsManager *_events;
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index e37a8142e8..7ecba7b027 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -26,14 +26,14 @@
namespace Access {
-BubbleBox::BubbleBox(AccessEngine *vm) : Manager(vm) {
- _type = TYPE_2;
- _bounds = Common::Rect(64, 32, 64 + 130, 32 + 122);
- _bubbleDisplStr = "";
- _fieldD = 0;
- _fieldE = 0;
- _fieldF = 0;
- _field10 = 0;
+ BubbleBox::BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w, int h, int val1, int val2, int val3, int val4, Common::String title) : Manager(vm) {
+ _type = type;
+ _bounds = Common::Rect(x, y, x + w, y + h);
+ _bubbleDisplStr = title;
+ _fieldD = val1;
+ _fieldE = val2;
+ _fieldF = val3;
+ _field10 = val4;
}
void BubbleBox::load(Common::SeekableReadStream *stream) {
diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h
index 0130344c7e..8bfbc40e0c 100644
--- a/engines/access/bubble_box.h
+++ b/engines/access/bubble_box.h
@@ -36,7 +36,7 @@ namespace Access {
class AccessEngine;
-enum BoxType { TYPE_2 = 2, TYPE_4 = 4 };
+enum BoxType { TYPE_1 = 1, TYPE_2 = 2, TYPE_4 = 4 };
class BubbleBox : public Manager {
private:
@@ -56,7 +56,7 @@ public:
Common::Array<Common::Rect> _bubbles;
public:
- BubbleBox(AccessEngine *vm);
+ BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w, int h, int val1, int val2, int val3, int val4, Common::String title);
void load(Common::SeekableReadStream *stream);