mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00:00
Implement/match Motocycle, consistent notification names (#1037)
* Implement/match Motocycle, consistent notification names * Format * Fix * Fix return types * Fix return type * Fix annotations * Rename function
This commit is contained in:
committed by
GitHub
parent
68023379d8
commit
e4e0f4e4d3
@@ -60,7 +60,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationControl:
|
||||
ret = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
ret = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -80,7 +80,7 @@ void ElevatorBottom::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100181d0
|
||||
MxLong ElevatorBottom::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@ MxLong GasStation::Notify(MxParam& p_param)
|
||||
result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey());
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
|
||||
result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -306,14 +306,14 @@ MxLong GasStation::HandleKeyPress(MxS8 p_key)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10005960
|
||||
MxLong GasStation::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10005b20
|
||||
MxLong GasStation::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
MxDSAction action;
|
||||
|
||||
@@ -120,10 +120,10 @@ MxLong Hospital::Notify(MxParam& p_param)
|
||||
result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey());
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
|
||||
result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
if (m_destLocation != LegoGameState::e_undefined) {
|
||||
@@ -396,7 +396,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10075710
|
||||
MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (m_unk0x100 == 1) {
|
||||
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
||||
@@ -552,7 +552,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10075f90
|
||||
MxBool Hospital::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
|
||||
@@ -254,7 +254,7 @@ MxLong Infocenter::Notify(MxParam& p_param)
|
||||
);
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
StopBookAnimation();
|
||||
@@ -952,7 +952,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070370
|
||||
MxU8 Infocenter::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
m_infoManDialogueTimer = 0;
|
||||
|
||||
@@ -69,7 +69,7 @@ MxLong InfocenterDoor::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -90,7 +90,7 @@ void InfocenterDoor::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10037a90
|
||||
MxLong InfocenterDoor::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "legovariables.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "misc.h"
|
||||
#include "motocycle.h"
|
||||
#include "motorcycle.h"
|
||||
#include "mxactionnotificationparam.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxmisc.h"
|
||||
@@ -152,7 +152,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationEndAnim:
|
||||
switch (m_act1state->m_unk0x018) {
|
||||
@@ -168,7 +168,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationType20:
|
||||
Enable(TRUE);
|
||||
@@ -287,7 +287,7 @@ void Isle::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10031030
|
||||
MxLong Isle::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
MxDSAction action;
|
||||
@@ -469,7 +469,7 @@ void Isle::UpdateGlobe()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100315f0
|
||||
MxLong Isle::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||
MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
@@ -1006,7 +1006,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_motocycle->FUN_10035e10();
|
||||
m_motocycle->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_copter:
|
||||
|
||||
@@ -76,7 +76,7 @@ MxLong JukeBox::Notify(MxParam& p_param)
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -123,7 +123,7 @@ void JukeBox::ReadyWorld()
|
||||
|
||||
// FUNCTION: LEGO1 0x1005da70
|
||||
// FUNCTION: BETA10 0x10037f6d
|
||||
MxBool JukeBox::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxBool JukeBox::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxStillPresenter* presenter;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ MxLong Police::Notify(MxParam& p_param)
|
||||
result = HandleKeyPress(((LegoEventNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -103,7 +103,7 @@ void Police::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e550
|
||||
MxLong Police::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
|
||||
@@ -115,7 +115,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
|
||||
m_registerDialogueTimer = Timer()->GetTime();
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandleNotification19(p_param);
|
||||
@@ -210,7 +210,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100774a0
|
||||
MxLong RegistrationBook::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ MxLong Score::Notify(MxParam& p_param)
|
||||
ret = 1;
|
||||
break;
|
||||
case c_notificationControl:
|
||||
ret = FUN_100016d0((LegoControlManagerEvent&) p_param);
|
||||
ret = FUN_100016d0((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
DeleteObjects(g_infoscorScript, InfoscorScript::c_LegoBox1_Flc, InfoscorScript::c_LegoBox3_Flc);
|
||||
@@ -166,7 +166,7 @@ void Score::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100016d0
|
||||
MxLong Score::FUN_100016d0(LegoControlManagerEvent& p_param)
|
||||
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user