From 76b4edaa9edf82bc5e7a1f1aed1fdad0509c75ac Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Sat, 16 Dec 2023 09:11:10 -0500 Subject: [PATCH] AmbulanceMissionState/AnimState constructors (#337) * implement a few states * Update animstate.h * Update animstate.cpp --- LEGO1/ambulancemissionstate.cpp | 15 +++++++++++++-- LEGO1/ambulancemissionstate.h | 18 ++++++++++++------ LEGO1/animstate.cpp | 23 +++++++++++++++++++++-- LEGO1/animstate.h | 10 ++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-) diff --git a/LEGO1/ambulancemissionstate.cpp b/LEGO1/ambulancemissionstate.cpp index 54f32b41..4213a587 100644 --- a/LEGO1/ambulancemissionstate.cpp +++ b/LEGO1/ambulancemissionstate.cpp @@ -2,8 +2,19 @@ DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24); -// STUB: LEGO1 0x100373a0 +// FUNCTION: LEGO1 0x100373a0 AmbulanceMissionState::AmbulanceMissionState() { - // TODO + m_unk0x10 = 0; + m_unk0x12 = 0; + m_unk0x14 = 0; + m_unk0x8 = 0; + m_unk0x16 = 0; + m_unk0xc = 0; + m_unk0x18 = 0; + m_color1 = 0; + m_color2 = 0; + m_color3 = 0; + m_color4 = 0; + m_color5 = 0; } diff --git a/LEGO1/ambulancemissionstate.h b/LEGO1/ambulancemissionstate.h index 7cfe559c..05d09859 100644 --- a/LEGO1/ambulancemissionstate.h +++ b/LEGO1/ambulancemissionstate.h @@ -41,12 +41,18 @@ public: } protected: - undefined m_unk0x8[0x12]; - MxU16 m_color1; - MxU16 m_color2; - MxU16 m_color3; - MxU16 m_color4; - MxU16 m_color5; + undefined4 m_unk0x8; // 0x08 + undefined4 m_unk0xc; // 0x0c + MxU16 m_unk0x10; // 0x10 + MxU16 m_unk0x12; // 0x12 + MxU16 m_unk0x14; // 0x14 + MxU16 m_unk0x16; // 0x16 + MxU16 m_unk0x18; // 0x18 + MxU16 m_color1; // 0x1a + MxU16 m_color2; // 0x1c + MxU16 m_color3; // 0x1e + MxU16 m_color4; // 0x20 + MxU16 m_color5; // 0x22 }; #endif // AMBULANCEMISSIONSTATE_H diff --git a/LEGO1/animstate.cpp b/LEGO1/animstate.cpp index 7377475b..1a08890b 100644 --- a/LEGO1/animstate.cpp +++ b/LEGO1/animstate.cpp @@ -1,9 +1,14 @@ #include "animstate.h" -// STUB: LEGO1 0x10064ff0 +DECOMP_SIZE_ASSERT(AnimState, 0x1c); + +// FUNCTION: LEGO1 0x10064ff0 AnimState::AnimState() { - // TODO + m_unk0xc = 0; + m_unk0x10 = NULL; + m_unk0x14 = 0; + m_unk0x18 = NULL; } // STUB: LEGO1 0x10065150 @@ -11,3 +16,17 @@ AnimState::~AnimState() { // TODO } + +// STUB: LEGO1 0x100652d0 +MxResult AnimState::VTable0x1c(LegoFileStream* p_legoFileStream) +{ + // TODO + return FAILURE; +} + +// STUB: LEGO1 0x100654f0 +MxBool AnimState::SetFlag() +{ + // TODO + return FALSE; +} diff --git a/LEGO1/animstate.h b/LEGO1/animstate.h index 26882700..5e8fa4e5 100644 --- a/LEGO1/animstate.h +++ b/LEGO1/animstate.h @@ -22,6 +22,16 @@ public: { return !strcmp(p_name, AnimState::ClassName()) || LegoState::IsA(p_name); } + + virtual MxBool SetFlag() override; // vtable+0x18 + virtual MxResult VTable0x1c(LegoFileStream* p_legoFileStream) override; // vtable+0x1C + +private: + undefined4 m_unk0x8; + undefined4 m_unk0xc; + void* m_unk0x10; + undefined4 m_unk0x14; + void* m_unk0x18; }; #endif // ANIMSTATE_H