aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBorja Lorente2016-06-20 09:09:10 +0200
committerBorja Lorente2016-08-14 18:29:57 +0200
commitbbf0c62f14326818d135a75bc6f9e58ad59346a1 (patch)
treeb274a4cdfd5801e49809f9e7183d4d55d4f201bb /engines
parent2fbff0e6782759770048c9b9442832e525d001b6 (diff)
downloadscummvm-rg350-bbf0c62f14326818d135a75bc6f9e58ad59346a1.tar.gz
scummvm-rg350-bbf0c62f14326818d135a75bc6f9e58ad59346a1.tar.bz2
scummvm-rg350-bbf0c62f14326818d135a75bc6f9e58ad59346a1.zip
MACVENTURE: Add enqueue text
Diffstat (limited to 'engines')
-rw-r--r--engines/macventure/macventure.cpp16
-rw-r--r--engines/macventure/macventure.h21
2 files changed, 23 insertions, 14 deletions
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 23425d976f..5c8f6b4051 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -112,11 +112,7 @@ Common::Error MacVentureEngine::run() {
processEvents();
if (_prepared) {
- _prepared = false;
-
- if (!_halted) {
- _gui->draw();
- }
+ _prepared = false;
if (_cmdReady || _halted) {
_halted = false;
@@ -137,7 +133,7 @@ Common::Error MacVentureEngine::run() {
}
}
- _gui->drawMenu();
+ _gui->draw();
g_system->updateScreen();
g_system->delayMillis(50);
}
@@ -218,10 +214,16 @@ void MacVentureEngine::enqueueObject(ObjectQueueID type, ObjID objID) {
}
void MacVentureEngine::enqueueText(TextQueueID type, ObjID target, ObjID source, ObjID text) {
+ QueuedText newText;
+ newText.id = type;
+ newText.destination = target;
+ newText.source = source;
+ newText.asset = text;
+ _textQueue.push_back(newText);
}
void MacVentureEngine::printTexts() {
- debug("Printing texts..");
+ warning("printTexts: unimplemented");
}
const GlobalSettings& MacVentureEngine::getGlobalSettings() const {
diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h
index aabcdcb8ac..bb4eec83f5 100644
--- a/engines/macventure/macventure.h
+++ b/engines/macventure/macventure.h
@@ -124,12 +124,6 @@ enum ObjectQueueID {
kAnimateBack = 14
};
-enum TextQueueID {
- kTextNumber = 1,
- kTextNewLine = 2,
- kTextPlain = 3
-};
-
struct QueuedObject {
ObjectQueueID id;
ObjID object;
@@ -143,6 +137,19 @@ struct QueuedObject {
bool invisible;
};
+enum TextQueueID {
+ kTextNumber = 1,
+ kTextNewLine = 2,
+ kTextPlain = 3
+};
+
+struct QueuedText {
+ TextQueueID id;
+ ObjID source;
+ ObjID destination;
+ ObjID asset;
+};
+
class MacVentureEngine : public Engine {
public:
@@ -239,7 +246,7 @@ private: // Attributes
Common::Array<QueuedObject> _objQueue;
Common::Array<QueuedObject> _soundQueue;
- Common::Array<QueuedObject> _textQueue;
+ Common::Array<QueuedText> _textQueue;
// Selections
ObjID _destObject;