Implement/match a few LegoEntity functions (#445)

* Implement/match a few LegoEntity functions

* Add annotations
This commit is contained in:
Christian Semmler
2024-01-16 14:33:03 -05:00
committed by GitHub
parent b1fdb780de
commit 6af0c6cb1a
13 changed files with 74 additions and 27 deletions

View File

@@ -37,7 +37,7 @@ public:
virtual MxResult Create(); // vtable+0x44
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
void FUN_100123e0(MxMatrix& p_transform, MxU32);
void FUN_100123e0(const MxMatrix& p_transform, MxU32);
Mx3DPointFloat GetWorldUp();
Mx3DPointFloat GetWorldLocation();
Mx3DPointFloat GetWorldDirection();

View File

@@ -12,10 +12,19 @@
// SIZE 0x68 (probably)
class LegoEntity : public MxEntity {
public:
enum {
Flag_Bit1 = 0x01
};
// Inlined at 0x100853f7
inline LegoEntity() { Init(); }
__declspec(dllexport) virtual ~LegoEntity() override; // vtable+0x0
#ifdef ISLE_APP
__declspec(dllexport) virtual ~LegoEntity() override;
#else
// FUNCTION: LEGO1 0x1000c290
__declspec(dllexport) virtual ~LegoEntity() override { Destroy(TRUE); }
#endif
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4
@@ -58,15 +67,15 @@ protected:
void Init();
void SetWorld();
undefined m_unk0x10;
undefined m_unk0x11;
undefined m_unk0x10; // 0x10
MxU8 m_flags; // 0x11
Mx3DPointFloat m_worldLocation; // 0x14
Mx3DPointFloat m_worldDirection; // 0x28
Mx3DPointFloat m_worldUp; // 0x3c
MxFloat m_worldSpeed; // 0x50
LegoROI* m_roi; // 0x54
MxBool m_cameraFlag; // 0x58
undefined m_unk0x59;
undefined m_unk0x59; // 0x59
// For tokens from the extra string that look like this:
// "Action:openram;\lego\scripts\Race\CarRaceR;0"
ExtraActionType m_actionType; // 0x5c
@@ -74,4 +83,7 @@ protected:
MxS32 m_actionArgNumber; // 0x64
};
// SYNTHETIC: LEGO1 0x1000c3b0
// LegoEntity::`scalar deleting destructor'
#endif // LEGOENTITY_H

View File

@@ -114,6 +114,7 @@ public:
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
MxDSAction& GetCurrentAction() { return m_action; }
LegoUnkSaveDataWriter* GetUnkSaveDataWriter() { return m_saveDataWriter; }
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
inline void SetWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
@@ -157,6 +158,7 @@ LegoControlManager* ControlManager();
IslePathActor* GetCurrentVehicle();
LegoPlantManager* PlantManager();
LegoWorld* GetCurrentWorld();
LegoUnkSaveDataWriter* GetUnkSaveDataWriter();
GifManager* GetGifManager();
void FUN_10015820(MxU32, MxU32);
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid);

View File

@@ -4,6 +4,7 @@
#include "decomp.h"
#include "mxtypes.h"
class LegoROI;
class LegoStream;
struct LegoSaveDataEntry3 {
@@ -32,7 +33,9 @@ struct LegoSaveDataEntry3 {
};
class LegoUnkSaveDataWriter {
public:
MxResult WriteSaveData3(LegoStream* p_stream);
void FUN_10083db0(LegoROI* p_roi);
};
#endif // LEGOUNKSAVEDATAWRITER_H