aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-22 08:02:09 +0300
committerEugene Sandulenko2014-05-22 08:02:27 +0300
commit15ffe359a80d6343247e141f0bd69ecae52fc9e4 (patch)
tree231a16d9bb0b7108429562676024352e538d5dcf /engines/fullpipe
parentec931b26ecc6226de95cd10b5a1ae561ea0f5386 (diff)
downloadscummvm-rg350-15ffe359a80d6343247e141f0bd69ecae52fc9e4.tar.gz
scummvm-rg350-15ffe359a80d6343247e141f0bd69ecae52fc9e4.tar.bz2
scummvm-rg350-15ffe359a80d6343247e141f0bd69ecae52fc9e4.zip
FULLPIPE: Started work on MovGraph::fillMGMinfo()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/motion.cpp99
1 files changed, 99 insertions, 0 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 6162537dba..7e86de7ba9 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -842,6 +842,105 @@ MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int a5, int x1,
}
MessageQueue *MovGraph::fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int staticsId) {
+#if 0
+ v27 = ani->_ox;
+ v8 = movarr->_movStepCount;
+ v9 = 0;
+ MessageQueue *mq = 0;
+ v28 = ani->_oy;
+ v26 = 0;
+ if (v8 > 0) {
+ while (1) {
+ if (v9 < v8 - 1) {
+ v10 = (MovStepShifted *)&movarr->_movSteps[v9 + 1].link;
+ movarra = (MovStepShifted *)&movarr->_movSteps[v9 + 1].link;
+ do {
+ if ( *(_DWORD *)(*(_DWORD *)(v10[-1].link + 16) + 4 * (unsigned int)((char *)v10[-2]._sfield_0 + _field_44)) !=
+ *(_DWORD *)(*(_DWORD *)(movarra->link + 16) + 4 * (unsigned int)((char *)v10[-1]._sfield_0 + _field_44)) )
+ break;
+ ++v9;
+ v10 = movarra + 1;
+ ++movarra;
+ } while (v9 < v8 - 1);
+ }
+
+ ani->getMovementById(movarr->_movSteps[v9].link->dwordArray1[_field_44 + movarr->_movSteps[v9]._sfield_0]);
+ v11 = movarr->_movStepCount - 1;
+ v13 = __OFSUB__(v9, v11);
+ v12 = v9 - v11 < 0;
+ if (v9 == v11) {
+ if (staticsId) {
+ id2 = staticsId;
+ goto LABEL_13;
+ }
+ v13 = __OFSUB__(v9, v11);
+ v12 = v9 - v11 < 0;
+ }
+ if (v12 ^ v13)
+ id2 = ani->getMovementById(movarr->_movSteps[v9 + 1].link->dwordArray1[_field_44 + movarr->_movSteps[v9]._sfield_0])->_staticsObj1->_staticsId;
+ else
+ id2 = movarr->_movSteps[v9].link->_dwordArray2[_field_44 + movarr->_movSteps[v9]._sfield_0];
+ LABEL_13:
+ v14 = movarr->_movSteps;
+ v15 = movarr->_movStepCount - 1;
+
+ if (v9 == v15) {
+ v16 = v14[v9].link->_movGraphNode1->_distance;
+ v17 = movarr->_point.x;
+ v33 = movarr->_point.y;
+ ny = v33;
+ v32 = v17;
+ v34 = v16;
+ nx = v17;
+ nd = v16;
+ } else {
+ v18 = v14[v9]._sfield_0;
+ v19 = &v14[v9];
+ if (v18) {
+ v21 = (MovGraphNodeShifted *)&v19->link->_movGraphNode1->_x;
+ nx = v21->_x;
+ ny = v21->_y;
+ nd = v21->_distance;
+ } else {
+ v20 = (MovGraphNodeShifted *)&v19->link->_movGraphNode2->_x;
+ nx = v20->_x;
+ ny = v20->_y;
+ nd = v20->_distance;
+ }
+ }
+ memset(&mgminfo, 0, sizeof(mgminfo));
+ mgminfo.ani = ani;
+ mgminfo.staticsId2 = id2;
+ mgminfo.staticsId1 = v26;
+ mgminfo.x1 = nx;
+ mgminfo.x2 = v27;
+ mgminfo.y2 = v28;
+ mgminfo.y1 = ny;
+ mgminfo.field_1C = nd;
+ mgminfo.movementId = movarr->_movSteps[v9].link->dwordArray1[_field_44 + movarr->_movSteps[v9]._sfield_0];
+ mgminfo.flags = (mq != 0) | 48 * (mq != 0) | 0xE;
+ v23 = _mgm->genMovement(&mgminfo);
+
+ if (mq) {
+ if (v23) {
+ mq->transferExCommands(v23);
+ delete v23;
+ }
+ } else {
+ mq = v23;
+ }
+ v27 = nx;
+ v28 = ny;
+ v26 = id2;
+
+ v8 = movarr->_movStepCount;
+ ++v9;
+ if (v9 >= v8)
+ return mq;
+ }
+ }
+ return 0;
+#endif
warning("STUB: *MovGraph::fillMGMinfo()");
return 0;