Order functions in binary up to the end of Helicopter; refactor vector/matrix classes (#1309)

* Order experimentation

* Revert IslePathActor

* Fix order

* Fix inlining

* Fixes

* WIP

* WIP

* Refactor

* Refactor

* Fix operators

* Remove obsolete inline keyword

* Fix ctors

* Refactor

* Rename files

* Refactor

* Remove empty line
This commit is contained in:
Christian Semmler
2025-01-04 15:07:04 -07:00
committed by GitHub
parent b8f1364ac7
commit c54805fde8
25 changed files with 1245 additions and 1030 deletions

View File

@@ -10,6 +10,7 @@ class Act3Brickster;
class Act3Cop;
class Act3Shark;
class Helicopter;
class MxQuaternionTransformer;
// Macros confirmed by BETA10
#define MAX_PIZZAS 20
@@ -152,7 +153,7 @@ protected:
const Matrix4& p_destination,
const Matrix4& p_startPosition,
const Matrix4& p_endPosition,
const UnknownMx4DPointFloat& p_unk0x1f4
const MxQuaternionTransformer& p_unk0x1f4
);
Act3State* m_state; // 0xf8

View File

@@ -3,7 +3,7 @@
#include "islepathactor.h"
#include "legostate.h"
#include "realtime/matrix.h"
#include "mxgeometry/mxquaternion.h"
class Act3;
@@ -88,12 +88,12 @@ public:
protected:
void FUN_100042a0(const Matrix4& p_matrix);
MxMatrix m_unk0x160; // 0x160
MxMatrix m_unk0x1a8; // 0x1a8
float m_unk0x1f0; // 0x1f0
UnknownMx4DPointFloat m_unk0x1f4; // 0x1f4
HelicopterState* m_state; // 0x228
MxAtomId m_script; // 0x22c
MxMatrix m_unk0x160; // 0x160
MxMatrix m_unk0x1a8; // 0x1a8
float m_unk0x1f0; // 0x1f0
MxQuaternionTransformer m_unk0x1f4; // 0x1f4
HelicopterState* m_state; // 0x228
MxAtomId m_script; // 0x22c
};
#endif // HELICOPTER_H

View File

@@ -86,6 +86,26 @@ public:
IslePathActor();
// FUNCTION: LEGO1 0x10002e70
virtual MxLong HandleClick() { return 0; } // vtable+0xcc
// FUNCTION: LEGO1 0x10002df0
virtual MxLong HandleNotification0() { return 0; } // vtable+0xd0
// FUNCTION: LEGO1 0x10002e80
virtual MxLong HandleControl(LegoControlManagerNotificationParam&) { return 0; } // vtable+0xd4
// FUNCTION: LEGO1 0x10002e90
virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
// FUNCTION: LEGO1 0x10002e00
virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0xdc
virtual void Enter(); // vtable+0xe0
virtual void Exit(); // vtable+0xe4
virtual void SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8 p_flags); // vtable+0xe8
virtual void VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundary, MxBool p_reset); // vtable+0xec
// FUNCTION: LEGO1 0x10002e10
~IslePathActor() override { IslePathActor::Destroy(TRUE); }
@@ -108,29 +128,6 @@ public:
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
// FUNCTION: LEGO1 0x10002e70
virtual MxLong HandleClick() { return 0; } // vtable+0xcc
// FUNCTION: LEGO1 0x10002df0
virtual MxLong HandleNotification0() { return 0; } // vtable+0xd0
// FUNCTION: LEGO1 0x10002e80
virtual MxLong HandleControl(LegoControlManagerNotificationParam&) { return 0; } // vtable+0xd4
// FUNCTION: LEGO1 0x10002e90
virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
// FUNCTION: LEGO1 0x10002e00
virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0xdc
virtual void Enter(); // vtable+0xe0
virtual void Exit(); // vtable+0xe4
virtual void SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8 p_flags); // vtable+0xe8
virtual void VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundary, MxBool p_reset); // vtable+0xec
// SYNTHETIC: LEGO1 0x10002ff0
// IslePathActor::`scalar deleting destructor'
void FUN_1001b660();
void Reset()
@@ -143,6 +140,9 @@ public:
static void RegisterSpawnLocations();
// SYNTHETIC: LEGO1 0x10002ff0
// IslePathActor::`scalar deleting destructor'
protected:
LegoWorld* m_world; // 0x154
LegoPathActor* m_previousActor; // 0x158

View File

@@ -3,6 +3,7 @@
#include "decomp.h"
#include "legoentity.h"
#include "mxgeometry/mxmatrix.h"
class LegoCacheSound;

View File

@@ -7,7 +7,7 @@
#include "legostate.h"
#include "legotraninfolist.h"
#include "mxcore.h"
#include "mxgeometry/mxgeometry3d.h"
#include "mxgeometry/mxquaternion.h"
class LegoAnimPresenter;
class LegoEntity;
@@ -258,46 +258,46 @@ private:
void FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404);
void FUN_10064b50(MxLong p_time);
LegoOmni::World m_worldId; // 0x08
MxU16 m_animCount; // 0x0c
MxU16 m_unk0x0e; // 0x0e
MxU16 m_unk0x10; // 0x10
AnimInfo* m_anims; // 0x14
undefined2 m_unk0x18; // 0x18
MxBool m_unk0x1a; // 0x1a
MxU32 m_unk0x1c; // 0x1c
LegoTranInfoList* m_tranInfoList; // 0x20
LegoTranInfoList* m_tranInfoList2; // 0x24
MxPresenter* m_unk0x28[2]; // 0x28
MxLong m_unk0x30[2]; // 0x30
MxBool m_unk0x38; // 0x38
MxBool m_animRunning; // 0x39
MxBool m_enableCamAnims; // 0x3a
Extra m_extras[40]; // 0x3c
MxU32 m_lastExtraCharacterId; // 0x3fc
MxBool m_unk0x400; // 0x400
MxBool m_unk0x401; // 0x401
MxBool m_unk0x402; // 0x402
MxLong m_unk0x404; // 0x404
MxLong m_unk0x408; // 0x408
MxLong m_unk0x40c; // 0x40c
MxLong m_unk0x410; // 0x410
MxU32 m_unk0x414; // 0x414
MxU32 m_numAllowedExtras; // 0x418
undefined4 m_unk0x41c; // 0x41c
AnimState* m_animState; // 0x420
LegoROIList* m_unk0x424; // 0x424
MxBool m_suspendedEnableCamAnims; // 0x428
MxBool m_unk0x429; // 0x429
MxBool m_unk0x42a; // 0x42a
MxBool m_suspended; // 0x42b
LegoTranInfo* m_unk0x42c; // 0x42c
MxBool m_unk0x430; // 0x430
MxLong m_unk0x434; // 0x434
MxLong m_unk0x438; // 0x438
MxMatrix m_unk0x43c; // 0x43c
MxMatrix m_unk0x484; // 0x484
UnknownMx4DPointFloat m_unk0x4cc; // 0x4cc
LegoOmni::World m_worldId; // 0x08
MxU16 m_animCount; // 0x0c
MxU16 m_unk0x0e; // 0x0e
MxU16 m_unk0x10; // 0x10
AnimInfo* m_anims; // 0x14
undefined2 m_unk0x18; // 0x18
MxBool m_unk0x1a; // 0x1a
MxU32 m_unk0x1c; // 0x1c
LegoTranInfoList* m_tranInfoList; // 0x20
LegoTranInfoList* m_tranInfoList2; // 0x24
MxPresenter* m_unk0x28[2]; // 0x28
MxLong m_unk0x30[2]; // 0x30
MxBool m_unk0x38; // 0x38
MxBool m_animRunning; // 0x39
MxBool m_enableCamAnims; // 0x3a
Extra m_extras[40]; // 0x3c
MxU32 m_lastExtraCharacterId; // 0x3fc
MxBool m_unk0x400; // 0x400
MxBool m_unk0x401; // 0x401
MxBool m_unk0x402; // 0x402
MxLong m_unk0x404; // 0x404
MxLong m_unk0x408; // 0x408
MxLong m_unk0x40c; // 0x40c
MxLong m_unk0x410; // 0x410
MxU32 m_unk0x414; // 0x414
MxU32 m_numAllowedExtras; // 0x418
undefined4 m_unk0x41c; // 0x41c
AnimState* m_animState; // 0x420
LegoROIList* m_unk0x424; // 0x424
MxBool m_suspendedEnableCamAnims; // 0x428
MxBool m_unk0x429; // 0x429
MxBool m_unk0x42a; // 0x42a
MxBool m_suspended; // 0x42b
LegoTranInfo* m_unk0x42c; // 0x42c
MxBool m_unk0x430; // 0x430
MxLong m_unk0x434; // 0x434
MxLong m_unk0x438; // 0x438
MxMatrix m_unk0x43c; // 0x43c
MxMatrix m_unk0x484; // 0x484
MxQuaternionTransformer m_unk0x4cc; // 0x4cc
};
// TEMPLATE: LEGO1 0x10061750

View File

@@ -4,6 +4,7 @@
#include "legogamestate.h"
#include "legostate.h"
#include "legoworld.h"
#include "mxgeometry/mxquaternion.h"
class LegoCarBuildAnimPresenter;
class LegoControlManagerNotificationParam;
@@ -189,7 +190,7 @@ private:
MxS32 m_unk0x250[2]; // 0x250
LegoCarBuildAnimPresenter* m_unk0x258; // 0x258
UnknownMx4DPointFloat m_unk0x25c; // 0x25c
MxQuaternionTransformer m_unk0x25c; // 0x25c
// These two are likely locations in pixel space
MxS32 m_unk0x290[2]; // 0x290

View File

@@ -3,7 +3,6 @@
#include "legoactor.h"
#include "misc/legounknown.h"
#include "mxgeometry/mxmatrix.h"
#include "mxtypes.h"
struct LegoEdge;