From f1f6743d08d654b106750dc45d0ec273b8882d4d Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Wed, 27 Dec 2023 13:27:02 -0500 Subject: [PATCH] CarRace ctor (#372) * CarRace ctor * Fixes --------- Co-authored-by: Christian Semmler --- LEGO1/carrace.cpp | 7 +++++-- LEGO1/carrace.h | 5 +++++ LEGO1/legorace.h | 37 +++++++++++++++++++++---------------- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/LEGO1/carrace.cpp b/LEGO1/carrace.cpp index 6da96168..9fdb353f 100644 --- a/LEGO1/carrace.cpp +++ b/LEGO1/carrace.cpp @@ -1,7 +1,10 @@ #include "carrace.h" -// STUB: LEGO1 0x10016a90 +DECOMP_SIZE_ASSERT(CarRace, 0x154); + +// FUNCTION: LEGO1 0x10016a90 CarRace::CarRace() { - // TODO + this->m_unk0x150 = 0; + this->m_unk0x130 = MxRect32(0x16c, 0x154, 0x1ec, 0x15e); } diff --git a/LEGO1/carrace.h b/LEGO1/carrace.h index b876fd4d..3b9a768e 100644 --- a/LEGO1/carrace.h +++ b/LEGO1/carrace.h @@ -1,6 +1,7 @@ #ifndef CARRACE_H #define CARRACE_H +#include "decomp.h" #include "legorace.h" // VTABLE: LEGO1 0x100d5e50 @@ -21,6 +22,10 @@ public: { return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name); } + +private: + undefined m_unk0x144[12]; // 0x144 + undefined4 m_unk0x150; // 0x150 }; #endif // CARRACE_H diff --git a/LEGO1/legorace.h b/LEGO1/legorace.h index 8ae52d8e..9ddbdfb3 100644 --- a/LEGO1/legorace.h +++ b/LEGO1/legorace.h @@ -3,6 +3,7 @@ #include "decomp.h" #include "legoworld.h" +#include "mxrect32.h" #include "mxtypes.h" // VTABLE: LEGO1 0x100d5db0 @@ -38,22 +39,26 @@ public: virtual void VTable0x7c(undefined4, undefined4); // vtable+0x7c private: - undefined4 m_unk0xf8; // 0xf8 - undefined4 m_unk0xfc; // 0xfc - undefined4 m_unk0x100; // 0x100 - undefined4 m_unk0x104; // 0x104 - undefined4 m_unk0x108; // 0x108 - undefined4 m_unk0x10c; // 0x10c - undefined4 m_unk0x110; // 0x110 - undefined4 m_unk0x114; // 0x114 - undefined4 m_unk0x118; // 0x118 - undefined4 m_unk0x11c; // 0x11c - undefined4 m_unk0x120; // 0x120 - this may be the current vehcle (function at 0x10015880) - undefined4 m_unk0x124; // 0x124 - something game state - undefined4 m_unk0x128; // 0x128 - undefined4 m_unk0x12c; // 0x12c - undefined4 m_unk0x130[4]; // unconfirmed bytes, ghidra claims these are integers - undefined4 m_unk0x140; + undefined4 m_unk0xf8; // 0xf8 + undefined4 m_unk0xfc; // 0xfc + undefined4 m_unk0x100; // 0x100 + undefined4 m_unk0x104; // 0x104 + undefined4 m_unk0x108; // 0x108 + undefined4 m_unk0x10c; // 0x10c + undefined4 m_unk0x110; // 0x110 + undefined4 m_unk0x114; // 0x114 + undefined4 m_unk0x118; // 0x118 + undefined4 m_unk0x11c; // 0x11c + undefined4 m_unk0x120; // 0x120 + undefined4 m_unk0x124; // 0x124 + undefined4 m_unk0x128; // 0x128 + undefined4 m_unk0x12c; // 0x12c + +protected: + MxRect32 m_unk0x130; // 0x130 + +private: + undefined4 m_unk0x140; // 0x140 }; #endif // LEGORACE_H