diff options
author | Eugene Sandulenko | 2014-05-13 09:32:02 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-05-13 09:32:02 +0200 |
commit | 670bf9a1afeb6ff433365fd43afe39da71bca64c (patch) | |
tree | 7a9798ac268ad1bd85d9cef3fd7c23bdfdd1092b | |
parent | 3d81dd0a14d16dab0967ca57e8039c5285048518 (diff) | |
download | scummvm-rg350-670bf9a1afeb6ff433365fd43afe39da71bca64c.tar.gz scummvm-rg350-670bf9a1afeb6ff433365fd43afe39da71bca64c.tar.bz2 scummvm-rg350-670bf9a1afeb6ff433365fd43afe39da71bca64c.zip |
FULLPIPE: Fixes to MovGraph::doWalkTo()
-rw-r--r-- | engines/fullpipe/motion.cpp | 28 | ||||
-rw-r--r-- | engines/fullpipe/motion.h | 18 |
2 files changed, 32 insertions, 14 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 5137434a06..9fcb01296a 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -529,7 +529,7 @@ void MovGraphItem::free() { int MovGraph_messageHandler(ExCommand *cmd); -int MovGraphCallback(int a1, int a2, int a3) { +MovArr *MovGraphCallback(StaticANIObject *ani, MovItem *item, signed int counter) { warning("STUB: MovgraphCallback"); return 0; @@ -592,7 +592,7 @@ void MovGraph::freeItems() { _items.clear(); } -int MovGraph::method28() { +MovItem *MovGraph::method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount) { warning("STUB: MovGraph::method28()"); return 0; @@ -641,13 +641,13 @@ MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int int idx = getItemIndexByStaticAni(subj); for (uint i = 0; i < _items[idx]->count; i++) { - if (_items[idx]->items[i]->movarr == goal) { + if (_items[idx]->items[i].movarr == goal) { if (subj->_movement) { Common::Point point; - subj->calcStepLen(point); + subj->calcStepLen(&point); - MessageQueue *mq = MovGraph_sub_451D50(this, subj, subj->_ox - point.x, subj->_oy - point.y, subj->_movement->_staticsObj1->_staticsId, xpos, ypos, 0, fuzzyMatch); + MessageQueue *mq = sub1(subj, subj->_ox - point.x, subj->_oy - point.y, subj->_movement->_staticsObj1->_staticsId, xpos, ypos, 0, fuzzyMatch); if (!mq || !mq->getExCommandByIndex(0)) return 0; @@ -667,13 +667,11 @@ MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int if (movitem) { MovArr *goal = _callback1(subj, movitem, ss); int idx = getItemIndexByStaticAni(subj); - v25 = 0; - idx <<= 6; if (_items[idx]->count > 0) { int arridx = 0; - while (_items[idx]->items[arridx]->movarr != goal) { + while (_items[idx]->items[arridx].movarr != goal) { arridx++; if (arridx >= _items[idx]->count) { @@ -682,7 +680,7 @@ MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int } } - _items[idx]->movarr.clear(); + _items[idx]->movarr->clear(); for (uint i = 0; i < _items[idx]->items[arridx].movarr->_movStepCount; i++) { MovArr *m = new MovArr; @@ -717,6 +715,18 @@ 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) { + warning("STUB: *MovGraph::sub1()"); + + return 0; +} + +MessageQueue *MovGraph::fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int staticsId) { + warning("STUB: *MovGraph::fillMGMinfo()"); + + return 0; +} + int MovGraph::method50() { warning("STUB: MovGraph::method50()"); diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 94cd274c0d..3ef62a75b3 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -31,6 +31,7 @@ class MctlConnectionPoint; class MovGraphLink; class MessageQueue; class ExCommand2; +struct MovItem; int startWalkTo(int objId, int objKey, int x, int y, int a5); int doSomeAnimation(int objId, int objKey, int a3); @@ -52,7 +53,7 @@ public: virtual void addObject(StaticANIObject *obj) {} virtual int removeObject(StaticANIObject *obj) { return 0; } virtual void freeItems() {} - virtual int method28() { return 0; } + virtual MovItem *method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount) { return 0; } virtual int method2C(StaticANIObject *obj, int x, int y) { return 0; } virtual int method30() { return 0; } virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { return 0; } @@ -299,9 +300,14 @@ class MovGraphLink : public CObject { void calcNodeDistanceAndAngle(); }; +struct MovStep { + int sfield_0; + MovGraphLink *link; +}; + struct MovArr { - int _afield_0; - int _afield_4; + MovStep *_movSteps; + int _movStepCount; int _afield_8; MovGraphLink *_link; double _dist; @@ -343,7 +349,7 @@ public: ObList _links; int _field_44; Common::Array<MovGraphItem *> _items; - int (*_callback1)(int, int, int); + MovArr *(*_callback1)(StaticANIObject *ani, MovItem *item, int counter); MGM _mgm; public: @@ -355,7 +361,7 @@ public: virtual void addObject(StaticANIObject *obj); virtual int removeObject(StaticANIObject *obj); virtual void freeItems(); - virtual int method28(); + virtual MovItem *method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount); virtual int method2C(StaticANIObject *obj, int x, int y); virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId); virtual int changeCallback(); @@ -374,6 +380,8 @@ public: Common::Array<Common::Rect *> *getBboxes(MovArr *movarr1, MovArr *movarr2, int *listCount); void calcBbox(Common::Rect *rect, MovGraphLink *grlink, MovArr *movarr1, MovArr *movarr2); bool calcChunk(int idx, int x, int y, MovArr *arr, int a6); + MessageQueue *sub1(StaticANIObject *ani, int x, int y, int a5, int x1, int y1, int a8, int a9); + MessageQueue *fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int staticsId); }; class Movement; |