diff options
Diffstat (limited to 'engines/fullpipe/messages.cpp')
-rw-r--r-- | engines/fullpipe/messages.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index b5f2cb8303..d58212dc29 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -309,6 +309,10 @@ void MessageQueue::messageQueueCallback1(int par) { debug(3, "STUB: MessageQueue::messageQueueCallback1()"); } +void MessageQueue::addExCommand(ExCommand *ex) { + _exCommands.push_front(ex); +} + ExCommand *MessageQueue::getExCommandByIndex(uint idx) { if (idx > _exCommands.size()) return 0; @@ -323,6 +327,23 @@ ExCommand *MessageQueue::getExCommandByIndex(uint idx) { return *it; } +void MessageQueue::deleteExCommandByIndex(uint idx, bool doFree) { + if (idx > _exCommands.size()) + return; + + Common::List<ExCommand *>::iterator it = _exCommands.begin(); + + while (idx) { + ++it; + idx--; + } + + _exCommands.erase(it); + + if (doFree) + delete *it; +} + void MessageQueue::sendNextCommand() { if (_exCommands.size()) { if (!(_flags & 4) && (_flags & 1)) { |