aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-25 09:32:28 +0300
committerEugene Sandulenko2014-05-25 09:32:50 +0300
commit99b376afe73ed84d9229265bb8924d89fb993b5e (patch)
tree3e4db752615ae08eb34f8893e6b60464b6cd6a00 /engines/fullpipe
parent3ca0f88e1f1539251cb2955cdb9eb532d105829f (diff)
downloadscummvm-rg350-99b376afe73ed84d9229265bb8924d89fb993b5e.tar.gz
scummvm-rg350-99b376afe73ed84d9229265bb8924d89fb993b5e.tar.bz2
scummvm-rg350-99b376afe73ed84d9229265bb8924d89fb993b5e.zip
FULLPIPE: Start MovGraph::sub1() implementation
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/motion.cpp62
1 files changed, 61 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index b4abe60a36..ad86805bba 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -817,7 +817,67 @@ MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int
return 0;
}
-MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int a5, int x1, int y1, int a8, int a9) {
+MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int stid, int x1, int y1, int a8, int flag1) {
+#if 0
+ PicAniInfo picinfo;
+
+ ani->getPicAniInfo(&picinfo);
+
+ ani->_statics = ani->getStaticsById(stid);
+ ani->_movement = 0;
+ ani->setOXY(x, y);
+
+ int rescount;
+
+ MovItem *movitem = method28(ani, x1, y1, flag1, &rescount);
+
+ if (!movitem) {
+ ani->setPicAniInfo(&picinfo);
+
+ return 0;
+ }
+
+ v13 = _callback1(ani, movitem, rescount);
+ v14 = MovGraph_getItemIndexByStaticAni(this, ani);
+ v15 = v14 << 6;
+ v16 = 0;
+
+ movgitem = _items[v14];
+ v18 = movgitem->count;
+
+ if (v18 > 0) {
+ v19 = movgitem->movitems;
+ while (v19->movarr != v13) {
+ ++v16;
+ ++v19;
+ if (v16 >= v18)
+ goto LABEL_6;
+ }
+ v21 = v16;
+ v22 = movgitem->movitems[v21].movarr;
+ v23 = movgitem->movarr._movSteps;
+ movarr = movgitem->movitems[v21].movarr;
+
+ if (v23)
+ CObjectFree(v23);
+
+ memcpy((char *)&this->_items->movarr + v15, v22, 0x20u);
+ *(MovStep **)((char *)&this->_items->movarr._movSteps + v15) = (MovStep *)operator new(8 * movarr->_movStepCount);
+ memcpy(*(void **)((char *)&this->_items->movarr._movSteps + v15), movarr->_movSteps, 8 * movarr->_movStepCount);
+ *(int *)((char *)&this->_items->movarr._afield_8 + v15) = -1;
+ *(MovGraphLink **)((char *)&this->_items->movarr._link + v15) = 0;
+ v24 = fillMGMinfo(*(StaticANIObject **)((char *)&this->_items->ani + v15), (MovArr *)((char *)&this->_items->movarr + v15), a8);
+
+ result = v24;
+ } else {
+ LABEL_6:
+ result = 0;
+ }
+
+ ani->setPicAniInfo(&picinfo);
+
+ return result;
+#endif
warning("STUB: *MovGraph::sub1()");
return 0;