FULLPIPE: Further work on MovGraph::method50()
This commit is contained in:
parent
2e02e1c938
commit
c4f3f77d74
2 changed files with 18 additions and 17 deletions
|
@ -738,7 +738,7 @@ bool MovGraph::method44(StaticANIObject *ani, int x, int y) {
|
||||||
int cnt = (*movarr)[0]->_movStepCount;
|
int cnt = (*movarr)[0]->_movStepCount;
|
||||||
|
|
||||||
if (cnt > 0) {
|
if (cnt > 0) {
|
||||||
if ((*movarr)[0]->_movSteps[cnt - 1].link->_flags & 0x4000000)
|
if ((*movarr)[0]->_movSteps[cnt - 1]->link->_flags & 0x4000000)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,13 +851,13 @@ MessageQueue *MovGraph::fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int st
|
||||||
|
|
||||||
for (int i = 0; i < movarr->_movStepCount; i++) {
|
for (int i = 0; i < movarr->_movStepCount; i++) {
|
||||||
while (i < movarr->_movStepCount - 1) {
|
while (i < movarr->_movStepCount - 1) {
|
||||||
if (movarr->_movSteps[i ].link->_dwordArray1[movarr->_movSteps[i - 1].sfield_0 + _field_44] !=
|
if (movarr->_movSteps[i ]->link->_dwordArray1[movarr->_movSteps[i - 1]->sfield_0 + _field_44] !=
|
||||||
movarr->_movSteps[i + 1].link->_dwordArray1[movarr->_movSteps[i ].sfield_0 + _field_44])
|
movarr->_movSteps[i + 1]->link->_dwordArray1[movarr->_movSteps[i ]->sfield_0 + _field_44])
|
||||||
break;
|
break;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
MovStep *st = &movarr->_movSteps[i];
|
MovStep *st = movarr->_movSteps[i];
|
||||||
|
|
||||||
ani->getMovementById(st->link->_dwordArray1[_field_44 + st->sfield_0]);
|
ani->getMovementById(st->link->_dwordArray1[_field_44 + st->sfield_0]);
|
||||||
|
|
||||||
|
@ -865,7 +865,7 @@ MessageQueue *MovGraph::fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int st
|
||||||
id2 = staticsId;
|
id2 = staticsId;
|
||||||
} else {
|
} else {
|
||||||
if (i < movarr->_movStepCount - 1)
|
if (i < movarr->_movStepCount - 1)
|
||||||
id2 = ani->getMovementById(movarr->_movSteps[i + 1].link->_dwordArray1[_field_44 + st->sfield_0])->_staticsObj1->_staticsId;
|
id2 = ani->getMovementById(movarr->_movSteps[i + 1]->link->_dwordArray1[_field_44 + st->sfield_0])->_staticsObj1->_staticsId;
|
||||||
else
|
else
|
||||||
id2 = st->link->_dwordArray2[_field_44 + st->sfield_0];
|
id2 = st->link->_dwordArray2[_field_44 + st->sfield_0];
|
||||||
}
|
}
|
||||||
|
@ -955,18 +955,19 @@ MessageQueue *MovGraph::method50(StaticANIObject *ani, Common::Array<MovArr *> *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v11 = this->_items;
|
if (_items[idx]->movarr)
|
||||||
v12 = idx << 6;
|
delete _items[idx]->movarr;
|
||||||
v13 = (*(MovItem **)((char *)&v11->movitems + v12))[movidx].movarr;
|
|
||||||
if ( *(MovArr **)((char *)&v11->movarr + v12) )
|
_items[idx]->movarr = _items[idx]->movitems[movidx].movarr;
|
||||||
CObjectFree(*(void **)((char *)&v11->movarr + v12));
|
|
||||||
memcpy((char *)&this->_items->movarr + v12, v13, 0x20u);
|
_items[idx]->movarr->_movSteps.clear();
|
||||||
*(MovArr **)((char *)&this->_items->movarr + v12) = (MovArr *)operator new(8 * v13->_movStepCount);
|
_items[idx]->movarr->_movSteps = _items[idx]->movitems[movidx].movarr->_movSteps;
|
||||||
memcpy(*(void **)((char *)&this->_items->movarr + v12), v13->_movSteps, 8 * v13->_movStepCount);
|
|
||||||
*(int *)((char *)&this->_items->field_10 + v12) = -1;
|
_items[idx]->field_10 = -1;
|
||||||
*(int *)((char *)&this->_items->field_14 + v12) = 0;
|
_items[idx]->field_14 = 0;
|
||||||
|
|
||||||
|
MessageQueue *mq = fillMGMinfo(_items[idx]->ani, _items[idx]->movarr, 0);
|
||||||
|
|
||||||
MessageQueue *mq = fillMGMinfo(*(StaticANIObject **)((char *)&this->_items->ani + v12), (MovArr *)((char *)&this->_items->movarr + v12), 0);
|
|
||||||
if (!mq)
|
if (!mq)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,7 @@ struct MovStep {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MovArr {
|
struct MovArr {
|
||||||
MovStep *_movSteps;
|
Common::Array<MovStep *> _movSteps;
|
||||||
int _movStepCount;
|
int _movStepCount;
|
||||||
int _afield_8;
|
int _afield_8;
|
||||||
MovGraphLink *_link;
|
MovGraphLink *_link;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue