2023-06-29 04:10:08 -04:00
|
|
|
#ifndef LEGOPATHCONTROLLER_H
|
|
|
|
#define LEGOPATHCONTROLLER_H
|
|
|
|
|
2024-02-04 12:33:37 -05:00
|
|
|
#include "decomp.h"
|
2024-05-11 12:23:18 -04:00
|
|
|
#include "geom/legounkown100db7f4.h"
|
2024-05-11 09:32:11 -04:00
|
|
|
#include "legopathactor.h"
|
|
|
|
#include "legopathboundary.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
#include "mxcore.h"
|
2024-05-03 12:19:12 -04:00
|
|
|
#include "mxstl/stlcompat.h"
|
2024-03-24 17:30:04 -04:00
|
|
|
|
2024-04-23 04:33:38 -04:00
|
|
|
class LegoAnimPresenter;
|
2024-05-21 15:03:50 -04:00
|
|
|
class LegoPathStruct;
|
2024-03-24 17:30:04 -04:00
|
|
|
class LegoWorld;
|
2024-05-03 12:19:12 -04:00
|
|
|
class MxAtomId;
|
|
|
|
class Vector3;
|
2024-02-04 12:33:37 -05:00
|
|
|
|
2024-06-25 11:56:30 -04:00
|
|
|
#if defined(_M_IX86) || defined(__i386__)
|
|
|
|
#define COMPARE_POINTER_TYPE MxS32
|
|
|
|
#else
|
|
|
|
#define COMPARE_POINTER_TYPE MxS32*
|
|
|
|
#endif
|
|
|
|
|
2024-05-11 12:23:18 -04:00
|
|
|
// VTABLE: LEGO1 0x100d7da8
|
|
|
|
// SIZE 0x40
|
2024-05-11 13:45:13 -04:00
|
|
|
struct LegoPathCtrlEdge : public LegoUnknown100db7f4 {};
|
2024-05-11 12:23:18 -04:00
|
|
|
|
|
|
|
struct LegoPathCtrlEdgeCompare {
|
|
|
|
MxU32 operator()(const LegoPathCtrlEdge* p_lhs, const LegoPathCtrlEdge* p_rhs) const
|
|
|
|
{
|
2024-06-25 11:56:30 -04:00
|
|
|
return (COMPARE_POINTER_TYPE) p_lhs < (COMPARE_POINTER_TYPE) p_rhs;
|
2024-05-11 12:23:18 -04:00
|
|
|
}
|
2024-03-26 13:51:52 -04:00
|
|
|
};
|
|
|
|
|
2024-05-11 12:23:18 -04:00
|
|
|
typedef set<LegoPathCtrlEdge*, LegoPathCtrlEdgeCompare> LegoPathCtrlEdgeSet;
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// VTABLE: LEGO1 0x100d7d60
|
2023-06-29 04:10:08 -04:00
|
|
|
// SIZE 0x40
|
2023-10-24 19:38:27 -04:00
|
|
|
class LegoPathController : public MxCore {
|
2023-06-29 04:10:08 -04:00
|
|
|
public:
|
2024-05-12 14:33:20 -04:00
|
|
|
// SIZE 0x08
|
|
|
|
struct CtrlBoundary {
|
|
|
|
// FUNCTION: LEGO1 0x10046dc0
|
|
|
|
CtrlBoundary()
|
|
|
|
{
|
|
|
|
m_controller = NULL;
|
|
|
|
m_boundary = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
LegoPathController* m_controller; // 0x00
|
|
|
|
LegoPathBoundary* m_boundary; // 0x04
|
|
|
|
};
|
|
|
|
|
|
|
|
// SIZE 0x08
|
|
|
|
struct CtrlEdge {
|
|
|
|
// FUNCTION: LEGO1 0x10046dd0
|
|
|
|
CtrlEdge()
|
|
|
|
{
|
|
|
|
m_controller = NULL;
|
|
|
|
m_edge = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
LegoPathController* m_controller; // 0x00
|
|
|
|
LegoEdge* m_edge; // 0x04
|
|
|
|
};
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
LegoPathController();
|
2024-02-01 15:42:10 -05:00
|
|
|
~LegoPathController() override { Destroy(); }
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2024-02-01 15:42:10 -05:00
|
|
|
MxResult Tickle() override; // vtable+08
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10045110
|
2024-07-04 19:06:32 -04:00
|
|
|
const char* ClassName() const override // vtable+0x0c
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-27 15:59:42 -05:00
|
|
|
// STRING: LEGO1 0x100f11b8
|
2023-10-24 19:38:27 -04:00
|
|
|
return "LegoPathController";
|
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10045120
|
2024-07-04 19:06:32 -04:00
|
|
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
2023-10-24 19:38:27 -04:00
|
|
|
{
|
2023-12-13 05:48:14 -05:00
|
|
|
return !strcmp(p_name, LegoPathController::ClassName()) || MxCore::IsA(p_name);
|
2023-10-24 19:38:27 -04:00
|
|
|
}
|
2024-01-18 08:34:14 -05:00
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x10045740
|
|
|
|
// LegoPathController::`scalar deleting destructor'
|
|
|
|
|
2024-05-12 14:33:20 -04:00
|
|
|
virtual MxResult Create(MxU8* p_data, const Vector3& p_location, const MxAtomId& p_trigger); // vtable+0x14
|
|
|
|
virtual void Destroy(); // vtable+0x18
|
2024-02-02 12:18:46 -05:00
|
|
|
|
2024-05-29 13:24:08 -04:00
|
|
|
MxResult PlaceActor(
|
2024-05-04 10:13:05 -04:00
|
|
|
LegoPathActor* p_actor,
|
2024-05-10 14:07:38 -04:00
|
|
|
const char* p_name,
|
2024-05-04 10:13:05 -04:00
|
|
|
MxS32 p_src,
|
|
|
|
float p_srcScale,
|
|
|
|
MxS32 p_dest,
|
|
|
|
float p_destScale
|
|
|
|
);
|
2024-05-29 13:24:08 -04:00
|
|
|
MxResult PlaceActor(
|
2024-05-13 06:46:59 -04:00
|
|
|
LegoPathActor* p_actor,
|
|
|
|
LegoAnimPresenter* p_presenter,
|
|
|
|
Vector3& p_position,
|
|
|
|
Vector3& p_direction
|
|
|
|
);
|
2024-05-29 13:24:08 -04:00
|
|
|
MxResult PlaceActor(LegoPathActor* p_actor);
|
2024-05-13 06:46:59 -04:00
|
|
|
MxResult RemoveActor(LegoPathActor* p_actor);
|
2024-04-23 04:33:38 -04:00
|
|
|
void FUN_100468f0(LegoAnimPresenter* p_presenter);
|
2024-04-24 09:51:28 -04:00
|
|
|
void FUN_10046930(LegoAnimPresenter* p_presenter);
|
2024-05-12 15:30:34 -04:00
|
|
|
MxResult FUN_10046b30(LegoPathBoundary*& p_boundaries, MxS32& p_numL);
|
2024-05-09 09:57:38 -04:00
|
|
|
LegoPathBoundary* GetPathBoundary(const char* p_name);
|
2024-02-02 12:18:46 -05:00
|
|
|
void Enable(MxBool p_enable);
|
2024-03-24 17:30:04 -04:00
|
|
|
void FUN_10046bb0(LegoWorld* p_world);
|
2024-05-20 12:27:54 -04:00
|
|
|
MxS32 FUN_1004a240(
|
2024-05-20 11:34:31 -04:00
|
|
|
LegoPathEdgeContainer& p_grec,
|
|
|
|
Vector3& p_v1,
|
|
|
|
Vector3& p_v2,
|
|
|
|
float p_f1,
|
|
|
|
LegoUnknown100db7f4*& p_edge,
|
|
|
|
LegoPathBoundary*& p_boundary
|
|
|
|
);
|
2024-05-14 08:13:27 -04:00
|
|
|
|
2024-05-12 14:33:20 -04:00
|
|
|
static MxResult Init();
|
2024-05-14 08:13:27 -04:00
|
|
|
static MxResult Reset();
|
2024-03-22 21:30:58 -04:00
|
|
|
|
|
|
|
private:
|
2024-05-12 15:10:26 -04:00
|
|
|
void FUN_10046970();
|
2024-05-11 12:23:18 -04:00
|
|
|
MxResult Read(LegoStorage* p_storage);
|
2024-05-11 13:45:13 -04:00
|
|
|
MxResult ReadStructs(LegoStorage* p_storage);
|
|
|
|
MxResult ReadEdges(LegoStorage* p_storage);
|
2024-05-11 13:55:28 -04:00
|
|
|
MxResult ReadBoundaries(LegoStorage* p_storage);
|
|
|
|
static MxResult ReadVector(LegoStorage* p_storage, Mx3DPointFloat& p_vec);
|
|
|
|
static MxResult ReadVector(LegoStorage* p_storage, Mx4DPointFloat& p_vec);
|
2024-05-11 12:23:18 -04:00
|
|
|
|
2024-05-12 14:33:20 -04:00
|
|
|
LegoPathBoundary* m_boundaries; // 0x08
|
|
|
|
LegoPathCtrlEdge* m_edges; // 0x0c
|
|
|
|
Mx3DPointFloat* m_unk0x10; // 0x10
|
|
|
|
LegoPathStruct* m_structs; // 0x14
|
|
|
|
MxU16 m_numL; // 0x18
|
|
|
|
MxU16 m_numE; // 0x1a
|
|
|
|
MxU16 m_numN; // 0x1c
|
|
|
|
MxU16 m_numT; // 0x1e
|
|
|
|
LegoPathCtrlEdgeSet m_pfsE; // 0x20
|
|
|
|
LegoPathActorSet m_actors; // 0x30
|
2023-06-29 04:10:08 -04:00
|
|
|
};
|
|
|
|
|
2024-05-11 09:32:11 -04:00
|
|
|
// clang-format off
|
2024-05-13 06:46:59 -04:00
|
|
|
// TEMPLATE: LEGO1 0x1001fd70
|
|
|
|
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Lbound
|
|
|
|
|
2024-05-12 15:10:26 -04:00
|
|
|
// TEMPLATE: LEGO1 0x1002c4a0
|
|
|
|
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Buynode
|
|
|
|
|
2024-05-11 09:32:11 -04:00
|
|
|
// TEMPLATE: LEGO1 0x100451a0
|
2024-05-11 12:23:18 -04:00
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::~_Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathControl
|
2024-05-11 09:32:11 -04:00
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x100457e0
|
2024-05-11 12:23:18 -04:00
|
|
|
// Set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare>::~Set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare>
|
2024-05-11 09:32:11 -04:00
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10045830
|
2024-05-11 12:23:18 -04:00
|
|
|
// set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::~set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >
|
|
|
|
|
2024-05-13 08:39:43 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10046640
|
|
|
|
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::find
|
|
|
|
|
2024-05-13 06:46:59 -04:00
|
|
|
// TEMPLATE: LEGO1 0x100468c0
|
|
|
|
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Ubound
|
|
|
|
|
2024-05-11 12:23:18 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10047550
|
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Insert
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x100474e0
|
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::iterator::_Dec
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10047530
|
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Buynode
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x100477d0
|
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Lrotate
|
|
|
|
|
|
|
|
// TEMPLATE: LEGO1 0x10047830
|
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Rrotate
|
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x10047940
|
|
|
|
// LegoPathCtrlEdge::`vector deleting destructor'
|
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x100479d0
|
|
|
|
// LegoPathCtrlEdge::LegoPathCtrlEdge
|
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x10047a30
|
|
|
|
// LegoPathCtrlEdge::~LegoPathCtrlEdge
|
|
|
|
|
|
|
|
// SYNTHETIC: LEGO1 0x10047ae0
|
|
|
|
// LegoUnknown100db7f4::~LegoUnknown100db7f4
|
|
|
|
|
2024-05-20 11:34:31 -04:00
|
|
|
// TEMPLATE: LEGO1 0x10048f70
|
|
|
|
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::erase
|
|
|
|
|
2024-05-11 12:23:18 -04:00
|
|
|
// TEMPLATE: LEGO1 0x1004a780
|
|
|
|
// _Construct
|
2024-05-11 09:32:11 -04:00
|
|
|
|
|
|
|
// GLOBAL: LEGO1 0x100f4360
|
2024-05-11 12:23:18 -04:00
|
|
|
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Nil
|
2024-05-11 09:32:11 -04:00
|
|
|
// clang-format on
|
|
|
|
|
2023-06-29 04:10:08 -04:00
|
|
|
#endif // LEGOPATHCONTROLLER_H
|