aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-09-02 22:20:15 +0300
committerEugene Sandulenko2013-09-06 14:51:24 +0300
commit0bc0aa16581a251a628c93125f3209aa8fcd1ddb (patch)
tree3a1baabcd1dcb21a078bb39ef3c4490344dba724 /engines
parent0b4318267424f6220948c122d0db73e93deef39e (diff)
downloadscummvm-rg350-0bc0aa16581a251a628c93125f3209aa8fcd1ddb.tar.gz
scummvm-rg350-0bc0aa16581a251a628c93125f3209aa8fcd1ddb.tar.bz2
scummvm-rg350-0bc0aa16581a251a628c93125f3209aa8fcd1ddb.zip
FULLPIPE: Implement GlobalMessageQueueList::compact()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/messages.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index dcf9a222f8..96ed389527 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -465,9 +465,16 @@ void GlobalMessageQueueList::disableQueueById(int id) {
}
int GlobalMessageQueueList::compact() {
- warning("STUB: GlobalMessageQueueList::compact()");
+ for (uint i = 0; i < size();) {
+ if (((MessageQueue *)((*this).operator[](i)))->_isFinished) {
+ disableQueueById(((MessageQueue *)((*this).operator[](i)))->_id);
+ remove_at(i);
+ } else {
+ i++;
+ }
+ }
- return 0;
+ return size() + 1;
}
void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) {