Implement Police::HandleKeyPress, Enable, VTable0x64

This commit is contained in:
Joshua Peisach 2024-02-04 14:20:01 -05:00
parent 8cc79ad4de
commit a3708b9422
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A
2 changed files with 27 additions and 7 deletions

View File

@ -26,6 +26,9 @@ class PoliceState : public LegoState {
MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c
inline undefined4 GetUnknown0x0C() { return m_unk0x0c; }
inline void SetUnknown0x0C(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
// SYNTHETIC: LEGO1 0x1005e920
// PoliceState::`scalar deleting destructor'

View File

@ -107,22 +107,39 @@ 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 1;
}