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

sev- sev at scummvm.org
Mon May 19 16:37:39 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:
d9112a5863 FULLPIPE: More work on MovGraph::method34()


Commit: d9112a586303d3093c852855ea59b841024bbd9b
    https://github.com/scummvm/scummvm/commit/d9112a586303d3093c852855ea59b841024bbd9b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-19T17:37:01+03:00

Commit Message:
FULLPIPE: More work on MovGraph::method34()

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index eda29aa..21df1c3 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -636,55 +636,55 @@ MessageQueue *MovGraph::method34(StaticANIObject *ani, int xpos, int ypos, int f
 	if (!ani->_movement) {
 		v20 = v10;
 		v33 = (int)ani;
-		goto LABEL_34;
-	}
+	} else {
+		Common::Point point;
 
-	Common::Point point;
+		ani->calcStepLen(&point);
+
+		MessageQueue *mq = sub1(ani, ani->_ox - point.x, ani->_oy - point.y, ani->_movement->_staticsObj1->_staticsId, x, y, 0, fuzzyMatch);
 
-	ani->calcStepLen(&point);
+		if (!mq || !mq->getExCommandByIndex(0))
+			return 0;
 
-	MessageQueue *mq = sub1(ani, ani->_ox - point.x, ani->_oy - point.y, ani->_movement->_staticsObj1->_staticsId, x, y, 0, fuzzyMatch);
+		ExCommand *ex = mq->getExCommandByIndex(0);
 
-	if (!mq || !mq->getExCommandByIndex(0))
-		return 0;
+		if ((ex->_messageKind != 1 && ex->_messageKind != 20) || ex->_messageNum != ani->_movement->_id ||
+			(ex->_field_14 >= 1 && ex->_field_14 <= ani->_movement->_currDynamicPhaseIndex)) {
+			mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
 
-	ExCommand *ex = mq->getExCommandByIndex(0);
-
-	if ((ex->_messageKind != 1 && ex->_messageKind != 20) || ex->_messageNum != ani->_movement->_id ||
-		(ex->_field_14 >= 1 && ex->_field_14 <= ani->_movement->_currDynamicPhaseIndex)) {
-		v22 = GlobalMessageQueueList_compact(&g_globalMessageQueueList);
-		v23 = MessageQueue_ctor1(v21, v22);
-		a2 = (int)v23;
-		v25 = ExCommand_ctor(v24, ani->_id, 21, 0, 0, 0, 0, 1, 0, 0, 0);
-		v23 = (MessageQueue *)a2;
-		v26 = (int)&v23->exCommands.obj.vmt;
-		v27 = ani->go._okeyCode;
-		v25->msg._keyCode = (unsigned __int16)v27;
-		v25->_field_3C = 1;
-		v25->msg._field_24 = 0;
-		CPtrList::AddTail(&v23->exCommands, v25);
-		v29 = ExCommand_ctor(v28, ani->go._id, 51, 0, x, y, 0, 1, 0, 0, 0);
-		v23 = (MessageQueue *)a2;
-		v30 = fuzzyMatch;
-		v29->_keyCode = ani->_okeyCode;
-		v29->_field_3C = 1;
-		v29->_field_24 = 0;
-		v29->_field_20 = v30;
-		CPtrList::AddTail(v26, v29);
-		if (MessageQueue_chain(v23, 0))
-			return v23;
-		if (v23)
-			delete v23;
-		return 0;
+			ex = new ExCommand(ani->_id, 21, 0, 0, 0, 0, 1, 0, 0, 0);
+			ex->_keyCode = ani->_okeyCode;
+			ex->_field_3C = 1;
+			ex->msg._field_24 = 0;
+			mq->addExCommandToEnd(ex);
+
+			ex = new ExCommand(ani->_id, 51, 0, x, y, 0, 1, 0, 0, 0);
+			ex->_keyCode = ani->_okeyCode;
+			ex->_field_3C = 1;
+			ex->_field_24 = 0;
+			ex->_field_20 = fuzzyMatch;
+			mq->addExCommandToEnd(ex);
+
+			if (mq->chain(0))
+				return mq;
+
+			delete mq;
+
+			return 0;
+		}
+
+		StaticANIObject *ani2;
+
+		ani->setSomeDynamicPhaseIndex(ex->_field_14);
+		method28(ani, x, y, fuzzyMatch, ani2);
+
+		int idx = getItemIndexByStaticAni(ani2);
+		v33 = this->_items[idx].count;
+		v20 = this->_items[idx].movitems;
 	}
 
-	ani->setSomeDynamicPhaseIndex(ex->_field_14);
-	method28(ani, x, y, fuzzyMatch, (int *)&ani);
-	v33 = this->_items[getItemIndexByStaticAni(ani)].count;
-	v20 = this->_items[getItemIndexByStaticAni(ani)].movitems;
- LABEL_34:
 	v32 = this->_callback1(ani, v20, v33);
-	return method50(ani, v32, a2);
+	return method50(ani, v32, mq);
 #endif
 	warning("STUB: MovGraph::method34()");
 






More information about the Scummvm-git-logs mailing list