From 3f2fac72e41e1c962177646fca8eb44347e39dcd Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Mon, 1 Jan 2024 22:30:50 -0500 Subject: [PATCH] Hospital ctor (#392) * Hospital ctor * Remove padding --------- Co-authored-by: Christian Semmler --- LEGO1/hospital.cpp | 21 +++++++++++++++++++-- LEGO1/hospital.h | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/LEGO1/hospital.cpp b/LEGO1/hospital.cpp index 3d8ff578..e8de5495 100644 --- a/LEGO1/hospital.cpp +++ b/LEGO1/hospital.cpp @@ -1,9 +1,26 @@ #include "hospital.h" -// STUB: LEGO1 0x100745e0 +#include "mxnotificationmanager.h" +#include "mxomni.h" + +DECOMP_SIZE_ASSERT(Hospital, 0x12c) + +// FUNCTION: LEGO1 0x100745e0 Hospital::Hospital() { - // TODO + this->m_unk0xf8 = 0; + this->m_unk0x100 = 0; + this->m_unk0x104 = 0; + this->m_unk0x108 = 0; + this->m_unk0xfc = 0; + this->m_unk0x10c = 0; + this->m_unk0x110 = 0; + this->m_unk0x114 = 0; + this->m_unk0x118 = 0; + this->m_unk0x11c = 0; + this->m_unk0x120 = 0; + this->m_unk0x128 = 0; + NotificationManager()->Register(this); } // STUB: LEGO1 0x100747f0 diff --git a/LEGO1/hospital.h b/LEGO1/hospital.h index 627dc4cc..29ff1177 100644 --- a/LEGO1/hospital.h +++ b/LEGO1/hospital.h @@ -1,6 +1,7 @@ #ifndef HOSPITAL_H #define HOSPITAL_H +#include "decomp.h" #include "legoworld.h" // VTABLE: LEGO1 0x100d9730 @@ -24,6 +25,21 @@ public: { return !strcmp(p_name, Hospital::ClassName()) || LegoWorld::IsA(p_name); } + +private: + undefined2 m_unk0xf8; // 0xf8 + undefined4 m_unk0xfc; // 0xfc + undefined2 m_unk0x100; // 0x100 + undefined4 m_unk0x104; // 0x104 - VTable0x18 suggests this may be pointer to a LegoGameState + undefined2 m_unk0x108; // 0x108 + undefined4 m_unk0x10c; // 0x10c + undefined4 m_unk0x110; // 0x110 + undefined4 m_unk0x114; // 0x114 + undefined m_unk0x118; // 0x118 + undefined4 m_unk0x11c; // 0x11c + undefined4 m_unk0x120; // 0x120 + undefined m_unk0x124[4]; // 0x124 + undefined m_unk0x128; // 0x128 }; #endif // HOSPITAL_H