Implement/match LegoPathController::FUN_1004a240 (#941)

This commit is contained in:
Christian Semmler
2024-05-20 11:34:31 -04:00
committed by GitHub
parent 8428cde67f
commit 3342464321
19 changed files with 141 additions and 31 deletions

View File

@@ -15,7 +15,7 @@ public:
MxS32 VTable0x68(Vector3&, Vector3&, Vector3&) override; // vtable+0x68
void VTable0x70(float p_und) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94
MxResult WaitForAnimation() override; // vtable+0x9c
MxResult VTable0x9c() override; // vtable+0x9c
MxS32 VTable0xa0() override; // vtable+0xa0
// SYNTHETIC: LEGO1 0x1001a0a0

View File

@@ -39,7 +39,7 @@ public:
MxU32 VTable0x90(float, Matrix4&) override; // vtable+0x90
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
void VTable0x98() override; // vtable+0x98
MxResult WaitForAnimation() override; // vtable+0x9c
MxResult VTable0x9c() override; // vtable+0x9c
virtual void FUN_10080590();

View File

@@ -46,7 +46,7 @@ public:
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
MxU32 VTable0x90(float p_float, Matrix4& p_matrix) override; // vtable+0x90
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
MxResult WaitForAnimation() override; // vtable+0x9c
MxResult VTable0x9c() override; // vtable+0x9c
void VTable0xa4(MxU8& p_und1, MxS32& p_und2) override; // vtable+0xa4
void VTable0xc4() override; // vtable+0xc4

View File

@@ -44,7 +44,7 @@ public:
void VTable0x70(float p_float) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
void VTable0x98() override; // vtable+0x98
MxResult WaitForAnimation() override; // vtable+0x9c
MxResult VTable0x9c() override; // vtable+0x9c
virtual void FUN_100136f0(float p_worldSpeed);

View File

@@ -37,7 +37,7 @@ public:
) override; // vtable+0x6c
void VTable0x70(float p_float) override; // vtable+0x70
void VTable0x98() override; // vtable+0x98
MxResult WaitForAnimation() override; // vtable+0x9c
MxResult VTable0x9c() override; // vtable+0x9c
void VTable0x1c() override; // vtable+0x1c
// SYNTHETIC: LEGO1 0x10081d40

View File

@@ -9,6 +9,7 @@
struct LegoEdge;
class LegoPathBoundary;
class LegoPathController;
struct LegoPathEdgeContainer;
struct LegoUnknown100db7f4;
class LegoWEEdge;
@@ -85,8 +86,8 @@ public:
// FUNCTION: LEGO1 0x10002d50
virtual MxResult VTable0x94(LegoPathActor*, MxBool) { return 0; } // vtable+0x94
virtual void VTable0x98(); // vtable+0x98
virtual MxResult WaitForAnimation(); // vtable+0x9c
virtual void VTable0x98(); // vtable+0x98
virtual MxResult VTable0x9c(); // vtable+0x9c
// FUNCTION: LEGO1 0x10002d60
virtual MxS32 VTable0xa0() { return 0; } // vtable+0xa0
@@ -148,13 +149,13 @@ protected:
LegoPathBoundary* m_boundary; // 0x88
LegoUnknown m_unk0x8c; // 0x8c
MxU32 m_state; // 0xdc
LegoEdge* m_destEdge; // 0xe0
LegoUnknown100db7f4* m_destEdge; // 0xe0
MxFloat m_unk0xe4; // 0xe4
undefined m_unk0xe8; // 0xe8
undefined m_unk0xe9; // 0xe9
MxBool m_userNavFlag; // 0xea
MxMatrix m_unk0xec; // 0xec
undefined* m_unk0x134; // 0x134
LegoPathEdgeContainer* m_grec; // 0x134
LegoPathController* m_controller; // 0x138
MxFloat m_unk0x13c; // 0x13c
MxFloat m_unk0x140; // 0x140
@@ -164,6 +165,12 @@ protected:
MxFloat m_unk0x150; // 0x150
};
// TEMPLATE: LEGO1 0x10018b70
// List<LegoBoundaryEdge>::~List<LegoBoundaryEdge>
// TEMPLATE: LEGO1 0x10018bc0
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::~list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >
// TEMPLATE: LEGO1 0x1002ef10
// list<LegoPathBoundary *,allocator<LegoPathBoundary *> >::~list<LegoPathBoundary *,allocator<LegoPathBoundary *> >

View File

@@ -34,7 +34,13 @@ public:
MxResult AddActor(LegoPathActor* p_actor);
MxResult RemoveActor(LegoPathActor* p_actor);
void FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPathActor* p_actor);
MxU32 Intersect(float p_scale, Vector3& p_point1, Vector3& p_point2, Vector3& p_point3, LegoEdge*& p_edge);
MxU32 Intersect(
float p_scale,
Vector3& p_point1,
Vector3& p_point2,
Vector3& p_point3,
LegoUnknown100db7f4*& p_edge
);
MxU32 FUN_10057fe0(LegoAnimPresenter* p_presenter);
MxU32 FUN_100586e0(LegoAnimPresenter* p_presenter);

View File

@@ -103,6 +103,14 @@ public:
LegoPathBoundary* GetPathBoundary(const char* p_name);
void Enable(MxBool p_enable);
void FUN_10046bb0(LegoWorld* p_world);
MxU32 FUN_1004a240(
LegoPathEdgeContainer& p_grec,
Vector3& p_v1,
Vector3& p_v2,
float p_f1,
LegoUnknown100db7f4*& p_edge,
LegoPathBoundary*& p_boundary
);
static MxResult Init();
static MxResult Reset();
@@ -177,6 +185,9 @@ private:
// SYNTHETIC: LEGO1 0x10047ae0
// LegoUnknown100db7f4::~LegoUnknown100db7f4
// TEMPLATE: LEGO1 0x10048f70
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::erase
// TEMPLATE: LEGO1 0x1004a780
// _Construct

View File

@@ -0,0 +1,49 @@
#ifndef LEGOPATHEDGECONTAINER_H
#define LEGOPATHEDGECONTAINER_H
#include "mxgeometry/mxgeometry3d.h"
#include "mxstl/stlcompat.h"
#include "mxtypes.h"
class LegoPathBoundary;
struct LegoUnknown100db7f4;
// SIZE 0x08
struct LegoBoundaryEdge {
LegoUnknown100db7f4* m_edge; // 0x00
LegoPathBoundary* m_boundary; // 0x04
int operator==(LegoBoundaryEdge) const { return 0; }
int operator<(LegoBoundaryEdge) const { return 0; }
};
// SIZE 0x3c
struct LegoPathEdgeContainer : public list<LegoBoundaryEdge> {
enum {
c_bit1 = 0x01
};
// FUNCTION: BETA10 0x100118e0
LegoPathEdgeContainer()
{
m_boundary = NULL;
m_flags = 0;
}
void SetBit1(MxU32 p_flag)
{
if (p_flag) {
m_flags |= c_bit1;
}
else {
m_flags &= ~c_bit1;
}
}
Mx3DPointFloat m_unk0x0c; // 0x0c
Mx3DPointFloat m_unk0x20; // 0x20
LegoPathBoundary* m_boundary; // 0x34
MxU8 m_flags; // 0x38
};
#endif // LEGOPATHEDGECONTAINER_H

View File

@@ -43,7 +43,7 @@ public:
void VTable0x70(float p_float) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
void VTable0x98() override; // vtable+0x98
MxResult WaitForAnimation() override; // vtable+0x9c
MxResult VTable0x9c() override; // vtable+0x9c
virtual void FUN_10012ea0(float p_worldSpeed);
virtual void FUN_10012ff0(float);