From 6032c1bb27f6482fab8c08eae2a0226d7374b2ae Mon Sep 17 00:00:00 2001 From: Daniel Hejduk <156322098+danielhejduk@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:24:42 +0100 Subject: [PATCH] Implement GasStation:GasStation() function (#424) * Implementing GasStation:GasStation() function * Update gasstation.cpp * Update gasstation.cpp * Adding m_unk variables to gasstation.h * Update gasstation.h * Update gasstation.h * fixes + match gasstation ctor * formatting fixes * add offset markers to members * formatting fix --------- Co-authored-by: Ramen2X <64166386+Ramen2X@users.noreply.github.com> --- LEGO1/lego/legoomni/include/gasstation.h | 16 ++++++++++++++++ .../lego/legoomni/src/gasstation/gasstation.cpp | 17 +++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/gasstation.h b/LEGO1/lego/legoomni/include/gasstation.h index 0617e161..11ff175a 100644 --- a/LEGO1/lego/legoomni/include/gasstation.h +++ b/LEGO1/lego/legoomni/include/gasstation.h @@ -1,7 +1,9 @@ #ifndef GASSTATION_H #define GASSTATION_H +#include "decomp.h" #include "legoworld.h" +#include "radio.h" // VTABLE: LEGO1 0x100d4650 // SIZE 0x128 @@ -26,6 +28,20 @@ class GasStation : public LegoWorld { { return !strcmp(p_name, GasStation::ClassName()) || LegoWorld::IsA(p_name); } + +private: + undefined2 m_unk0xf8; // 0xf8 + undefined2 m_unk0xfa; // 0xfa + undefined4 m_unk0xfc; // 0xfc + undefined4 m_unk0x100; // 0x100 + undefined2 m_unk0x104; // 0x104 + undefined2 m_unk0x106; // 0x106 + undefined4 m_unk0x108; // 0x108 + undefined4 m_unk0x10c; // 0x10c + undefined4 m_unk0x110; // 0x110 + undefined m_unk0x114; // 0x114 + undefined m_unk0x115; // 0x115 + Radio m_radio; // 0x118 }; #endif // GASSTATION_H diff --git a/LEGO1/lego/legoomni/src/gasstation/gasstation.cpp b/LEGO1/lego/legoomni/src/gasstation/gasstation.cpp index 24325511..7f7aff11 100644 --- a/LEGO1/lego/legoomni/src/gasstation/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/gasstation/gasstation.cpp @@ -1,9 +1,22 @@ #include "gasstation.h" -// STUB: LEGO1 0x100046a0 +#include "mxnotificationmanager.h" + +// FUNCTION: LEGO1 0x100046a0 GasStation::GasStation() { - // TODO + this->m_unk0xf8 = 0; + this->m_unk0x100 = 0; + this->m_unk0xfc = 0; + this->m_unk0x108 = 0; + this->m_unk0x104 = 0; + this->m_unk0x114 = 0; + this->m_unk0x106 = 0; + this->m_unk0x10c = 0; + this->m_unk0x115 = 0; + this->m_unk0x110 = 0; + + NotificationManager()->Register(this); } // STUB: LEGO1 0x100048c0