diff options
-rw-r--r-- | engines/fullpipe/messages.cpp | 15 | ||||
-rw-r--r-- | engines/fullpipe/messages.h | 1 |
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); |