Refactor LegoActorStruct into unknown class in misc lib (#782)

This commit is contained in:
Christian Semmler
2024-04-07 08:36:58 -04:00
committed by GitHub
parent b394770864
commit 1bfe47357b
5 changed files with 50 additions and 34 deletions

View File

@@ -3,19 +3,12 @@
#include "legoactor.h"
#include "legopathboundary.h"
#include "misc/legounknown.h"
#include "mxtypes.h"
#include "realtime/matrix.h"
class LegoPathController;
struct LegoActorStruct {
LegoActorStruct();
~LegoActorStruct();
void FUN_1009a140(Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, Vector3& p_point4);
Mx3DPointFloat m_unk0x00[4]; // 0x00
};
// VTABLE: LEGO1 0x100d6e28
// SIZE 0x154
class LegoPathActor : public LegoActor {
@@ -114,7 +107,7 @@ protected:
MxFloat m_actorTime; // 0x80
MxFloat m_lastTime; // 0x84
LegoPathBoundary* m_boundary; // 0x88
LegoActorStruct m_unk0x8c; // 0x8c
LegoUnknown m_unk0x8c; // 0x8c
MxU32 m_state; // 0xdc
Edge* m_destEdge; // 0xe0
undefined4 m_unk0xe4; // 0xe4

View File

@@ -124,28 +124,3 @@ void LegoPathActor::VTable0xa8()
{
// TODO
}
// FUNCTION: LEGO1 0x1009a0f0
LegoActorStruct::LegoActorStruct()
{
for (MxS32 i = 0; i < _countof(m_unk0x00); i++) {
m_unk0x00[i].Clear();
}
}
// FUNCTION: LEGO1 0x1009a130
LegoActorStruct::~LegoActorStruct()
{
}
// FUNCTION: LEGO1 0x1009a140
void LegoActorStruct::FUN_1009a140(Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, Vector3& p_point4)
{
m_unk0x00[0] = p_point1;
m_unk0x00[1] = p_point2;
for (MxS32 i = 0; i < 3; i++) {
m_unk0x00[2][i] = (p_point3[i] - p_point1[i]) * 3.0f - p_point2[i] * 2.0f - p_point4[i];
m_unk0x00[3][i] = (p_point1[i] - p_point3[i]) * 2.0f + p_point4[i] + p_point2[i];
}
}