diff --git a/LEGO1/legoactor.cpp b/LEGO1/legoactor.cpp index c26cc1fc..7faa3b0d 100644 --- a/LEGO1/legoactor.cpp +++ b/LEGO1/legoactor.cpp @@ -1,3 +1,8 @@ #include "legoactor.h" DECOMP_SIZE_ASSERT(LegoActor, 0x78) + +// OFFSET: LEGO1 0x1002d110 STUB +LegoActor::LegoActor() +{ +} \ No newline at end of file diff --git a/LEGO1/legoactor.h b/LEGO1/legoactor.h index cc8778db..fe5e43a0 100644 --- a/LEGO1/legoactor.h +++ b/LEGO1/legoactor.h @@ -9,6 +9,8 @@ class LegoActor : public LegoEntity { public: + LegoActor(); + // OFFSET: LEGO1 0x1002d210 inline virtual const char *ClassName() const override // vtable+0x0c { diff --git a/LEGO1/legoentity.cpp b/LEGO1/legoentity.cpp index d2062946..105b4b5f 100644 --- a/LEGO1/legoentity.cpp +++ b/LEGO1/legoentity.cpp @@ -9,7 +9,7 @@ DECOMP_SIZE_ASSERT(LegoEntity, 0x68) // OFFSET: LEGO1 0x1000c290 LegoEntity::~LegoEntity() { - Destroy(); + Destroy(TRUE); } // OFFSET: LEGO1 0x100114f0 STUB @@ -20,6 +20,26 @@ MxLong LegoEntity::Notify(MxParam &p) return 0; } +// OFFSET: LEGO1 0x100105f0 +void LegoEntity::Reset() +{ + float value = 0.0f; + m_vec1.EqualsScalar(&value); + + value = 0.0f; + m_vec2.EqualsScalar(&value); + + m_unk50 = 0; + m_unk54 = 0; + m_unk58 = 0; + m_actionArgString = NULL; + m_unk10 = 0; + m_unk11 = 0; + m_actionType = ExtraActionType_unknown; + m_actionArgNumber = -1; + m_unk59 = 4; +} + // OFFSET: LEGO1 0x100107e0 STUB void LegoEntity::vtable18() { @@ -27,9 +47,14 @@ void LegoEntity::vtable18() } // OFFSET: LEGO1 0x10010810 STUB -void LegoEntity::Destroy() +void LegoEntity::Destroy(MxBool) { - // TODO + if (m_unk54) { + // TODO + } + + delete[] m_actionArgString; + Reset(); } // OFFSET: LEGO1 0x10010e10 diff --git a/LEGO1/legoentity.h b/LEGO1/legoentity.h index 9fbbb5bb..79acca27 100644 --- a/LEGO1/legoentity.h +++ b/LEGO1/legoentity.h @@ -2,7 +2,9 @@ #define LEGOENTITY_H #include "mxentity.h" +#include "mxvector.h" #include "extra.h" +#include "decomp.h" // VTABLE 0x100d4858 // SIZE 0x68 (probably) @@ -33,10 +35,21 @@ class LegoEntity : public MxEntity } virtual void vtable18(); // vtable+0x18 - virtual void Destroy(); // vtable+0x1c + virtual void Destroy(MxBool); // vtable+0x1c virtual void ParseAction(char *); // vtable+0x20 protected: + void Reset(); + + undefined m_unk10; + undefined m_unk11; + MxVector3Data m_vec1; // 0x14 + MxVector3Data m_vec2; // 0x28 + MxVector3Data m_vec3; // 0x3c + undefined4 m_unk50; + undefined4 m_unk54; + undefined m_unk58; + undefined m_unk59; // For tokens from the extra string that look like this: // "Action:openram;\lego\scripts\Race\CarRaceR;0" ExtraActionType m_actionType; // 0x5c diff --git a/LEGO1/mxcontrolpresenter.cpp b/LEGO1/mxcontrolpresenter.cpp index e9e10ef8..7210952c 100644 --- a/LEGO1/mxcontrolpresenter.cpp +++ b/LEGO1/mxcontrolpresenter.cpp @@ -1,7 +1,14 @@ #include "mxcontrolpresenter.h" -// OFFSET: LEGO1 0x10043f50 STUB +DECOMP_SIZE_ASSERT(MxControlPresenter, 0x5c) + +// OFFSET: LEGO1 0x10043f50 MxControlPresenter::MxControlPresenter() { - // TODO + this->m_unk4c = 0; + this->m_unk4e = -1; + this->m_unk50 = 0; + this->m_unk52 = 0; + this->m_unk58 = 0; + this->m_unk54 = 0; } \ No newline at end of file diff --git a/LEGO1/mxcontrolpresenter.h b/LEGO1/mxcontrolpresenter.h index 909a3502..18af66a3 100644 --- a/LEGO1/mxcontrolpresenter.h +++ b/LEGO1/mxcontrolpresenter.h @@ -1,6 +1,8 @@ #ifndef MXCONTROLPRESENTER_H #define MXCONTROLPRESENTER_H +#include "decomp.h" + #include "mxcompositepresenter.h" // VTABLE 0x100d7b88 @@ -22,7 +24,13 @@ class MxControlPresenter : public MxCompositePresenter { return !strcmp(name, MxControlPresenter::ClassName()) || MxCompositePresenter::IsA(name); } - +private: + undefined2 m_unk4c; + MxS16 m_unk4e; + undefined m_unk50; + undefined2 m_unk52; + undefined2 m_unk54; + undefined4 m_unk58; }; diff --git a/LEGO1/mxdsactionlist.h b/LEGO1/mxdsactionlist.h index 127dd142..fe0e162c 100644 --- a/LEGO1/mxdsactionlist.h +++ b/LEGO1/mxdsactionlist.h @@ -8,7 +8,7 @@ class MxDSAction; // VTABLE 0x100dced8 // SIZE 0x1c -class MxDSActionList : public MxList +class MxDSActionList : public MxList { public: MxDSActionList() { @@ -23,15 +23,15 @@ class MxDSActionList : public MxList undefined m_unk18; }; -typedef MxListCursorChild MxDSActionListCursor; +typedef MxListCursorChild MxDSActionListCursor; + +// OFFSET: LEGO1 0x100c9cc0 TEMPLATE +// MxListParent::Compare // OFFSET: LEGO1 0x100c9d20 TEMPLATE -// MxListParent::Destroy - -// OFFSET: LEGO1 0x100c9cd0 TEMPLATE -// MxListParent::~MxListParent +// MxListParent::Destroy // OFFSET: LEGO1 0x100c9d30 TEMPLATE -// MxList::~MxList +// MxList::~MxList #endif // MXDSACTIONLIST_H diff --git a/LEGO1/mxdsselectaction.cpp b/LEGO1/mxdsselectaction.cpp index 1c21b466..29f69022 100644 --- a/LEGO1/mxdsselectaction.cpp +++ b/LEGO1/mxdsselectaction.cpp @@ -5,12 +5,13 @@ DECOMP_SIZE_ASSERT(MxDSSelectAction, 0xb0) // OFFSET: LEGO1 0x100cb2b0 MxDSSelectAction::MxDSSelectAction() { - // TODO this->SetType(MxDSType_SelectAction); + this->m_unk0xac = new MxStringList; } -// OFFSET: LEGO1 0x100cb8d0 STUB +// OFFSET: LEGO1 0x100cb8d0 MxDSSelectAction::~MxDSSelectAction() { - // TODO + if (this->m_unk0xac) + delete this->m_unk0xac; } diff --git a/LEGO1/mxdsselectaction.h b/LEGO1/mxdsselectaction.h index df956fbc..d513efd0 100644 --- a/LEGO1/mxdsselectaction.h +++ b/LEGO1/mxdsselectaction.h @@ -2,6 +2,7 @@ #define MXDSSELECTACTION_H #include "mxdsparallelaction.h" +#include "mxstringlist.h" #include "decomp.h" // VTABLE 0x100dcfc8 @@ -25,12 +26,9 @@ class MxDSSelectAction : public MxDSParallelAction return !strcmp(name, MxDSSelectAction::ClassName()) || MxDSParallelAction::IsA(name); } - undefined4 m_unk0x9c; - undefined4 m_unk0xa0; - undefined4 m_unk0xa4; - undefined4 m_unk0xa8; - undefined4 m_unk0xac; - +private: + MxString m_unk0x9c; + MxStringList *m_unk0xac; }; #endif // MXDSSELECTACTION_H diff --git a/LEGO1/mxentity.cpp b/LEGO1/mxentity.cpp index 54e854ab..585150f1 100644 --- a/LEGO1/mxentity.cpp +++ b/LEGO1/mxentity.cpp @@ -1,8 +1,6 @@ #include "mxentity.h" -// Size subject to change. It's not clear yet which members belong to -// MxEntity and which belong only the subclasses. -DECOMP_SIZE_ASSERT(MxEntity, 0x5c) +DECOMP_SIZE_ASSERT(MxEntity, 0x10) // OFFSET: LEGO1 0x1001d190 MxEntity::MxEntity() diff --git a/LEGO1/mxentity.h b/LEGO1/mxentity.h index 3d73292e..44afd9c4 100644 --- a/LEGO1/mxentity.h +++ b/LEGO1/mxentity.h @@ -7,7 +7,7 @@ #include "mxtypes.h" // VTABLE 0x100d5390 -// SIZE 0x68 or less +// SIZE 0x10 class MxEntity : public MxCore { public: @@ -31,7 +31,6 @@ class MxEntity : public MxCore private: MxS32 m_mxEntityId; // 0x8 MxAtomId m_atom; // 0xc - undefined m_unk10[76]; }; #endif // MXENTITY_H diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index ed4c2802..12695f82 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -4,19 +4,24 @@ #include "mxtypes.h" #include "mxcore.h" -template // SIZE 0xc +template class MxListEntry { public: MxListEntry() {} - MxListEntry(T *p_obj, MxListEntry *p_prev) { + MxListEntry(T p_obj, MxListEntry *p_prev) { m_obj = p_obj; m_prev = p_prev; m_next = NULL; } - T *m_obj; + T GetValue() { return this->m_obj; } + + friend class MxList; + friend class MxListCursor; +private: + T m_obj; MxListEntry *m_prev; MxListEntry *m_next; }; @@ -33,12 +38,12 @@ class MxListParent : public MxCore } virtual ~MxListParent() {} - virtual MxS8 Compare(T *, T *) = 0; + virtual MxS8 Compare(T, T) { return 0; }; - static void Destroy(T *) {}; + static void Destroy(T) {}; protected: MxU32 m_count; // +0x8 - void (*m_customDestructor)(T *); // +0xc + void (*m_customDestructor)(T); // +0xc }; // VTABLE 0x100d6368 @@ -54,13 +59,12 @@ class MxList : protected MxListParent virtual ~MxList(); - void Append(T*); + void Append(T); void DeleteAll(); MxU32 GetCount() { return m_count; } - void SetDestroy(void (*p_customDestructor)(T *)) { this->m_customDestructor = p_customDestructor; } + void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; } friend class MxListCursor; - protected: MxListEntry *m_first; // +0x10 MxListEntry *m_last; // +0x14 @@ -79,10 +83,10 @@ class MxListCursor : public MxCore m_match = NULL; } - MxBool Find(T *p_obj); + MxBool Find(T p_obj); void Detach(); - MxBool Next(T*& p_obj); - void SetValue(T *p_obj); + MxBool Next(T& p_obj); + void SetValue(T p_obj); void Head() { m_match = m_list->m_first; } void Reset() { m_match = NULL; } @@ -123,7 +127,7 @@ inline void MxList::DeleteAll() break; MxListEntry *next = t->m_next; - m_customDestructor(t->m_obj); + m_customDestructor(t->GetValue()); delete t; t = next; } @@ -134,7 +138,7 @@ inline void MxList::DeleteAll() } template -inline void MxList::Append(T *p_newobj) +inline void MxList::Append(T p_newobj) { MxListEntry *currentLast = this->m_last; MxListEntry *newEntry = new MxListEntry(p_newobj, currentLast); @@ -169,7 +173,7 @@ inline void MxList::_DeleteEntry(MxListEntry *match) } template -inline MxBool MxListCursor::Find(T *p_obj) +inline MxBool MxListCursor::Find(T p_obj) { for (m_match = m_list->m_first; m_match && m_list->Compare(m_match->m_obj, p_obj); @@ -186,7 +190,7 @@ inline void MxListCursor::Detach() } template -inline MxBool MxListCursor::Next(T*& p_obj) +inline MxBool MxListCursor::Next(T& p_obj) { if (!m_match) m_match = m_list->m_first; @@ -200,7 +204,7 @@ inline MxBool MxListCursor::Next(T*& p_obj) } template -inline void MxListCursor::SetValue(T *p_obj) +inline void MxListCursor::SetValue(T p_obj) { if (m_match) m_match->m_obj = p_obj; diff --git a/LEGO1/mxpresenterlist.h b/LEGO1/mxpresenterlist.h index 71a7f9aa..0ee54a85 100644 --- a/LEGO1/mxpresenterlist.h +++ b/LEGO1/mxpresenterlist.h @@ -8,7 +8,7 @@ class MxPresenter; // Unclear what the purpose of this class is // VTABLE 0x100d62f0 // SIZE 0x18 -class MxPresenterListParent : public MxList +class MxPresenterListParent : public MxList { public: MxPresenterListParent() { @@ -24,15 +24,15 @@ class MxPresenterList : public MxPresenterListParent virtual MxS8 Compare(MxPresenter *, MxPresenter *); // +0x14 }; -typedef MxListCursorChildChild MxPresenterListCursor; +typedef MxListCursorChildChild MxPresenterListCursor; + +// OFFSET: LEGO1 0x1001cd20 TEMPLATE +// MxListParent::Compare // OFFSET: LEGO1 0x1001cd30 TEMPLATE -// MxListParent::Destroy - -// OFFSET: LEGO1 0x1001cdd0 TEMPLATE -// MxListParent::~MxListParent +// MxListParent::Destroy // OFFSET: LEGO1 0x1001ce20 TEMPLATE -// MxList::~MxList +// MxList::~MxList #endif // MXPRESENTERLIST_H diff --git a/LEGO1/mxstringlist.h b/LEGO1/mxstringlist.h new file mode 100644 index 00000000..dbf063f6 --- /dev/null +++ b/LEGO1/mxstringlist.h @@ -0,0 +1,23 @@ +#ifndef MXSTRINGLIST_H +#define MXSTRINGLIST_H + +#include "mxlist.h" +#include "mxstring.h" + +// VTABLE 0x100dd040 +// SIZE 0x18 +class MxStringList : public MxList {}; + +// OFFSET: LEGO1 0x100cb3c0 TEMPLATE +// MxListParent::Compare + +// OFFSET: LEGO1 0x100cb470 TEMPLATE +// MxListParent::Destroy + +// OFFSET: LEGO1 0x100cb4c0 TEMPLATE +// MxList::~MxList + +// OFFSET: LEGO1 0x100cc450 TEMPLATE +// MxListEntry::GetValue + +#endif // MXSTRINGLIST_H diff --git a/LEGO1/mxtransitionmanager.cpp b/LEGO1/mxtransitionmanager.cpp index 9e0edd7b..b0298b4e 100644 --- a/LEGO1/mxtransitionmanager.cpp +++ b/LEGO1/mxtransitionmanager.cpp @@ -8,16 +8,30 @@ DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900); -// OFFSET: LEGO1 0x1004b8d0 STUB +// OFFSET: LEGO1 0x1004b8d0 MxTransitionManager::MxTransitionManager() { - // TODO + m_animationTimer = 0; + m_transitionType = NOT_TRANSITIONING; + m_ddSurface = NULL; + m_unk08 = 0; + m_unk1c = 0; + m_unk20.bit0 = FALSE; + m_unk28.bit0 = FALSE; + m_unk24 = 0; } -// OFFSET: LEGO1 0x1004ba00 STUB +// OFFSET: LEGO1 0x1004ba00 MxTransitionManager::~MxTransitionManager() { - // TODO + free(m_unk1c); + + if (m_unk08 != NULL) { + delete m_unk08->m_unk1c; + delete m_unk08; + } + + TickleManager()->UnregisterClient(this); } // OFFSET: LEGO1 0x1004bac0 STUB @@ -44,36 +58,43 @@ MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14 // OFFSET: LEGO1 0x1004bb70 MxResult MxTransitionManager::StartTransition(TransitionType p_animationType, MxS32 p_speed, - undefined p_unk, MxBool p_playMusicInAnim) + MxBool p_unk, MxBool p_playMusicInAnim) { - // TODO: Incomplete and far from matching - if (this->m_transitionType == NOT_TRANSITIONING) { if (!p_playMusicInAnim) { MxBackgroundAudioManager *backgroundAudioManager = BackgroundAudioManager(); backgroundAudioManager->Stop(); } - this->m_transitionType = p_animationType; - // TODO: This part of the function is mangled and I can't make out what it's doing right now + this->m_transitionType = p_animationType; - MxU32 time = timeGetTime(); - this->m_systemTime = time; + m_unk20.bit0 = p_unk; - this->m_animationSpeed = p_speed; + if (m_unk20.bit0 && m_unk08 != NULL) { + m_unk08->vtable54(1); - MxTickleManager *tickleManager = TickleManager(); - tickleManager->RegisterClient(this, p_speed); + MxTransitionManagerUnknownSubclass2 *iVar2 = m_unk08->m_unk1c; + iVar2->m_unk3c = 10000; + iVar2->m_unk30 |= 0x200; + } - LegoInputManager *inputManager = InputManager(); - inputManager->m_unk88 = TRUE; - inputManager->m_unk336 = FALSE; + MxU32 time = timeGetTime(); + this->m_systemTime = time; - LegoVideoManager *videoManager = VideoManager(); - videoManager->SetUnkE4(FALSE); + this->m_animationSpeed = p_speed; - SetAppCursor(1); - return SUCCESS; + MxTickleManager *tickleManager = TickleManager(); + tickleManager->RegisterClient(this, p_speed); + + LegoInputManager *inputManager = InputManager(); + inputManager->m_unk88 = TRUE; + inputManager->m_unk336 = FALSE; + + LegoVideoManager *videoManager = VideoManager(); + videoManager->SetUnkE4(FALSE); + + SetAppCursor(1); + return SUCCESS; } return FAILURE; -} \ No newline at end of file +} diff --git a/LEGO1/mxtransitionmanager.h b/LEGO1/mxtransitionmanager.h index e68b6001..557b9b0b 100644 --- a/LEGO1/mxtransitionmanager.h +++ b/LEGO1/mxtransitionmanager.h @@ -7,6 +7,52 @@ #include +class MxTransitionManagerUnknownSubclass2 +{ +public: + virtual ~MxTransitionManagerUnknownSubclass2(){} + + undefined m_unk04[0x2c]; + undefined4 m_unk30; + undefined4 m_unk34; + undefined4 m_unk38; + undefined4 m_unk3c; + +}; + +// TODO: Don't know what this is yet +class MxTransitionManagerUnknownSubclass1 +{ +public: + virtual ~MxTransitionManagerUnknownSubclass1(){} + + virtual void vtable04(); + virtual void vtable08(); + virtual void vtable0c(); + virtual void vtable10(); + virtual void vtable14(); + virtual void vtable18(); + virtual void vtable1c(); + virtual void vtable20(); + virtual void vtable24(); + virtual void vtable28(); + virtual void vtable2c(); + virtual void vtable30(); + virtual void vtable34(); + virtual void vtable38(); + virtual void vtable3c(); + virtual void vtable40(); + virtual void vtable44(); + virtual void vtable48(); + virtual void vtable4c(); + virtual void vtable50(); + virtual void vtable54(undefined4 p_unk1); + + undefined m_unk04[0x18]; + MxTransitionManagerUnknownSubclass2 *m_unk1c; + +}; + // VTABLE 0x100d7ea0 class MxTransitionManager : public MxCore { @@ -42,11 +88,19 @@ class MxTransitionManager : public MxCore BROKEN // Unknown what this is supposed to be, it locks the game up }; - MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, undefined p_unk, MxBool p_playMusicInAnim); + MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_unk, MxBool p_playMusicInAnim); private: - undefined m_pad00[0x20]; - undefined m_pad20[0x04]; + MxTransitionManagerUnknownSubclass1 *m_unk08; + undefined4 m_unk0c; + undefined4 m_unk10; + undefined4 m_unk14; + undefined4 m_unk18; + void *m_unk1c; + flag_bitfield m_unk20; + undefined4 m_unk24; + flag_bitfield m_unk28; + TransitionType m_transitionType; LPDIRECTDRAWSURFACE m_ddSurface; MxU16 m_animationTimer; diff --git a/LEGO1/mxtypes.h b/LEGO1/mxtypes.h index fc8d47b5..75f19d4a 100644 --- a/LEGO1/mxtypes.h +++ b/LEGO1/mxtypes.h @@ -44,4 +44,19 @@ typedef MxU8 MxBool; #define TWOCC(a, b) (((a) << 0) | ((b) << 8)) #define FOURCC(a, b, c, d) (((a) << 0) | ((b) << 8) | ((c) << 16) | ((d) << 24)) +// Must be union with struct for match. +typedef union { + struct { + MxU8 bit0: 1; + MxU8 bit1: 1; + MxU8 bit2: 1; + MxU8 bit3: 1; + MxU8 bit4: 1; + MxU8 bit5: 1; + MxU8 bit6: 1; + MxU8 bit7: 1; + }; + // BYTE all; // ? +} flag_bitfield; + #endif // MXTYPE_H diff --git a/LEGO1/mxvideoparamflags.h b/LEGO1/mxvideoparamflags.h index f25ab4bd..8d1714ed 100644 --- a/LEGO1/mxvideoparamflags.h +++ b/LEGO1/mxvideoparamflags.h @@ -3,20 +3,7 @@ #include -// Must be union with struct for match. -typedef union { - struct { - BYTE bit0: 1; - BYTE bit1: 1; - BYTE bit2: 1; - BYTE bit3: 1; - BYTE bit4: 1; - BYTE bit5: 1; - BYTE bit6: 1; - BYTE bit7: 1; - }; - // BYTE all; // ? -} flag_bitfield; +#include "mxtypes.h" class MxVideoParamFlags { diff --git a/LEGO1/pizza.cpp b/LEGO1/pizza.cpp index 7e153b26..047e34bb 100644 --- a/LEGO1/pizza.cpp +++ b/LEGO1/pizza.cpp @@ -1,13 +1,11 @@ #include "pizza.h" -#include "decomp.h" - DECOMP_SIZE_ASSERT(Pizza, 0x9c); // OFFSET: LEGO1 0x10037ef0 Pizza::Pizza() { - // FIXME: This inherits from LegoActor, probably why this isn't matching + this->m_unk7c = 0; this->m_unk80 = 0; this->m_unk84 = 0; this->m_unk88 = 0; diff --git a/LEGO1/pizza.h b/LEGO1/pizza.h index 34d781c9..d6909810 100644 --- a/LEGO1/pizza.h +++ b/LEGO1/pizza.h @@ -1,6 +1,8 @@ #ifndef PIZZA_H #define PIZZA_H +#include "decomp.h" + #include "isleactor.h" #include "mxcore.h" #include "mxomni.h" @@ -29,16 +31,17 @@ class Pizza : public IsleActor { return !strcmp(name, Pizza::ClassName()) || IsleActor::IsA(name); } + private: - MxS32 m_unk78; - MxS32 m_unk7c; - MxS32 m_unk80; - MxS32 m_unk84; - MxS32 m_unk88; - MxS32 m_unk8c; - MxU32 m_unk90; - MxS32 m_unk94; - MxS32 m_unk98; + undefined4 m_unk78; + undefined4 m_unk7c; + undefined4 m_unk80; + undefined4 m_unk84; + undefined4 m_unk88; + undefined4 m_unk8c; + undefined4 m_unk90; + undefined4 m_unk94; + undefined m_unk98; }; #endif // PIZZA_H diff --git a/LEGO1/police.h b/LEGO1/police.h index 8ff6dff9..a11264da 100644 --- a/LEGO1/police.h +++ b/LEGO1/police.h @@ -13,7 +13,19 @@ class Police : public LegoWorld virtual ~Police() override; // vtable+0x0 virtual MxLong Notify(MxParam &p) override; // vtable+0x4 - + + // OFFSET: LEGO1 0x1005e1e0 + inline virtual const char *ClassName() const override // vtable+0xc + { + // 0x100f0450 + return "Police"; + } + + // OFFSET: LEGO1 0x1005e1f0 + inline virtual MxBool IsA(const char *name) const override // vtable+0x10 + { + return !strcmp(name, Police::ClassName()) || LegoWorld::IsA(name); + } }; #endif // POLICE_H diff --git a/LEGO1/policeentity.h b/LEGO1/policeentity.h index a23cced4..3a301016 100644 --- a/LEGO1/policeentity.h +++ b/LEGO1/policeentity.h @@ -7,7 +7,19 @@ // SIZE 0x68 class PoliceEntity : public BuildingEntity { +public: + // OFFSET: LEGO1 0x1000ed60 + inline virtual const char *ClassName() const override // vtable+0xc + { + // 0x100f0328 + return "PoliceEntity"; + } + // OFFSET: LEGO1 0x1000ed70 + inline virtual MxBool IsA(const char *name) const override // vtable+0x10 + { + return !strcmp(name, PoliceEntity::ClassName()) || BuildingEntity::IsA(name); + } }; #endif // POLICEENTITY_H