From b95656a735736f50374799d0d868919c54a7afe2 Mon Sep 17 00:00:00 2001 From: Ramen2X <64166386+Ramen2X@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:17:23 -0400 Subject: [PATCH] implement GasStationState::GasStationState() (#215) * implement GasStationState::GasStationState() * Match 100% --------- Co-authored-by: Christian Semmler --- LEGO1/gasstationstate.cpp | 15 +++++++++++++-- LEGO1/gasstationstate.h | 8 ++++++++ LEGO1/legostate.cpp | 2 ++ LEGO1/legostate.h | 2 ++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/LEGO1/gasstationstate.cpp b/LEGO1/gasstationstate.cpp index d9fa2c29..ea141a81 100644 --- a/LEGO1/gasstationstate.cpp +++ b/LEGO1/gasstationstate.cpp @@ -1,7 +1,18 @@ #include "gasstationstate.h" -// OFFSET: LEGO1 0x10005eb0 STUB +DECOMP_SIZE_ASSERT(GasStationState, 0x24); + +// OFFSET: LEGO1 0x10005eb0 GasStationState::GasStationState() { - // TODO + m_unk0x18 = 0; + m_unk0x1a = 0; + m_unk0x1c = 0; + m_unk0x1e = 0; + m_unk0x20 = 0; + + undefined4 *unk = m_unk0x08; + unk[0] = -1; + unk[1] = -1; + unk[2] = -1; } diff --git a/LEGO1/gasstationstate.h b/LEGO1/gasstationstate.h index a7696bed..a4a6c108 100644 --- a/LEGO1/gasstationstate.h +++ b/LEGO1/gasstationstate.h @@ -23,6 +23,14 @@ public: return !strcmp(name, GasStationState::ClassName()) || LegoState::IsA(name); } +private: + undefined4 m_unk0x08[3]; + undefined4 m_unk0x14; + undefined2 m_unk0x18; + undefined2 m_unk0x1a; + undefined2 m_unk0x1c; + undefined2 m_unk0x1e; + undefined2 m_unk0x20; }; #endif // GASSTATIONSTATE_H diff --git a/LEGO1/legostate.cpp b/LEGO1/legostate.cpp index 55637dc4..3b43d662 100644 --- a/LEGO1/legostate.cpp +++ b/LEGO1/legostate.cpp @@ -1,5 +1,7 @@ #include "legostate.h" +DECOMP_SIZE_ASSERT(LegoState, 0x08); + // OFFSET: LEGO1 0x10005f40 LegoState::~LegoState() { diff --git a/LEGO1/legostate.h b/LEGO1/legostate.h index 904ad323..77246153 100644 --- a/LEGO1/legostate.h +++ b/LEGO1/legostate.h @@ -1,6 +1,8 @@ #ifndef LEGOSTATE_H #define LEGOSTATE_H +#include "decomp.h" + #include "mxcore.h" // VTABLE 0x100d46c0