Rename notification type

This commit is contained in:
Christian Semmler 2024-05-01 08:54:03 -04:00
parent ccc0464f6a
commit 5ab1bc5038
14 changed files with 68 additions and 67 deletions

View File

@ -25,13 +25,13 @@ class Helicopter : public IslePathActor {
return !strcmp(p_name, Helicopter::ClassName()) || IslePathActor::IsA(p_name);
}
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
MxU32 VTable0xcc() override; // vtable+0xcc
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xd8(MxType18NotificationParam& p_param) override; // vtable+0xd8
void VTable0xe4() override; // vtable+0xe4
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
MxU32 VTable0xcc() override; // vtable+0xcc
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xd8(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
void VTable0xe4() override; // vtable+0xe4
// SYNTHETIC: LEGO1 0x10003210
// Helicopter::`scalar deleting destructor'

View File

@ -2,10 +2,10 @@
#define ISLEPATHACTOR_H
#include "legocontrolmanager.h"
#include "legoendanimnotificationparam.h"
#include "legogamestate.h"
#include "legopathactor.h"
#include "legoworld.h"
#include "mxtype18notificationparam.h"
#include "mxtype19notificationparam.h"
#include "mxtypes.h"
@ -46,7 +46,7 @@ class IslePathActor : public LegoPathActor {
virtual MxU32 VTable0xd4(LegoControlManagerEvent&) { return 0; } // vtable+0xd4
// FUNCTION: LEGO1 0x10002e90
virtual MxU32 VTable0xd8(MxType18NotificationParam&) { return 0; } // vtable+0xd8
virtual MxU32 VTable0xd8(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
// FUNCTION: LEGO1 0x10002e00
virtual MxU32 VTable0xdc(MxType19NotificationParam&) { return 0; } // vtable+0xdc

View File

@ -0,0 +1,34 @@
#ifndef LEGOENDANIMNOTIFICATIONPARAM_H
#define LEGOENDANIMNOTIFICATIONPARAM_H
#include "decomp.h"
#include "mxnotificationparam.h"
// VTABLE: LEGO1 0x100d7e80
// SIZE 0x10
class LegoEndAnimNotificationParam : public MxNotificationParam {
public:
LegoEndAnimNotificationParam(NotificationId p_type, MxCore* p_sender, MxU32 p_index)
: MxNotificationParam(p_type, p_sender), m_index(p_index)
{
}
// FUNCTION: LEGO1 0x1004afd0
MxNotificationParam* Clone() const override
{
return new LegoEndAnimNotificationParam(m_type, m_sender, m_index);
} // vtable+0x04
inline MxU32 GetIndex() { return m_index; }
protected:
MxU32 m_index; // 0x0c
};
// SYNTHETIC: LEGO1 0x1004b080
// LegoEndAnimNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1004b0f0
// LegoEndAnimNotificationParam::~LegoEndAnimNotificationParam
#endif // LEGOENDANIMNOTIFICATIONPARAM_H

View File

@ -23,14 +23,14 @@ class TowTrack : public IslePathActor {
return !strcmp(p_name, TowTrack::ClassName()) || IslePathActor::IsA(p_name);
}
MxLong Notify(MxParam& p_param) override; // vtable+0x04
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 VTable0xcc() override; // vtable+0xcc
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xd8(MxType18NotificationParam& p_param) override; // vtable+0xd8
MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4
MxLong Notify(MxParam& p_param) override; // vtable+0x04
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
void VTable0x70(float p_float) override; // vtable+0x70
MxU32 VTable0xcc() override; // vtable+0xcc
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
MxU32 VTable0xd8(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc
void VTable0xe4() override; // vtable+0xe4
void FUN_1004dab0();
void FUN_1004dad0();

View File

@ -248,7 +248,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
}
// FUNCTION: LEGO1 0x10003c20
MxU32 Helicopter::VTable0xd8(MxType18NotificationParam& p_param)
MxU32 Helicopter::VTable0xd8(LegoEndAnimNotificationParam& p_param)
{
MxU32 ret = 0;

View File

@ -45,7 +45,7 @@ MxLong IsleActor::Notify(MxParam& p_param)
case c_notificationType11:
result = VTable0x68();
break;
case c_notificationType18:
case c_notificationEndAnim:
result = VTable0x70();
break;
case c_notificationType19:

View File

@ -47,8 +47,8 @@ MxLong IslePathActor::Notify(MxParam& p_param)
case c_notificationClick:
ret = VTable0xd4((LegoControlManagerEvent&) p_param);
break;
case c_notificationType18:
ret = VTable0xd8((MxType18NotificationParam&) p_param);
case c_notificationEndAnim:
ret = VTable0xd8((LegoEndAnimNotificationParam&) p_param);
break;
case c_notificationType19:
ret = VTable0xdc((MxType19NotificationParam&) p_param);

View File

@ -37,7 +37,7 @@ MxLong TowTrack::Notify(MxParam& p_param)
}
// STUB: LEGO1 0x1004cd30
MxU32 TowTrack::VTable0xd8(MxType18NotificationParam& p_param)
MxU32 TowTrack::VTable0xd8(LegoEndAnimNotificationParam& p_param)
{
// TODO
return 0;

View File

@ -928,15 +928,15 @@ LegoTranInfo* LegoAnimationManager::GetTranInfo(MxU32 p_index)
MxLong LegoAnimationManager::Notify(MxParam& p_param)
{
if (((MxNotificationParam&) p_param).GetSender() == this) {
if (((MxNotificationParam&) p_param).GetType() == c_notificationType18) {
if (((MxNotificationParam&) p_param).GetType() == c_notificationEndAnim) {
FUN_100605e0(m_unk0x18, TRUE, NULL, TRUE, NULL, FALSE, TRUE, TRUE, TRUE);
}
}
else if (((MxNotificationParam&) p_param).GetType() == c_notificationType18 && m_tranInfoList != NULL) {
else if (((MxNotificationParam&) p_param).GetType() == c_notificationEndAnim && m_tranInfoList != NULL) {
LegoTranInfoListCursor cursor(m_tranInfoList);
LegoTranInfo* tranInfo;
MxU32 index = ((MxType18NotificationParam&) p_param).GetUnknown0x0c();
MxU32 index = ((LegoEndAnimNotificationParam&) p_param).GetIndex();
MxBool found = FALSE;
while (cursor.Next(tranInfo)) {
@ -979,7 +979,7 @@ MxLong LegoAnimationManager::Notify(MxParam& p_param)
m_unk0x1a = FALSE;
}
else {
MxType18NotificationParam param(c_notificationType18, this, 0);
LegoEndAnimNotificationParam param(c_notificationEndAnim, this, 0);
NotificationManager()->Send(this, param);
}
}

View File

@ -5,6 +5,7 @@
#include "islepathactor.h"
#include "legoanimationmanager.h"
#include "legoanimpresenter.h"
#include "legoendanimnotificationparam.h"
#include "legotraninfo.h"
#include "legovideomanager.h"
#include "legoworld.h"
@ -15,7 +16,6 @@
#include "mxnotificationmanager.h"
#include "mxobjectfactory.h"
#include "mxtimer.h"
#include "mxtype18notificationparam.h"
#include "mxutilities.h"
DECOMP_SIZE_ASSERT(LegoAnimMMPresenter, 0x74)
@ -123,7 +123,7 @@ void LegoAnimMMPresenter::EndAction()
m_tranInfo = NULL;
MxType18NotificationParam param(c_notificationType18, NULL, m_animmanId);
LegoEndAnimNotificationParam param(c_notificationEndAnim, NULL, m_animmanId);
if (m_animmanId != 0) {
NotificationManager()->Send(AnimationManager(), param);
}

View File

@ -4,6 +4,7 @@
#include "legoanimationmanager.h"
#include "legoanimmmpresenter.h"
#include "legocharactermanager.h"
#include "legoendanimnotificationparam.h"
#include "legopathboundary.h"
#include "legovideomanager.h"
#include "legoworld.h"
@ -15,7 +16,6 @@
#include "mxnotificationmanager.h"
#include "mxstreamchunk.h"
#include "mxtimer.h"
#include "mxtype18notificationparam.h"
#include "mxutilities.h"
#include "mxvideomanager.h"
#include "realtime/realtime.h"
@ -1021,7 +1021,7 @@ void LegoAnimPresenter::EndAction()
LegoWorld* world = CurrentWorld();
if (world != NULL) {
MxType18NotificationParam param(c_notificationType18, NULL, 0);
LegoEndAnimNotificationParam param(c_notificationEndAnim, NULL, 0);
NotificationManager()->Send(world, param);
}

View File

@ -138,7 +138,7 @@ MxLong Isle::Notify(MxParam& p_param)
case c_notificationClick:
result = HandleClick((LegoControlManagerEvent&) p_param);
break;
case c_notificationType18:
case c_notificationEndAnim:
switch (m_act1state->m_unk0x018) {
case 4:
result = CurrentActor()->Notify(p_param);

View File

@ -7,6 +7,7 @@
class MxCore;
// Several of those should be defined in LegoOmni
enum NotificationId {
c_notificationType0 = 0,
c_notificationStartAction = 1, // 100dc210:100d8350
@ -24,8 +25,8 @@ enum NotificationId {
c_notificationDrag = 14,
c_notificationTimer = 15, // 100d6aa0
c_notificationClick = 17,
c_notificationType18 = 18, // 100d7e80
c_notificationType19 = 19, // 100d6230
c_notificationEndAnim = 18, // 100d7e80
c_notificationType19 = 19, // 100d6230
c_notificationType20 = 20,
c_notificationNewPresenter = 21,
c_notificationType22 = 22,

View File

@ -1,34 +0,0 @@
#ifndef MXTYPE18NOTIFICATIONPARAM_H
#define MXTYPE18NOTIFICATIONPARAM_H
#include "decomp.h"
#include "mxnotificationparam.h"
// VTABLE: LEGO1 0x100d7e80
// SIZE 0x10
class MxType18NotificationParam : public MxNotificationParam {
public:
MxType18NotificationParam(NotificationId p_type, MxCore* p_sender, undefined4 p_unk0x0c)
: MxNotificationParam(p_type, p_sender), m_unk0x0c(p_unk0x0c)
{
}
// FUNCTION: LEGO1 0x1004afd0
MxNotificationParam* Clone() const override
{
return new MxType18NotificationParam(m_type, m_sender, m_unk0x0c);
} // vtable+0x04
inline undefined4 GetUnknown0x0c() { return m_unk0x0c; }
protected:
undefined4 m_unk0x0c; // 0x0c
};
// SYNTHETIC: LEGO1 0x1004b080
// MxType18NotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1004b0f0
// MxType18NotificationParam::~MxType18NotificationParam
#endif // MXTYPE18NOTIFICATIONPARAM_H