diff --git a/LEGO1/lego/legoomni/include/policestate.h b/LEGO1/lego/legoomni/include/policestate.h index 551d83c4..a8dba94a 100644 --- a/LEGO1/lego/legoomni/include/policestate.h +++ b/LEGO1/lego/legoomni/include/policestate.h @@ -29,6 +29,9 @@ public: // SYNTHETIC: LEGO1 0x1005e920 // PoliceState::`scalar deleting destructor' + inline undefined4 GetUnknown0x0c() { return m_unk0x0c; } + inline void SetUnknown0x0c(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; } + private: undefined4 m_unk0x08; // 0x08 undefined4 m_unk0x0c; // 0x0c diff --git a/LEGO1/lego/legoomni/src/police/police.cpp b/LEGO1/lego/legoomni/src/police/police.cpp index 059d4473..44c2aabd 100644 --- a/LEGO1/lego/legoomni/src/police/police.cpp +++ b/LEGO1/lego/legoomni/src/police/police.cpp @@ -107,22 +107,40 @@ MxLong Police::HandleEndAction(MxEndActionNotificationParam& p_param) return 0; } -// STUB: LEGO1 0x1005e6f0 +// FUNCTION: LEGO1 0x1005e6f0 MxLong Police::HandleKeyPress(LegoEventNotificationParam& p_param) { - // TODO + MxLong result = 0; + + if (p_param.GetKey() == ' ' && m_policeState->GetUnknown0x0c() == 1) { + DeleteObjects(&m_atom, 500, 501); + m_policeState->SetUnknown0x0c(0); + return 1; + } + return 0; } -// STUB: LEGO1 0x1005e740 +// FUNCTION: LEGO1 0x1005e740 void Police::Enable(MxBool p_enable) { - // TODO + LegoWorld::Enable(p_enable); + + if (p_enable) { + InputManager()->SetWorld(this); + SetIsWorldActive(FALSE); + } + else { + if (InputManager()->GetWorld() == this) { + InputManager()->ClearWorld(); + } + } } -// STUB: LEGO1 0x1005e790 +// FUNCTION: LEGO1 0x1005e790 MxBool Police::VTable0x64() { - // TODO - return FALSE; + DeleteObjects(&m_atom, 500, 510); + m_transitionDestination = 2; + return TRUE; }