mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Implement Police::HandleKeyPress, Enable, VTable0x64 (#529)
* Implement Police::HandleKeyPress, Enable, VTable0x64 * fix return type * Style --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
8cc79ad4de
commit
0497ef13fb
2 changed files with 28 additions and 7 deletions
|
@ -29,6 +29,9 @@ class PoliceState : public LegoState {
|
|||
// 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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue