aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-12 11:12:45 +0200
committerEugene Sandulenko2014-01-12 11:12:45 +0200
commitcf6cfc1cf825451807d9fb31fe5e33eef94c17dc (patch)
treed639cba76a2cb67277190361793b5ef547af0273 /engines
parent491a045eea1af99a4bf54ab84304135c946b6cc0 (diff)
downloadscummvm-rg350-cf6cfc1cf825451807d9fb31fe5e33eef94c17dc.tar.gz
scummvm-rg350-cf6cfc1cf825451807d9fb31fe5e33eef94c17dc.tar.bz2
scummvm-rg350-cf6cfc1cf825451807d9fb31fe5e33eef94c17dc.zip
FULLPIPE: Implement clearGlobalMessageQueueList1()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/messages.cpp15
-rw-r--r--engines/fullpipe/messages.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index b0abe30504..7dfdd06fc8 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -683,7 +683,20 @@ void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) {
}
void clearGlobalMessageQueueList1() {
- warning("STUB: clearGlobalMessageQueueList1()");
+ clearMessages();
+
+ g_fp->_globalMessageQueueList->clear();
+}
+
+void clearMessages() {
+ while (g_fp->_exCommandList.size()) {
+ ExCommand *ex = g_fp->_exCommandList.front();
+
+ g_fp->_exCommandList.pop_front();
+
+ if (ex->_excFlags & 2)
+ delete ex;
+ }
}
bool removeMessageHandler(int16 id, int pos) {
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index 2e8a29c2cb..33bb827888 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -190,6 +190,7 @@ bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id);
void clearMessageHandlers();
void processMessages();
void updateGlobalMessageQueue(int id, int objid);
+void clearMessages();
void clearGlobalMessageQueueList1();
bool chainQueue(int queueId, int flags);