mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 10:24:18 +00:00
Fix MxParam casts in Notify functions (#1188)
* First batch * Second batch
This commit is contained in:
@@ -52,13 +52,15 @@ MxResult ElevatorBottom::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10018150
|
||||
// FUNCTION: BETA10 0x10027d60
|
||||
MxLong ElevatorBottom::Notify(MxParam& p_param)
|
||||
{
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
MxLong ret = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationControl:
|
||||
ret = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -100,13 +100,15 @@ MxResult GasStation::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10004a60
|
||||
// FUNCTION: BETA10 0x10028883
|
||||
MxLong GasStation::Notify(MxParam& p_param)
|
||||
{
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
MxResult result = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -68,12 +68,14 @@ MxResult HistoryBook::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10082680
|
||||
// FUNCTION: BETA10 0x1002b907
|
||||
MxLong HistoryBook::Notify(MxParam& p_param)
|
||||
{
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationButtonUp:
|
||||
m_destLocation = LegoGameState::Area::e_infoscor;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
||||
@@ -106,13 +106,15 @@ MxResult Hospital::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10074990
|
||||
// FUNCTION: BETA10 0x1002ca3b
|
||||
MxLong Hospital::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -225,13 +225,15 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ef10
|
||||
// FUNCTION: BETA10 0x1002eaca
|
||||
MxLong Infocenter::Notify(MxParam& p_param)
|
||||
{
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
MxLong result = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = HandleNotification0((MxNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -55,13 +55,15 @@ MxResult InfocenterDoor::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100379e0
|
||||
// FUNCTION: BETA10 0x10032227
|
||||
MxLong InfocenterDoor::Notify(MxParam& p_param)
|
||||
{
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
MxLong result = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
if (((MxEndActionNotificationParam&) p_param).GetAction()->GetAtomId() == m_atomId) {
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
|
||||
@@ -129,13 +129,15 @@ MxResult Isle::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10030c10
|
||||
// FUNCTION: BETA10 0x10032b63
|
||||
MxLong Isle::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
@@ -468,6 +470,7 @@ void Isle::UpdateGlobe()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100315f0
|
||||
// FUNCTION: BETA10 0x10033e46
|
||||
MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
@@ -68,13 +68,15 @@ MxResult JukeBox::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005d980
|
||||
// FUNCTION: BETA10 0x10037daf
|
||||
MxLong JukeBox::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -69,13 +69,15 @@ MxResult Police::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e480
|
||||
// FUNCTION: BETA10 0x100f04a3
|
||||
MxLong Police::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -108,13 +108,15 @@ MxResult RegistrationBook::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100770e0
|
||||
// FUNCTION: BETA10 0x100f2d98
|
||||
MxLong RegistrationBook::Notify(MxParam& p_param)
|
||||
{
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
MxLong result = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -84,13 +84,16 @@ void Score::DeleteScript()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10001410
|
||||
// FUNCTION: BETA10 0x100f4398
|
||||
MxLong Score::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong ret = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationStartAction:
|
||||
Paint();
|
||||
ret = 1;
|
||||
|
||||
Reference in New Issue
Block a user