aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/messages.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-17 00:35:02 +0300
committerEugene Sandulenko2013-10-17 00:35:02 +0300
commita0185d7fdc449438ce85ef00abcae297c6e89829 (patch)
tree664b72dd090d37ad0926dcc669fd8da9a0e6810e /engines/fullpipe/messages.cpp
parent769ba7f6cab51dc48f4d6aaefcb3bf8c216abaa9 (diff)
downloadscummvm-rg350-a0185d7fdc449438ce85ef00abcae297c6e89829.tar.gz
scummvm-rg350-a0185d7fdc449438ce85ef00abcae297c6e89829.tar.bz2
scummvm-rg350-a0185d7fdc449438ce85ef00abcae297c6e89829.zip
FULLPIPE: Implemented MovGraph2::method4C()
Diffstat (limited to 'engines/fullpipe/messages.cpp')
-rw-r--r--engines/fullpipe/messages.cpp21
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)) {