mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 07:37:59 -05:00
Implement LegoPathActor::VTable0x9c (#942)
* Implement LegoPathActor::VTable0x9c * Add annotation
This commit is contained in:
parent
3342464321
commit
7538988f50
14 changed files with 105 additions and 19 deletions
|
@ -38,8 +38,9 @@ class LegoCarRaceActor : public virtual LegoRaceActor {
|
||||||
void VTable0x70(float p_float) override; // vtable+0x70
|
void VTable0x70(float p_float) override; // vtable+0x70
|
||||||
MxU32 VTable0x90(float, Matrix4&) override; // vtable+0x90
|
MxU32 VTable0x90(float, Matrix4&) override; // vtable+0x90
|
||||||
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
||||||
void VTable0x98() override; // vtable+0x98
|
void VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
MxResult VTable0x9c() override; // vtable+0x9c
|
override; // vtable+0x98
|
||||||
|
MxResult VTable0x9c() override; // vtable+0x9c
|
||||||
|
|
||||||
virtual void FUN_10080590();
|
virtual void FUN_10080590();
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,9 @@ class LegoJetski : public LegoJetskiRaceActor, public LegoRaceMap {
|
||||||
) override; // vtable+0x6c
|
) override; // vtable+0x6c
|
||||||
void VTable0x70(float p_float) override; // vtable+0x70
|
void VTable0x70(float p_float) override; // vtable+0x70
|
||||||
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
||||||
void VTable0x98() override; // vtable+0x98
|
void VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
MxResult VTable0x9c() override; // vtable+0x9c
|
override; // vtable+0x98
|
||||||
|
MxResult VTable0x9c() override; // vtable+0x9c
|
||||||
|
|
||||||
virtual void FUN_100136f0(float p_worldSpeed);
|
virtual void FUN_100136f0(float p_worldSpeed);
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,10 @@ class LegoJetskiRaceActor : public virtual LegoCarRaceActor {
|
||||||
Vector3& p_v3
|
Vector3& p_v3
|
||||||
) override; // vtable+0x6c
|
) override; // vtable+0x6c
|
||||||
void VTable0x70(float p_float) override; // vtable+0x70
|
void VTable0x70(float p_float) override; // vtable+0x70
|
||||||
void VTable0x98() override; // vtable+0x98
|
void VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
MxResult VTable0x9c() override; // vtable+0x9c
|
override; // vtable+0x98
|
||||||
void VTable0x1c() override; // vtable+0x1c
|
MxResult VTable0x9c() override; // vtable+0x9c
|
||||||
|
void VTable0x1c() override; // vtable+0x1c
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10081d40
|
// SYNTHETIC: LEGO1 0x10081d40
|
||||||
// LegoJetskiRaceActor::`scalar deleting destructor'
|
// LegoJetskiRaceActor::`scalar deleting destructor'
|
||||||
|
|
|
@ -86,7 +86,11 @@ class LegoPathActor : public LegoActor {
|
||||||
// FUNCTION: LEGO1 0x10002d50
|
// FUNCTION: LEGO1 0x10002d50
|
||||||
virtual MxResult VTable0x94(LegoPathActor*, MxBool) { return 0; } // vtable+0x94
|
virtual MxResult VTable0x94(LegoPathActor*, MxBool) { return 0; } // vtable+0x94
|
||||||
|
|
||||||
virtual void VTable0x98(); // vtable+0x98
|
virtual void VTable0x98(
|
||||||
|
LegoPathBoundary*& p_boundary,
|
||||||
|
LegoUnknown100db7f4*& p_edge,
|
||||||
|
float& p_unk0xe4
|
||||||
|
); // vtable+0x98
|
||||||
virtual MxResult VTable0x9c(); // vtable+0x9c
|
virtual MxResult VTable0x9c(); // vtable+0x9c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10002d60
|
// FUNCTION: LEGO1 0x10002d60
|
||||||
|
|
|
@ -103,7 +103,7 @@ class LegoPathController : public MxCore {
|
||||||
LegoPathBoundary* GetPathBoundary(const char* p_name);
|
LegoPathBoundary* GetPathBoundary(const char* p_name);
|
||||||
void Enable(MxBool p_enable);
|
void Enable(MxBool p_enable);
|
||||||
void FUN_10046bb0(LegoWorld* p_world);
|
void FUN_10046bb0(LegoWorld* p_world);
|
||||||
MxU32 FUN_1004a240(
|
MxS32 FUN_1004a240(
|
||||||
LegoPathEdgeContainer& p_grec,
|
LegoPathEdgeContainer& p_grec,
|
||||||
Vector3& p_v1,
|
Vector3& p_v1,
|
||||||
Vector3& p_v2,
|
Vector3& p_v2,
|
||||||
|
|
|
@ -40,6 +40,8 @@ struct LegoPathEdgeContainer : public list<LegoBoundaryEdge> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MxU32 GetBit1() { return m_flags & c_bit1; }
|
||||||
|
|
||||||
Mx3DPointFloat m_unk0x0c; // 0x0c
|
Mx3DPointFloat m_unk0x0c; // 0x0c
|
||||||
Mx3DPointFloat m_unk0x20; // 0x20
|
Mx3DPointFloat m_unk0x20; // 0x20
|
||||||
LegoPathBoundary* m_boundary; // 0x34
|
LegoPathBoundary* m_boundary; // 0x34
|
||||||
|
|
|
@ -42,8 +42,9 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
|
||||||
) override; // vtable+0x6c
|
) override; // vtable+0x6c
|
||||||
void VTable0x70(float p_float) override; // vtable+0x70
|
void VTable0x70(float p_float) override; // vtable+0x70
|
||||||
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
|
||||||
void VTable0x98() override; // vtable+0x98
|
void VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
MxResult VTable0x9c() override; // vtable+0x9c
|
override; // vtable+0x98
|
||||||
|
MxResult VTable0x9c() override; // vtable+0x9c
|
||||||
|
|
||||||
virtual void FUN_10012ea0(float p_worldSpeed);
|
virtual void FUN_10012ea0(float p_worldSpeed);
|
||||||
virtual void FUN_10012ff0(float);
|
virtual void FUN_10012ff0(float);
|
||||||
|
|
|
@ -72,7 +72,7 @@ void LegoCarRaceActor::VTable0x70(float p_float)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10081d20
|
// STUB: LEGO1 0x10081d20
|
||||||
void LegoCarRaceActor::VTable0x98()
|
void LegoCarRaceActor::VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ MxResult LegoJetski::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100141c0
|
// STUB: LEGO1 0x100141c0
|
||||||
void LegoJetski::VTable0x98()
|
void LegoJetski::VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ void LegoJetskiRaceActor::VTable0x70(float p_float)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100822d0
|
// STUB: LEGO1 0x100822d0
|
||||||
void LegoJetskiRaceActor::VTable0x98()
|
void LegoJetskiRaceActor::VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -400,6 +400,7 @@ void LegoExtraActor::SetWorldSpeed(MxFloat p_worldSpeed)
|
||||||
if (m_curAnim == 0 && p_worldSpeed > 0) {
|
if (m_curAnim == 0 && p_worldSpeed > 0) {
|
||||||
VTable0xc4();
|
VTable0xc4();
|
||||||
}
|
}
|
||||||
|
|
||||||
LegoAnimActor::SetWorldSpeed(p_worldSpeed);
|
LegoAnimActor::SetWorldSpeed(p_worldSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -418,7 +418,8 @@ void LegoPathActor::VTable0x70(float p_time)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1002e8b0
|
// STUB: LEGO1 0x1002e8b0
|
||||||
void LegoPathActor::VTable0x98()
|
// FUNCTION: BETA10 0x100af2f7
|
||||||
|
void LegoPathActor::VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
@ -545,11 +546,85 @@ void LegoPathActor::ParseAction(char* p_extra)
|
||||||
LegoActor::ParseAction(p_extra);
|
LegoActor::ParseAction(p_extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1002f1b0
|
// FUNCTION: LEGO1 0x1002f1b0
|
||||||
// FUNCTION: BETA10 0x100af899
|
// FUNCTION: BETA10 0x100af899
|
||||||
MxResult LegoPathActor::VTable0x9c()
|
MxResult LegoPathActor::VTable0x9c()
|
||||||
{
|
{
|
||||||
// TODO
|
Mx3DPointFloat local34;
|
||||||
|
Mx3DPointFloat local48;
|
||||||
|
MxU32 local1c = 1;
|
||||||
|
MxU32 local20 = 1;
|
||||||
|
|
||||||
|
if (m_grec != NULL) {
|
||||||
|
if (m_grec->GetBit1()) {
|
||||||
|
local1c = 0;
|
||||||
|
local20 = 0;
|
||||||
|
|
||||||
|
Mx3DPointFloat vec;
|
||||||
|
switch (m_controller->FUN_1004a240(*m_grec, local34, local48, m_unk0xe4, m_destEdge, m_boundary)) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete m_grec;
|
||||||
|
m_grec = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (local1c != 0) {
|
||||||
|
VTable0x98(m_boundary, m_destEdge, m_unk0xe4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (local20 != 0) {
|
||||||
|
Mx3DPointFloat local78;
|
||||||
|
|
||||||
|
Vector3& v1 = *m_destEdge->GetOpposingPoint(*m_boundary);
|
||||||
|
Vector3& v2 = *m_destEdge->CCWVertex(*m_boundary);
|
||||||
|
|
||||||
|
LERP3(local34, v1, v2, m_unk0xe4);
|
||||||
|
|
||||||
|
m_destEdge->FUN_1002ddc0(*m_boundary, local78);
|
||||||
|
local48.EqualsCross(m_boundary->GetUnknown0x14(), &local78);
|
||||||
|
local48.Unitize();
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 rightRef(m_unk0xec[0]);
|
||||||
|
Vector3 upRef(m_unk0xec[1]);
|
||||||
|
Vector3 dirRef(m_unk0xec[2]);
|
||||||
|
|
||||||
|
upRef = *m_boundary->GetUnknown0x14();
|
||||||
|
|
||||||
|
rightRef.EqualsCross(&upRef, &dirRef);
|
||||||
|
rightRef.Unitize();
|
||||||
|
|
||||||
|
dirRef.EqualsCross(&rightRef, &upRef);
|
||||||
|
dirRef.Unitize();
|
||||||
|
|
||||||
|
Mx3DPointFloat localc0(m_unk0xec[3]);
|
||||||
|
Mx3DPointFloat local84(m_unk0xec[2]);
|
||||||
|
Mx3DPointFloat local70(local34);
|
||||||
|
|
||||||
|
((Vector3&) local70).Sub(&localc0);
|
||||||
|
float len = local70.LenSquared();
|
||||||
|
if (len >= 0.0f) {
|
||||||
|
len = sqrt(len);
|
||||||
|
((Vector3&) local84).Mul(len);
|
||||||
|
((Vector3&) local48).Mul(len);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_userNavFlag) {
|
||||||
|
((Vector3&) local84).Mul(-1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (VTable0x80(localc0, local84, local34, local48) != SUCCESS) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_unk0x7c = 0.0f;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -731,7 +731,7 @@ MxResult LegoPathController::ReadVector(LegoStorage* p_storage, Mx4DPointFloat&
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1004a240
|
// FUNCTION: LEGO1 0x1004a240
|
||||||
// FUNCTION: BETA10 0x100b9160
|
// FUNCTION: BETA10 0x100b9160
|
||||||
MxU32 LegoPathController::FUN_1004a240(
|
MxS32 LegoPathController::FUN_1004a240(
|
||||||
LegoPathEdgeContainer& p_grec,
|
LegoPathEdgeContainer& p_grec,
|
||||||
Vector3& p_v1,
|
Vector3& p_v1,
|
||||||
Vector3& p_v2,
|
Vector3& p_v2,
|
||||||
|
|
|
@ -91,7 +91,7 @@ MxResult LegoRaceCar::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10014550
|
// STUB: LEGO1 0x10014550
|
||||||
void LegoRaceCar::VTable0x98()
|
void LegoRaceCar::VTable0x98(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue