diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/motion.cpp | 29 | ||||
-rw-r--r-- | engines/fullpipe/motion.h | 4 |
2 files changed, 26 insertions, 7 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index b5e0f67a58..1712c88684 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -621,10 +621,31 @@ int MovGraph::method3C(StaticANIObject *ani, int flag) { return 0; } -int MovGraph::method44() { - warning("STUB: MovGraph::method44()"); +bool MovGraph::method44(StaticANIObject *ani, int x, int y) { + int idx = getItemIndexByStaticAni(ani); + MovArr m; - return 0; + if (idx != -1) { + if (x != -1 || y != -1) { + int counter; + + MovItem *movitem = method28(ani, x, y, 0, &counter); + + if (movitem) { + MovArr *movarr = _callback1(ani, movitem, counter); + int cnt = movarr->_movStepCount; + + if (cnt > 0) { + if (movarr->_movSteps[cnt - 1].link->_flags & 0x4000000) + return true; + } + } + } else if (calcChunk(idx, ani->_ox, ani->_oy, &m, 0) && m._link && (m._link->_flags & 0x4000000)) { + return true; + } + } + + return false; } MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { @@ -1512,8 +1533,6 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int obj->getPicAniInfo(&picAniInfo); - warning("p: %d %d", picAniInfo.movementId, picAniInfo.objectId); - int idxsub; if (obj->_movement) diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 1b49839e0d..febcf17574 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -60,7 +60,7 @@ public: virtual int changeCallback() { return 0; } virtual int method3C(StaticANIObject *ani, int flag) { return 0; } virtual int method40() { return 0; } - virtual int method44() { return 0; } + virtual bool method44(StaticANIObject *ani, int x, int y) { return false; } virtual int method48() { return -1; } virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { return 0; } @@ -366,7 +366,7 @@ public: virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId); virtual int changeCallback(); virtual int method3C(StaticANIObject *ani, int flag); - virtual int method44(); + virtual bool method44(StaticANIObject *ani, int x, int y); virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId); virtual int method50(); |