diff options
author | Eugene Sandulenko | 2014-05-25 12:41:02 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-05-26 08:44:28 +0300 |
commit | 120edd94349b4a9f7a5a294b37504edee4a39c41 (patch) | |
tree | 3503dc999a23c6b2eba681769073d86c0a892c5d | |
parent | 09163f58780ea233321e9ed06bade7ebc63bf33b (diff) | |
download | scummvm-rg350-120edd94349b4a9f7a5a294b37504edee4a39c41.tar.gz scummvm-rg350-120edd94349b4a9f7a5a294b37504edee4a39c41.tar.bz2 scummvm-rg350-120edd94349b4a9f7a5a294b37504edee4a39c41.zip |
FULLPIPE: Finish MovGraph::sub1() implementation
-rw-r--r-- | engines/fullpipe/motion.cpp | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 06c37f4d20..2564096c04 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -818,7 +818,6 @@ MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int } MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int stid, int x1, int y1, int stid2, int flag1) { -#if 0 PicAniInfo picinfo; ani->getPicAniInfo(&picinfo); @@ -829,9 +828,9 @@ MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int stid, int x int rescount; - MovItem *movitem = method28(ani, x1, y1, flag1, &rescount); + Common::Array<MovItem *> *movitems = method28(ani, x1, y1, flag1, &rescount); - if (!movitem) { + if (!movitems) { ani->setPicAniInfo(&picinfo); return 0; @@ -839,40 +838,27 @@ MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int stid, int x MessageQueue *res = 0; - MovArr *goal = _callback1(ani, movitem, rescount); + MovArr *goal = _callback1(ani, movitems, rescount); int idx = getItemIndexByStaticAni(ani); - v16 = 0; - movgitem = _items[idx]; - v18 = movgitem->count; + MovGraphItem *movgitem = _items[idx]; + int cnt = movgitem->count; - if (v18 > 0) { - v19 = movgitem->movitems; - while (v19->movarr != goal) { - ++v16; - ++v19; - if (v16 >= v18) - break; - } - - if (v16 < v18) { + for (int nidx = 0; nidx < cnt; nidx++) { + if ((*movgitem->movitems)[nidx]->movarr == goal) { movgitem->movarr._movSteps.clear(); - _items[idx]->movarr = movgitem->movitems[v16].movarr; - _items[idx]->movarr._movSteps = movgitem->movitems[v16].movarr->_movSteps; + _items[idx]->movarr = *(*movgitem->movitems)[nidx]->movarr; + _items[idx]->movarr._movSteps = (*movgitem->movitems)[nidx]->movarr->_movSteps; _items[idx]->movarr._afield_8 = -1; _items[idx]->movarr._link = 0; - res = fillMGMinfo(_items[idx]->ani, _items[idx]->movarr, stid2); + res = fillMGMinfo(_items[idx]->ani, &_items[idx]->movarr, stid2); } } ani->setPicAniInfo(&picinfo); return res; -#endif - warning("STUB: *MovGraph::sub1()"); - - return 0; } MessageQueue *MovGraph::fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int staticsId) { |