mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 07:37:59 -05:00
Implement/match LegoAnimPresenter::VTable0x94 (#852)
This commit is contained in:
parent
054120bc5d
commit
31f5143741
2 changed files with 43 additions and 20 deletions
|
@ -54,21 +54,21 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
||||||
return !strcmp(p_name, LegoAnimPresenter::ClassName()) || MxVideoPresenter::IsA(p_name);
|
return !strcmp(p_name, LegoAnimPresenter::ClassName()) || MxVideoPresenter::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadyTickle() override; // vtable+0x18
|
void ReadyTickle() override; // vtable+0x18
|
||||||
void StartingTickle() override; // vtable+0x1c
|
void StartingTickle() override; // vtable+0x1c
|
||||||
void StreamingTickle() override; // vtable+0x20
|
void StreamingTickle() override; // vtable+0x20
|
||||||
void DoneTickle() override; // vtable+0x2c
|
void DoneTickle() override; // vtable+0x2c
|
||||||
void ParseExtra() override; // vtable+0x30
|
void ParseExtra() override; // vtable+0x30
|
||||||
MxResult AddToManager() override; // vtable+0x34
|
MxResult AddToManager() override; // vtable+0x34
|
||||||
void Destroy() override; // vtable+0x38
|
void Destroy() override; // vtable+0x38
|
||||||
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
||||||
void EndAction() override; // vtable+0x40
|
void EndAction() override; // vtable+0x40
|
||||||
void PutFrame() override; // vtable+0x6c
|
void PutFrame() override; // vtable+0x6c
|
||||||
virtual MxResult CreateAnim(MxStreamChunk* p_chunk); // vtable+0x88
|
virtual MxResult CreateAnim(MxStreamChunk* p_chunk); // vtable+0x88
|
||||||
virtual void VTable0x8c(); // vtable+0x8c
|
virtual void VTable0x8c(); // vtable+0x8c
|
||||||
virtual void VTable0x90(); // vtable+0x90
|
virtual void VTable0x90(); // vtable+0x90
|
||||||
virtual MxResult VTable0x94(Vector3&, Vector3&, float, float, Vector3&); // vtable+0x94
|
virtual MxU32 VTable0x94(Vector3& p_vec1, Vector3& p_vec2, float p_f1, float p_f2, Vector3& p_vec3); // vtable+0x94
|
||||||
virtual MxResult VTable0x98(LegoPathBoundary* p_boundary); // vtable+0x98
|
virtual MxResult VTable0x98(LegoPathBoundary* p_boundary); // vtable+0x98
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c990
|
// FUNCTION: LEGO1 0x1000c990
|
||||||
virtual LegoROI** GetROIMap(MxU32& p_roiMapSize)
|
virtual LegoROI** GetROIMap(MxU32& p_roiMapSize)
|
||||||
|
@ -125,7 +125,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
||||||
LegoAnimSubstMap* m_substMap; // 0x98
|
LegoAnimSubstMap* m_substMap; // 0x98
|
||||||
MxS16 m_unk0x9c; // 0x9c
|
MxS16 m_unk0x9c; // 0x9c
|
||||||
undefined4* m_unk0xa0; // 0xa0
|
undefined4* m_unk0xa0; // 0xa0
|
||||||
undefined4 m_unk0xa4; // 0xa4
|
float m_unk0xa4; // 0xa4
|
||||||
Mx3DPointFloat m_unk0xa8; // 0xa8
|
Mx3DPointFloat m_unk0xa8; // 0xa8
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1105,11 +1105,34 @@ void LegoAnimPresenter::FUN_1006c8a0(MxBool p_bool)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1006c8f0
|
// FUNCTION: LEGO1 0x1006c8f0
|
||||||
MxResult LegoAnimPresenter::VTable0x94(Vector3&, Vector3&, float, float, Vector3&)
|
// FUNCTION: BETA10 0x1005206c
|
||||||
|
MxU32 LegoAnimPresenter::VTable0x94(Vector3& p_vec1, Vector3& p_vec2, float p_f1, float p_f2, Vector3& p_vec3)
|
||||||
{
|
{
|
||||||
// TODO
|
Mx3DPointFloat a, b;
|
||||||
return SUCCESS;
|
|
||||||
|
b = p_vec2;
|
||||||
|
((Vector3&) b).Mul(p_f1);
|
||||||
|
((Vector3&) b).Add(&p_vec1);
|
||||||
|
|
||||||
|
a = b;
|
||||||
|
((Vector3&) a).Sub(&m_unk0xa8);
|
||||||
|
|
||||||
|
float len = a.LenSquared();
|
||||||
|
if (len <= 0.0f) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0xa4 + p_f2 >= sqrt(len) && m_roiMapSize != 0 && m_roiMap != NULL) {
|
||||||
|
for (MxU32 i = 1; i <= m_roiMapSize; i++) {
|
||||||
|
if (m_roiMap[i]->GetLODCount() != 0 &&
|
||||||
|
m_roiMap[i]->FUN_100a9410(p_vec1, p_vec2, p_f1, p_f2, p_vec3, FALSE)) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1006ca50
|
// FUNCTION: LEGO1 0x1006ca50
|
||||||
|
|
Loading…
Reference in a new issue