FULLPIPE: Implement MovGraph::setEnds()

This commit is contained in:
Eugene Sandulenko 2014-05-25 12:50:09 +03:00
parent 120edd9434
commit 82f4e71d56
2 changed files with 23 additions and 0 deletions

View File

@ -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)

View File

@ -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;