Make NotificationManager::Send take a const reference to notification (#836)

* Make NotificationManager::Send take a const reference to notification

* Fix virtual func
This commit is contained in:
Christian Semmler
2024-04-22 08:11:38 -04:00
committed by GitHub
parent 0e0d6890ad
commit f1688be263
22 changed files with 50 additions and 180 deletions

View File

@@ -42,7 +42,7 @@ MxEntity* MxOmni::AddToWorld(const char*, MxS32, MxPresenter*)
}
// FUNCTION: LEGO1 0x100aefc0
void MxOmni::NotifyCurrentEntity(MxNotificationParam* p_param)
void MxOmni::NotifyCurrentEntity(const MxNotificationParam& p_param)
{
}
@@ -269,28 +269,14 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p
if (object->StartAction(p_controller, &p_action) == SUCCESS) {
if (sender) {
#ifdef COMPAT_MODE
{
MxType4NotificationParam param(this, &p_action, object);
NotificationManager()->Send(sender, &param);
}
#else
NotificationManager()->Send(sender, &MxType4NotificationParam(this, &p_action, object));
#endif
NotificationManager()->Send(sender, MxType4NotificationParam(this, &p_action, object));
}
if (p_action.GetUnknown84()) {
#ifdef COMPAT_MODE
{
MxStartActionNotificationParam param(c_notificationStartAction, object, &p_action, FALSE);
NotificationManager()->Send(p_action.GetUnknown84(), &param);
}
#else
NotificationManager()->Send(
p_action.GetUnknown84(),
&MxStartActionNotificationParam(c_notificationStartAction, object, &p_action, FALSE)
MxStartActionNotificationParam(c_notificationStartAction, object, &p_action, FALSE)
);
#endif
}
result = SUCCESS;
}