mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-28 02:44:18 +00:00
Fix MxParam casts in Notify functions (#1188)
* First batch * Second batch
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "mxtimer.h"
|
||||
#include "roi/legoroi.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <vec.h>
|
||||
|
||||
@@ -148,7 +149,9 @@ MxResult Act2Brick::Tickle()
|
||||
// FUNCTION: BETA10 0x10012ec4
|
||||
MxLong Act2Brick::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick && m_roi->GetVisibility()) {
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
if (param.GetNotification() == c_notificationClick && m_roi->GetVisibility()) {
|
||||
m_roi->SetVisibility(FALSE);
|
||||
|
||||
if (m_whistleSound != NULL) {
|
||||
@@ -160,6 +163,7 @@ MxLong Act2Brick::Notify(MxParam& p_param)
|
||||
return 1;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,12 @@
|
||||
DECOMP_SIZE_ASSERT(Act2PoliceStation, 0x68)
|
||||
|
||||
// FUNCTION: LEGO1 0x1004e0e0
|
||||
// FUNCTION: BETA10 0x100137c0
|
||||
MxLong Act2PoliceStation::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
if (param.GetNotification() == c_notificationClick) {
|
||||
MxNotificationParam param(c_notificationType23, NULL);
|
||||
NotificationManager()->Send(CurrentWorld(), param);
|
||||
return 1;
|
||||
|
||||
@@ -38,6 +38,7 @@ MxResult LegoCameraController::Create()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10012020
|
||||
// FUNCTION: BETA10 0x10067852
|
||||
MxLong LegoCameraController::Notify(MxParam& p_param)
|
||||
{
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
|
||||
Reference in New Issue
Block a user