mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Implement Police::Notify (#524)
* Implement Police::Notify * Fix HandleKeyPress --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
e68e25275f
commit
724cdeb86f
2 changed files with 52 additions and 10 deletions
|
@ -40,9 +40,13 @@ class Police : public LegoWorld {
|
|||
// Police::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
Radio m_radio; // 0xf8
|
||||
PoliceState* m_policeState; // 0x108
|
||||
undefined4 m_unk0x10c; // 0x10c
|
||||
MxLong HandleNotification11(MxNotificationParam& p_param);
|
||||
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
||||
MxLong HandleKeyPress(LegoEventNotificationParam& p_param);
|
||||
|
||||
Radio m_radio; // 0xf8
|
||||
PoliceState* m_policeState; // 0x108
|
||||
undefined4 m_transitionDestination; // 0x10c
|
||||
};
|
||||
|
||||
#endif // POLICE_H
|
||||
|
|
|
@ -13,15 +13,14 @@ DECOMP_SIZE_ASSERT(Police, 0x110)
|
|||
Police::Police()
|
||||
{
|
||||
m_policeState = NULL;
|
||||
m_unk0x10c = 0;
|
||||
m_transitionDestination = 0;
|
||||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e1d0
|
||||
// FUNCTION: LEGO1 0x1005e1d0
|
||||
MxBool Police::VTable0x5c()
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e320
|
||||
|
@ -60,12 +59,30 @@ MxResult Police::Create(MxDSAction& p_dsAction)
|
|||
return ret;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e480
|
||||
// FUNCTION: LEGO1 0x1005e480
|
||||
MxLong Police::Notify(MxParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
MxLong result = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
return 0;
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationKeyPress:
|
||||
result = HandleKeyPress(((LegoEventNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationType11:
|
||||
result = HandleNotification11((MxNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_transitionDestination);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e530
|
||||
|
@ -76,6 +93,27 @@ void Police::ReadyWorld()
|
|||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e550
|
||||
MxLong Police::HandleNotification11(MxNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e6a0
|
||||
MxLong Police::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e6f0
|
||||
MxLong Police::HandleKeyPress(LegoEventNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e740
|
||||
void Police::Enable(MxBool p_enable)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue