diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 2564096c043..9f34c8fab8d 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -1296,6 +1296,28 @@ bool MovGraph::calcChunk(int idx, int x, int y, MovArr *arr, int a6) { return res; } +void MovGraph::setEnds(MovStep *step1, MovStep *step2) { + if (step1->link->_movGraphNode1 == step2->link->_movGraphNode2) { + step1->sfield_0 = 1; + step2->sfield_0 = 1; + + return; + } + + if (step1->link->_movGraphNode1 == step2->link->_movGraphNode1) { + step1->sfield_0 = 1; + step2->sfield_0 = 0; + } else { + step1->sfield_0 = 0; + + if (step1->link->_movGraphNode2 != step2->link->_movGraphNode1) { + step2->sfield_0 = 1; + } else { + step2->sfield_0 = 0; + } + } +} + int MovGraph2::getItemIndexByGameObjectId(int objectId) { for (uint i = 0; i < _items2.size(); i++) if (_items2[i]->_objectId == objectId) diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 2765cc3118c..b72883174f5 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -376,6 +376,7 @@ public: 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); + void setEnds(MovStep *step1, MovStep *step2); }; class Movement;