PoliceState: Create script enum + implement FUN_1005ea40 (#564)

* PoliceState: Create script enum + implement FUN_1005ea40

* Clean up code

* Match

* Match

* Fix type

* Fix error

* Remove return

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach
2024-02-15 11:22:58 -05:00
committed by GitHub
parent 8aa9d9a8b3
commit 91643d59ba
5 changed files with 59 additions and 10 deletions

View File

@@ -6,6 +6,7 @@
#include "legoinputmanager.h"
#include "legoomni.h"
#include "mxnotificationmanager.h"
#include "policestate.h"
DECOMP_SIZE_ASSERT(Police, 0x110)
@@ -123,7 +124,7 @@ MxLong Police::HandleKeyPress(LegoEventNotificationParam& p_param)
MxLong result = 0;
if (p_param.GetKey() == ' ' && m_policeState->GetUnknown0x0c() == 1) {
DeleteObjects(&m_atom, 500, 501);
DeleteObjects(&m_atom, c_nickAnim, c_lauraAnim);
m_policeState->SetUnknown0x0c(0);
return 1;
}
@@ -150,7 +151,7 @@ void Police::Enable(MxBool p_enable)
// FUNCTION: LEGO1 0x1005e790
MxBool Police::VTable0x64()
{
DeleteObjects(&m_atom, 500, 510);
DeleteObjects(&m_atom, c_nickAnim, 510);
m_transitionDestination = LegoGameState::e_infomain;
return TRUE;
}