add size asserts

This commit is contained in:
itsmattkc 2023-08-03 10:57:07 -07:00
parent 7df05beaf8
commit 24e0725397
11 changed files with 25 additions and 3 deletions

View File

@ -45,6 +45,7 @@ add_library(lego1 SHARED
LEGO1/jukeboxentity.cpp LEGO1/jukeboxentity.cpp
LEGO1/jukeboxstate.cpp LEGO1/jukeboxstate.cpp
LEGO1/legoact2state.cpp LEGO1/legoact2state.cpp
LEGO1/legoactor.cpp
LEGO1/legoactioncontrolpresenter.cpp LEGO1/legoactioncontrolpresenter.cpp
LEGO1/legoanimactor.cpp LEGO1/legoanimactor.cpp
LEGO1/legoanimationmanager.cpp LEGO1/legoanimationmanager.cpp

View File

@ -1,5 +1,7 @@
#include "islepathactor.h" #include "islepathactor.h"
DECOMP_SIZE_ASSERT(IslePathActor, 0x160)
// OFFSET: LEGO1 0x1001a200 // OFFSET: LEGO1 0x1001a200
IslePathActor::IslePathActor() IslePathActor::IslePathActor()
{ {

View File

@ -6,7 +6,7 @@
#include "mxtypes.h" #include "mxtypes.h"
// VTABLE 0x100d4398 // VTABLE 0x100d4398
// SIZE >= 0x230 // SIZE 0x160
class IslePathActor : public LegoPathActor class IslePathActor : public LegoPathActor
{ {
public: public:

3
LEGO1/legoactor.cpp Normal file
View File

@ -0,0 +1,3 @@
#include "legoactor.h"
DECOMP_SIZE_ASSERT(LegoActor, 0x78)

View File

@ -20,6 +20,10 @@ class LegoActor : public LegoEntity
{ {
return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name); return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name);
} }
private:
undefined unk68[0x10];
}; };
#endif // LEGOACTOR_H #endif // LEGOACTOR_H

View File

@ -1,5 +1,7 @@
#include "legoentity.h" #include "legoentity.h"
DECOMP_SIZE_ASSERT(LegoEntity, 0x68)
// OFFSET: LEGO1 0x1000c290 // OFFSET: LEGO1 0x1000c290
LegoEntity::~LegoEntity() LegoEntity::~LegoEntity()
{ {

View File

@ -4,6 +4,7 @@
#include "mxentity.h" #include "mxentity.h"
// VTABLE 0x100d4858 // VTABLE 0x100d4858
// SIZE 0x68 (probably)
class LegoEntity : public MxEntity class LegoEntity : public MxEntity
{ {
public: public:

View File

@ -1,5 +1,7 @@
#include "legopathactor.h" #include "legopathactor.h"
DECOMP_SIZE_ASSERT(LegoPathActor, 0x154)
// OFFSET: LEGO1 0x1002d700 STUB // OFFSET: LEGO1 0x1002d700 STUB
LegoPathActor::LegoPathActor() LegoPathActor::LegoPathActor()
{ {

View File

@ -27,7 +27,9 @@ class LegoPathActor : public LegoActor
} }
// TODO: the types. Pizza needs this as public: // TODO: the types. Pizza needs this as public:
undefined unk78[0xc4];
MxS32 m_unk13c; MxS32 m_unk13c;
undefined unk140[0x14];
}; };
#endif // LEGOPATHACTOR_H #endif // LEGOPATHACTOR_H

View File

@ -1,5 +1,7 @@
#include "mxentity.h" #include "mxentity.h"
DECOMP_SIZE_ASSERT(MxEntity, 0x68)
// OFFSET: LEGO1 0x1001d190 // OFFSET: LEGO1 0x1001d190
MxEntity::MxEntity() MxEntity::MxEntity()
{ {

View File

@ -1,11 +1,13 @@
#ifndef MXENTITY_H #ifndef MXENTITY_H
#define MXENTITY_H #define MXENTITY_H
#include "decomp.h"
#include "mxatomid.h" #include "mxatomid.h"
#include "mxcore.h" #include "mxcore.h"
#include "mxtypes.h" #include "mxtypes.h"
// VTABLE 0x100d5390 // VTABLE 0x100d5390
// SIZE 0x68 or less
class MxEntity : public MxCore class MxEntity : public MxCore
{ {
public: public:
@ -27,6 +29,7 @@ class MxEntity : public MxCore
private: private:
MxS32 m_mxEntityId; // 0x8 MxS32 m_mxEntityId; // 0x8
MxAtomId m_atom; // 0xc MxAtomId m_atom; // 0xc
undefined m_unk10[0x58];
}; };
#endif // MXENTITY_H #endif // MXENTITY_H