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:
@@ -130,8 +130,9 @@ void Ambulance::CreateState()
|
||||
MxLong Ambulance::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = HandleNotification0();
|
||||
break;
|
||||
|
||||
@@ -19,9 +19,12 @@ BuildingEntity::~BuildingEntity()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100150a0
|
||||
// FUNCTION: BETA10 0x10024e37
|
||||
MxLong BuildingEntity::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
if (param.GetNotification() == c_notificationClick) {
|
||||
return HandleClick((LegoEventNotificationParam&) p_param);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,12 @@ BumpBouy::~BumpBouy()
|
||||
MxLong BumpBouy::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
IslePathActor* user = (IslePathActor*) UserActor();
|
||||
assert(user);
|
||||
|
||||
if (user->IsA("Jetski") && ((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||
if (user->IsA("Jetski") && param.GetNotification() == c_notificationClick) {
|
||||
VideoManager()->SetRender3D(FALSE);
|
||||
user->SetWorldSpeed(0);
|
||||
user->Exit();
|
||||
|
||||
@@ -25,11 +25,13 @@ MxResult IsleActor::Create(MxDSAction& p_dsAction)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002c7b0
|
||||
// FUNCTION: BETA10 0x1003622e
|
||||
MxLong IsleActor::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = VTable0x6c();
|
||||
break;
|
||||
|
||||
@@ -46,11 +46,13 @@ void IslePathActor::Destroy(MxBool p_fromDestructor)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001a2c0
|
||||
// FUNCTION: BETA10 0x100364ca
|
||||
MxLong IslePathActor::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = HandleNotification0();
|
||||
break;
|
||||
|
||||
@@ -30,9 +30,12 @@ JukeBoxEntity::~JukeBoxEntity()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10085e40
|
||||
// FUNCTION: BETA10 0x10038c37
|
||||
MxLong JukeBoxEntity::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
if (param.GetNotification() == c_notificationClick) {
|
||||
if (!FUN_1003ef60()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -81,12 +81,14 @@ Radio::~Radio()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002ca30
|
||||
// FUNCTION: BETA10 0x100f19e8
|
||||
MxLong Radio::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (m_unk0x0c) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
|
||||
@@ -113,11 +113,13 @@ void TowTrack::CreateState()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004cc80
|
||||
// FUNCTION: BETA10 0x100f6de2
|
||||
MxLong TowTrack::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
switch (param.GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = HandleNotification0();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user