Implement/match Pizzeria::HandleClick (#971)

This commit is contained in:
Christian Semmler
2024-05-30 09:54:24 -04:00
committed by GitHub
parent ae859fbc19
commit 650903d043
57 changed files with 178 additions and 143 deletions

View File

@@ -59,8 +59,8 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetType()) {
case c_notificationClick:
ret = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
ret = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
GameState()->SwitchArea(m_destLocation);
@@ -80,7 +80,7 @@ void ElevatorBottom::ReadyWorld()
}
// FUNCTION: LEGO1 0x100181d0
MxLong ElevatorBottom::HandleClick(LegoControlManagerEvent& p_param)
MxLong ElevatorBottom::HandleControl(LegoControlManagerEvent& p_param)
{
MxLong result = 0;

View File

@@ -113,8 +113,8 @@ MxLong GasStation::Notify(MxParam& p_param)
case c_notificationButtonDown:
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
GameState()->SwitchArea(m_destLocation);
@@ -313,7 +313,7 @@ MxLong GasStation::HandleButtonDown(LegoControlManagerEvent& p_param)
}
// FUNCTION: LEGO1 0x10005b20
MxLong GasStation::HandleClick(LegoControlManagerEvent& p_param)
MxLong GasStation::HandleControl(LegoControlManagerEvent& p_param)
{
if (p_param.GetUnknown0x28() == 1) {
MxDSAction action;

View File

@@ -122,8 +122,8 @@ MxLong Hospital::Notify(MxParam& p_param)
case c_notificationButtonDown:
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
if (m_destLocation != LegoGameState::e_undefined) {
@@ -552,7 +552,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
}
// FUNCTION: LEGO1 0x10075f90
MxBool Hospital::HandleClick(LegoControlManagerEvent& p_param)
MxBool Hospital::HandleControl(LegoControlManagerEvent& p_param)
{
if (p_param.GetUnknown0x28() == 1) {
switch (p_param.GetClickedObjectId()) {

View File

@@ -170,8 +170,8 @@ MxLong Infocenter::Notify(MxParam& p_param)
((LegoEventNotificationParam&) p_param).GetY()
);
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
StopBookAnimation();
@@ -870,7 +870,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
}
// FUNCTION: LEGO1 0x10070370
MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param)
MxU8 Infocenter::HandleControl(LegoControlManagerEvent& p_param)
{
if (p_param.GetUnknown0x28() == 1) {
m_infoManDialogueTimer = 0;

View File

@@ -68,8 +68,8 @@ MxLong InfocenterDoor::Notify(MxParam& p_param)
result = 1;
}
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
GameState()->SwitchArea(m_destLocation);
@@ -90,7 +90,7 @@ void InfocenterDoor::ReadyWorld()
}
// FUNCTION: LEGO1 0x10037a90
MxLong InfocenterDoor::HandleClick(LegoControlManagerEvent& p_param)
MxLong InfocenterDoor::HandleControl(LegoControlManagerEvent& p_param)
{
MxLong result = 0;

View File

@@ -142,8 +142,8 @@ MxLong Isle::Notify(MxParam& p_param)
break;
}
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationEndAnim:
switch (m_act1state->m_unk0x018) {
@@ -278,7 +278,7 @@ void Isle::ReadyWorld()
}
// FUNCTION: LEGO1 0x10031030
MxLong Isle::HandleClick(LegoControlManagerEvent& p_param)
MxLong Isle::HandleControl(LegoControlManagerEvent& p_param)
{
if (p_param.GetUnknown0x28() == 1) {
MxDSAction action;
@@ -509,7 +509,7 @@ MxLong Isle::HandleType19Notification(MxType19NotificationParam& p_param)
case 0x136:
LegoEntity* bouy = (LegoEntity*) Find("MxEntity", "bouybump");
if (bouy != NULL) {
NotificationManager()->Send(bouy, LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
NotificationManager()->Send(bouy, LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
}
result = 1;
break;
@@ -595,11 +595,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_jetski->Notify(param);
}
#else
m_jetski->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_jetski->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
case LegoGameState::e_garadoor:
@@ -618,11 +618,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_bike->Notify(param);
}
#else
m_bike->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_bike->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
case LegoGameState::e_dunecar:
@@ -631,11 +631,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_dunebuggy->Notify(param);
}
#else
m_dunebuggy->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_dunebuggy->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
case LegoGameState::e_motocycle:
@@ -644,11 +644,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_motocycle->Notify(param);
}
#else
m_motocycle->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_motocycle->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
case LegoGameState::e_copter:
@@ -657,11 +657,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_helicopter->Notify(param);
}
#else
m_helicopter->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_helicopter->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
case LegoGameState::e_skateboard:
@@ -670,11 +670,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_skateboard->Notify(param);
}
#else
m_skateboard->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_skateboard->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
case LegoGameState::e_jetski:
@@ -683,11 +683,11 @@ void Isle::Enable(MxBool p_enable)
#ifdef COMPAT_MODE
{
LegoEventNotificationParam param(c_notificationType11, NULL, 0, 0, 0, 0);
LegoEventNotificationParam param(c_notificationClick, NULL, 0, 0, 0, 0);
m_jetski->Notify(param);
}
#else
m_jetski->Notify(LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
m_jetski->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
#endif
break;
default:

View File

@@ -75,8 +75,8 @@ MxLong JukeBox::Notify(MxParam& p_param)
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
GameState()->SwitchArea(m_destLocation);
@@ -119,7 +119,7 @@ void JukeBox::ReadyWorld()
}
// FUNCTION: LEGO1 0x1005da70
MxBool JukeBox::HandleClick(LegoControlManagerEvent& p_param)
MxBool JukeBox::HandleControl(LegoControlManagerEvent& p_param)
{
MxStillPresenter* presenter;

View File

@@ -81,8 +81,8 @@ MxLong Police::Notify(MxParam& p_param)
case c_notificationKeyPress:
result = HandleKeyPress(((LegoEventNotificationParam&) p_param));
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned:
GameState()->SwitchArea(m_destLocation);
@@ -102,7 +102,7 @@ void Police::ReadyWorld()
}
// FUNCTION: LEGO1 0x1005e550
MxLong Police::HandleClick(LegoControlManagerEvent& p_param)
MxLong Police::HandleControl(LegoControlManagerEvent& p_param)
{
if (p_param.GetUnknown0x28() == 1) {
switch (p_param.GetClickedObjectId()) {

View File

@@ -114,8 +114,8 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
case c_notificationButtonDown:
m_registerDialogueTimer = Timer()->GetTime();
break;
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationType19:
result = HandleNotification19(p_param);
@@ -210,7 +210,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
}
// FUNCTION: LEGO1 0x100774a0
MxLong RegistrationBook::HandleClick(LegoControlManagerEvent& p_param)
MxLong RegistrationBook::HandleControl(LegoControlManagerEvent& p_param)
{
MxS16 unk0x28 = p_param.GetUnknown0x28();

View File

@@ -104,7 +104,7 @@ MxLong Score::Notify(MxParam& p_param)
}
ret = 1;
break;
case c_notificationClick:
case c_notificationControl:
ret = FUN_100016d0((LegoControlManagerEvent&) p_param);
break;
case c_notificationTransitioned: