[Scummvm-cvs-logs] scummvm master -> af06053d6bace6546cd9d500957eff8cf58b7a89

sev- sev at scummvm.org
Fri Apr 11 22:19:22 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
af06053d6b FULLPIPE: Implement StaticANIObject::startMQIfIdle()


Commit: af06053d6bace6546cd9d500957eff8cf58b7a89
    https://github.com/scummvm/scummvm/commit/af06053d6bace6546cd9d500957eff8cf58b7a89
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-11T23:18:31+03:00

Commit Message:
FULLPIPE: Implement StaticANIObject::startMQIfIdle()

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 75c1c7d..25979ef 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -330,7 +330,35 @@ bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) {
 }
 
 void StaticANIObject::startMQIfIdle(int qId, int flag) {
-	warning("STUB: StaticANIObject::startMQIfIdle()");
+	MessageQueue *msg = g_fp->_currentScene->getMessageQueueById(qId);
+
+	if (msg && isIdle() && !(_flags & 0x100)) {
+		MessageQueue *mq = new MessageQueue(msg, 0, 0);
+
+		mq->setFlags(mq->getFlags() | flag);
+
+		ExCommand *ex = mq->getExCommandByIndex(0);
+
+		if (ex) {
+			while (ex->_messageKind != 1 || ex->_parentId != _id) {
+				ex->_parId = 0;
+				ex->_excFlags |= 2;
+				ex->handleMessage();
+
+				mq->deleteExCommandByIndex(0, 0);
+
+				ex = mq->getExCommandByIndex(0);
+
+				if (!ex)
+					return;
+			}
+
+			if (ex) {
+				startAnim(ex->_messageNum, mq->_id, -1);
+				mq->deleteExCommandByIndex(0, 1);
+			}
+		}
+	}
 }
 
 bool StaticANIObject::isIdle() {






More information about the Scummvm-git-logs mailing list