From 9000f731ac8f073c3891ebd768c9af12526c3c5c Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Sat, 20 Jan 2024 09:22:33 -0500 Subject: [PATCH] PoliceState constructor (#463) * PoliceState constructor * Changes --------- Co-authored-by: Christian Semmler --- LEGO1/lego/legoomni/include/policestate.h | 5 +++++ LEGO1/lego/legoomni/src/police/policestate.cpp | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/policestate.h b/LEGO1/lego/legoomni/include/policestate.h index 611ced07..be55ecae 100644 --- a/LEGO1/lego/legoomni/include/policestate.h +++ b/LEGO1/lego/legoomni/include/policestate.h @@ -1,6 +1,7 @@ #ifndef POLICESTATE_H #define POLICESTATE_H +#include "decomp.h" #include "legostate.h" // VTABLE: LEGO1 0x100d8af0 @@ -24,6 +25,10 @@ class PoliceState : public LegoState { // SYNTHETIC: LEGO1 0x1005e920 // PoliceState::`scalar deleting destructor' + +private: + undefined4 m_unk0x8; // 0x8 + undefined4 m_unk0xc; // 0xc }; #endif // POLICESTATE_H diff --git a/LEGO1/lego/legoomni/src/police/policestate.cpp b/LEGO1/lego/legoomni/src/police/policestate.cpp index a2c66a45..4965a36f 100644 --- a/LEGO1/lego/legoomni/src/police/policestate.cpp +++ b/LEGO1/lego/legoomni/src/police/policestate.cpp @@ -1,7 +1,12 @@ #include "policestate.h" -// STUB: LEGO1 0x1005e7c0 +#include + +DECOMP_SIZE_ASSERT(PoliceState, 0x10) + +// FUNCTION: LEGO1 0x1005e7c0 PoliceState::PoliceState() { - // TODO + m_unk0xc = 0; + m_unk0x8 = (rand() % 2 == 0) ? 501 : 500; }