LegoActor implementation (#253)

* LegoActor

* LegoEntity

* Replace float with MxFloat

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha 2023-10-30 09:15:43 -04:00 committed by GitHub
parent f4646a7075
commit 787d932825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 31 deletions

View File

@ -3,43 +3,49 @@
DECOMP_SIZE_ASSERT(LegoActor, 0x78) DECOMP_SIZE_ASSERT(LegoActor, 0x78)
// Probably in header // Probably in header
// OFFSET: LEGO1 0x10002cc0 STUB // OFFSET: LEGO1 0x10002cc0
void LegoActor::VTable0x50() MxFloat LegoActor::VTable0x50()
{ {
// TODO return m_unk68;
} }
// OFFSET: LEGO1 0x10002cd0 STUB // OFFSET: LEGO1 0x10002cd0
void LegoActor::VTable0x54() void LegoActor::VTable0x54(MxFloat p_unk)
{ {
// TODO m_unk68 = p_unk;
} }
// OFFSET: LEGO1 0x10002ce0 STUB // OFFSET: LEGO1 0x10002ce0
void LegoActor::VTable0x58() void LegoActor::VTable0x58(MxFloat p_unk)
{ {
// TODO m_unk70 = p_unk;
} }
// OFFSET: LEGO1 0x10002cf0 STUB // OFFSET: LEGO1 0x10002cf0
void LegoActor::VTable0x5c() MxFloat LegoActor::VTable0x5c()
{ {
// TODO return m_unk70;
} }
// OFFSET: LEGO1 0x10002d00 STUB // OFFSET: LEGO1 0x10002d00
void LegoActor::VTable0x60() undefined LegoActor::VTable0x60()
{ {
// TODO return m_unk74;
} }
// OFFSET: LEGO1 0x10002d10 STUB // OFFSET: LEGO1 0x10002d10
void LegoActor::VTable0x64() void LegoActor::VTable0x64(undefined p_unk)
{ {
// TODO m_unk74 = p_unk;
} }
// End header // End header
// OFFSET: LEGO1 0x1002d110
LegoActor::LegoActor() LegoActor::LegoActor()
{ {
m_unk68 = 0.0f;
m_unk6c = 0;
m_unk70 = 0.0f;
m_unk10 = 0;
m_unk74 = 0;
} }

View File

@ -23,15 +23,18 @@ public:
return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name); return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name);
} }
virtual void VTable0x50(); // vtable+0x50 virtual MxFloat VTable0x50(); // vtable+0x50
virtual void VTable0x54(); // vtable+0x54 virtual void VTable0x54(MxFloat p_unk); // vtable+0x54
virtual void VTable0x58(); // vtable+0x58 virtual void VTable0x58(MxFloat p_unk); // vtable+0x58
virtual void VTable0x5c(); // vtable+0x5c virtual MxFloat VTable0x5c(); // vtable+0x5c
virtual void VTable0x60(); // vtable+0x60 virtual undefined VTable0x60(); // vtable+0x60
virtual void VTable0x64(); // vtable+0x64 virtual void VTable0x64(undefined p_unk); // vtable+0x64
private: private:
undefined unk68[0x10]; MxFloat m_unk68;
undefined4 m_unk6c;
MxFloat m_unk70;
undefined m_unk74;
}; };
#endif // LEGOACTOR_H #endif // LEGOACTOR_H

View File

@ -3,6 +3,7 @@
#include "define.h" #include "define.h"
#include "legoomni.h" #include "legoomni.h"
#include "legoutil.h" #include "legoutil.h"
#include "legoworld.h"
DECOMP_SIZE_ASSERT(LegoEntity, 0x68) DECOMP_SIZE_ASSERT(LegoEntity, 0x68)
@ -60,12 +61,12 @@ void LegoEntity::Destroy(MxBool p_fromDestructor)
Init(); Init();
} }
// OFFSET: LEGO1 0x10010880 STUB // OFFSET: LEGO1 0x10010880
void LegoEntity::SetWorld() void LegoEntity::SetWorld()
{ {
LegoWorld* world = GetCurrentWorld(); LegoWorld* world = GetCurrentWorld();
if (world != NULL && world != (LegoWorld*) this) { if (world != NULL && world != (LegoWorld*) this) {
// TODO: world->AddEntity(this); world->VTable0x58(this);
} }
} }

View File

@ -13,10 +13,7 @@
class LegoEntity : public MxEntity { class LegoEntity : public MxEntity {
public: public:
// Inlined at 0x100853f7 // Inlined at 0x100853f7
inline LegoEntity() inline LegoEntity() { Init(); }
{
// TODO
}
__declspec(dllexport) virtual ~LegoEntity() override; // vtable+0x0 __declspec(dllexport) virtual ~LegoEntity() override; // vtable+0x0