diff options
| -rw-r--r-- | engines/fullpipe/motion.cpp | 82 | 
1 files changed, 41 insertions, 41 deletions
| diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index eda29aad03..21df1c3aae 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()"); | 
