This commit is contained in:
Christian Semmler 2024-01-17 10:22:11 -05:00
parent a712ff6926
commit 8dad6b50bf
12 changed files with 66 additions and 74 deletions

View File

@ -10,7 +10,7 @@
// SIZE 0x20 // SIZE 0x20
class LegoEventNotificationParam : public MxNotificationParam { class LegoEventNotificationParam : public MxNotificationParam {
public: public:
inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {} inline LegoEventNotificationParam() : MxNotificationParam(c_notificationNone, NULL) {}
inline LegoEventNotificationParam( inline LegoEventNotificationParam(
NotificationId p_type, NotificationId p_type,
MxCore* p_sender, MxCore* p_sender,

View File

@ -105,10 +105,10 @@ MxLong Infocenter::Notify(MxParam& p_param)
((LegoEventNotificationParam&) p_param).GetY() ((LegoEventNotificationParam&) p_param).GetY()
); );
break; break;
case TYPE17: case c_notificationType17:
result = HandleNotification17(p_param); result = HandleNotification17(p_param);
break; break;
case MXTRANSITIONMANAGER_TRANSITIONENDED: case c_notificationTransitioned:
StopBookAnimation(); StopBookAnimation();
m_unk0x1d2 = 0; m_unk0x1d2 = 0;

View File

@ -90,10 +90,10 @@ MxLong Score::Notify(MxParam& p_param)
DeleteScript(); // Shutting down DeleteScript(); // Shutting down
ret = 1; ret = 1;
break; break;
case TYPE17: case c_notificationType17:
ret = FUN_100016d0((MxType17NotificationParam&) p_param); ret = FUN_100016d0((MxType17NotificationParam&) p_param);
break; break;
case MXTRANSITIONMANAGER_TRANSITIONENDED: case c_notificationTransitioned:
DeleteObjects(g_infoscorScript, 7, 9); DeleteObjects(g_infoscorScript, 7, 9);
if (m_unk0xf8) if (m_unk0xf8)
GameState()->HandleAction(m_unk0xf8); GameState()->HandleAction(m_unk0xf8);

View File

@ -115,10 +115,10 @@ MxLong Isle::Notify(MxParam& p_param)
break; break;
} }
break; break;
case TYPE17: case c_notificationType17:
result = HandleType17Notification(p_param); result = HandleType17Notification(p_param);
break; break;
case TYPE18: case c_notificationType18:
switch (m_act1state->GetUnknown18()) { switch (m_act1state->GetUnknown18()) {
case 4: case 4:
result = GetCurrentVehicle()->Notify(p_param); result = GetCurrentVehicle()->Notify(p_param);
@ -131,13 +131,13 @@ MxLong Isle::Notify(MxParam& p_param)
break; break;
} }
break; break;
case TYPE19: case c_notificationType19:
result = HandleType19Notification(p_param); result = HandleType19Notification(p_param);
break; break;
case TYPE20: case c_notificationType20:
VTable0x68(TRUE); VTable0x68(TRUE);
break; break;
case MXTRANSITIONMANAGER_TRANSITIONENDED: case c_notificationTransitioned:
result = HandleTransitionEnd(); result = HandleTransitionEnd();
break; break;
} }

View File

@ -142,11 +142,11 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld)
if (world) { if (world) {
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
MxNotificationParam param(MXTRANSITIONMANAGER_TRANSITIONENDED, this); MxNotificationParam param(c_notificationTransitioned, this);
world->Notify(param); world->Notify(param);
} }
#else #else
world->Notify(MxNotificationParam(MXTRANSITIONMANAGER_TRANSITIONENDED, this)); world->Notify(MxNotificationParam(c_notificationTransitioned, this));
#endif #endif
} }
} }

View File

@ -104,7 +104,7 @@ class MxEndActionNotificationParam : public MxActionNotificationParam {
class MxType4NotificationParam : public MxActionNotificationParam { class MxType4NotificationParam : public MxActionNotificationParam {
public: public:
inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14) inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14)
: MxActionNotificationParam(TYPE4, p_sender, p_action, FALSE) : MxActionNotificationParam(c_notificationType4, p_sender, p_action, FALSE)
{ {
m_unk0x14 = p_unk0x14; m_unk0x14 = p_unk0x14;
} }

View File

@ -11,7 +11,7 @@ class MxPresenter;
// SIZE 0x2c // SIZE 0x2c
class MxDSObject : public MxCore { class MxDSObject : public MxCore {
public: public:
enum MxDSType { enum Type {
e_object = 0, e_object = 0,
e_action, e_action,
e_mediaAction, e_mediaAction,
@ -49,14 +49,14 @@ class MxDSObject : public MxCore {
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24); // vtable+1c; virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24); // vtable+1c;
inline virtual void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; } // vtable+20; inline virtual void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; } // vtable+20;
inline MxDSType GetType() const { return (MxDSType) this->m_type; } inline Type GetType() const { return (Type) this->m_type; }
inline const char* GetSourceName() const { return this->m_sourceName; } inline const char* GetSourceName() const { return this->m_sourceName; }
inline MxU32 GetObjectId() { return this->m_objectId; } inline MxU32 GetObjectId() { return this->m_objectId; }
inline const MxAtomId& GetAtomId() { return this->m_atomId; } inline const MxAtomId& GetAtomId() { return this->m_atomId; }
inline MxS16 GetUnknown24() { return this->m_unk0x24; } inline MxS16 GetUnknown24() { return this->m_unk0x24; }
inline MxPresenter* GetUnknown28() { return this->m_unk0x28; } inline MxPresenter* GetUnknown28() { return this->m_unk0x28; }
inline void SetType(MxDSType p_type) { this->m_type = p_type; } inline void SetType(Type p_type) { this->m_type = p_type; }
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; } inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; } inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
inline void SetUnknown28(MxPresenter* p_unk0x28) { this->m_unk0x28 = p_unk0x28; } inline void SetUnknown28(MxPresenter* p_unk0x28) { this->m_unk0x28 = p_unk0x28; }

View File

@ -8,29 +8,29 @@
class MxCore; class MxCore;
enum NotificationId { enum NotificationId {
PARAM_NONE = 0, c_notificationNone = 0,
c_notificationStartAction = 1, // 100dc210:100d8350 c_notificationStartAction = 1, // 100dc210:100d8350
c_notificationEndAction = 2, // 100d8358:100d8350 c_notificationEndAction = 2, // 100d8358:100d8350
TYPE4 = 4, // 100dc208:100d8350 c_notificationType4 = 4, // 100dc208:100d8350
MXPRESENTER_NOTIFICATION = 5, c_notificationPresenter = 5,
MXSTREAMER_DELETE_NOTIFY = 6, // 100dc760 c_notificationStreamer = 6, // 100dc760
c_notificationKeyPress = 7, // 100d6aa0 c_notificationKeyPress = 7, // 100d6aa0
c_notificationButtonUp = 8, // 100d6aa0 c_notificationButtonUp = 8, // 100d6aa0
c_notificationButtonDown = 9, // 100d6aa0 c_notificationButtonDown = 9, // 100d6aa0
c_notificationMouseMove = 10, // 100d6aa0 c_notificationMouseMove = 10, // 100d6aa0
TYPE11 = 11, // 100d6aa0 c_notificationType11 = 11, // 100d6aa0
c_notificationDragEnd = 12, c_notificationDragEnd = 12,
c_notificationDragStart = 13, c_notificationDragStart = 13,
c_notificationDrag = 14, c_notificationDrag = 14,
c_notificationTimer = 15, // 100d6aa0 c_notificationTimer = 15, // 100d6aa0
TYPE17 = 17, c_notificationType17 = 17,
TYPE18 = 18, // 100d7e80 c_notificationType18 = 18, // 100d7e80
TYPE19 = 19, // 100d6230 c_notificationType19 = 19, // 100d6230
TYPE20 = 20, c_notificationType20 = 20,
c_notificationNewPresenter = 21, c_notificationNewPresenter = 21,
TYPE22 = 22, c_notificationType22 = 22,
TYPE23 = 23, c_notificationType23 = 23,
MXTRANSITIONMANAGER_TRANSITIONENDED = 24 c_notificationTransitioned = 24
}; };
// VTABLE: LEGO1 0x100d56e0 // VTABLE: LEGO1 0x100d56e0

View File

@ -6,84 +6,76 @@
class MxOmniCreateFlags { class MxOmniCreateFlags {
public: public:
enum LowFlags { enum LowFlags {
Flag_CreateObjectFactory = 0x01, c_createObjectFactory = 0x01,
Flag_CreateVariableTable = 0x02, c_createVariableTable = 0x02,
Flag_CreateTickleManager = 0x04, c_createTickleManager = 0x04,
Flag_CreateNotificationManager = 0x08, c_createNotificationManager = 0x08,
Flag_CreateVideoManager = 0x10, c_createVideoManager = 0x10,
Flag_CreateSoundManager = 0x20, c_createSoundManager = 0x20,
Flag_CreateMusicManager = 0x40, c_createMusicManager = 0x40,
Flag_CreateEventManager = 0x80 c_createEventManager = 0x80
}; };
enum HighFlags { enum HighFlags {
Flag_CreateTimer = 0x02, c_createTimer = 0x02,
Flag_CreateStreamer = 0x04 c_createStreamer = 0x04
}; };
__declspec(dllexport) MxOmniCreateFlags(); __declspec(dllexport) MxOmniCreateFlags();
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & Flag_CreateObjectFactory; } inline const MxBool CreateObjectFactory() const { return this->m_flags1 & c_createObjectFactory; }
inline const MxBool CreateVariableTable() const { return this->m_flags1 & Flag_CreateVariableTable; } inline const MxBool CreateVariableTable() const { return this->m_flags1 & c_createVariableTable; }
inline const MxBool CreateTickleManager() const { return this->m_flags1 & Flag_CreateTickleManager; } inline const MxBool CreateTickleManager() const { return this->m_flags1 & c_createTickleManager; }
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & Flag_CreateNotificationManager; } inline const MxBool CreateNotificationManager() const { return this->m_flags1 & c_createNotificationManager; }
inline const MxBool CreateVideoManager() const { return this->m_flags1 & Flag_CreateVideoManager; } inline const MxBool CreateVideoManager() const { return this->m_flags1 & c_createVideoManager; }
inline const MxBool CreateSoundManager() const { return this->m_flags1 & Flag_CreateSoundManager; } inline const MxBool CreateSoundManager() const { return this->m_flags1 & c_createSoundManager; }
inline const MxBool CreateMusicManager() const { return this->m_flags1 & Flag_CreateMusicManager; } inline const MxBool CreateMusicManager() const { return this->m_flags1 & c_createMusicManager; }
inline const MxBool CreateEventManager() const { return this->m_flags1 & Flag_CreateEventManager; } inline const MxBool CreateEventManager() const { return this->m_flags1 & c_createEventManager; }
inline const MxBool CreateTimer() const { return this->m_flags2 & Flag_CreateTimer; } inline const MxBool CreateTimer() const { return this->m_flags2 & c_createTimer; }
inline const MxBool CreateStreamer() const { return this->m_flags2 & Flag_CreateStreamer; } inline const MxBool CreateStreamer() const { return this->m_flags2 & c_createStreamer; }
inline void CreateObjectFactory(MxBool p_enable) inline void CreateObjectFactory(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createObjectFactory : this->m_flags1 & ~c_createObjectFactory);
(p_enable ? this->m_flags1 | Flag_CreateObjectFactory : this->m_flags1 & ~Flag_CreateObjectFactory);
} }
inline void CreateVariableTable(MxBool p_enable) inline void CreateVariableTable(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createVariableTable : this->m_flags1 & ~c_createVariableTable);
(p_enable ? this->m_flags1 | Flag_CreateVariableTable : this->m_flags1 & ~Flag_CreateVariableTable);
} }
inline void CreateTickleManager(MxBool p_enable) inline void CreateTickleManager(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createTickleManager : this->m_flags1 & ~c_createTickleManager);
(p_enable ? this->m_flags1 | Flag_CreateTickleManager : this->m_flags1 & ~Flag_CreateTickleManager);
} }
inline void CreateNotificationManager(MxBool p_enable) inline void CreateNotificationManager(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 =
(p_enable ? this->m_flags1 | Flag_CreateNotificationManager (p_enable ? this->m_flags1 | c_createNotificationManager : this->m_flags1 & ~c_createNotificationManager);
: this->m_flags1 & ~Flag_CreateNotificationManager);
} }
inline void CreateVideoManager(MxBool p_enable) inline void CreateVideoManager(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createVideoManager : this->m_flags1 & ~c_createVideoManager);
(p_enable ? this->m_flags1 | Flag_CreateVideoManager : this->m_flags1 & ~Flag_CreateVideoManager);
} }
inline void CreateSoundManager(MxBool p_enable) inline void CreateSoundManager(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createSoundManager : this->m_flags1 & ~c_createSoundManager);
(p_enable ? this->m_flags1 | Flag_CreateSoundManager : this->m_flags1 & ~Flag_CreateSoundManager);
} }
inline void CreateMusicManager(MxBool p_enable) inline void CreateMusicManager(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createMusicManager : this->m_flags1 & ~c_createMusicManager);
(p_enable ? this->m_flags1 | Flag_CreateMusicManager : this->m_flags1 & ~Flag_CreateMusicManager);
} }
inline void CreateEventManager(MxBool p_enable) inline void CreateEventManager(MxBool p_enable)
{ {
this->m_flags1 = this->m_flags1 = (p_enable ? this->m_flags1 | c_createEventManager : this->m_flags1 & ~c_createEventManager);
(p_enable ? this->m_flags1 | Flag_CreateEventManager : this->m_flags1 & ~Flag_CreateEventManager);
} }
inline void CreateTimer(MxBool p_enable) inline void CreateTimer(MxBool p_enable)
{ {
this->m_flags2 = (p_enable ? this->m_flags2 | Flag_CreateTimer : this->m_flags2 & ~Flag_CreateTimer); this->m_flags2 = (p_enable ? this->m_flags2 | c_createTimer : this->m_flags2 & ~c_createTimer);
} }
inline void CreateStreamer(MxBool p_enable) inline void CreateStreamer(MxBool p_enable)
{ {
this->m_flags2 = (p_enable ? this->m_flags2 | Flag_CreateStreamer : this->m_flags2 & ~Flag_CreateStreamer); this->m_flags2 = (p_enable ? this->m_flags2 | c_createStreamer : this->m_flags2 & ~c_createStreamer);
} }
private: private:

View File

@ -112,7 +112,7 @@ MxLong MxCompositePresenter::Notify(MxParam& p_param)
case c_notificationEndAction: case c_notificationEndAction:
VTable0x58((MxEndActionNotificationParam&) p_param); VTable0x58((MxEndActionNotificationParam&) p_param);
break; break;
case MXPRESENTER_NOTIFICATION: case c_notificationPresenter:
VTable0x5c((MxNotificationParam&) p_param); VTable0x5c((MxNotificationParam&) p_param);
} }

View File

@ -112,11 +112,11 @@ void MxPresenter::SendToCompositePresenter(MxOmni* p_omni)
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
MxNotificationParam param(MXPRESENTER_NOTIFICATION, this); MxNotificationParam param(c_notificationPresenter, this);
NotificationManager()->Send(m_compositePresenter, &param); NotificationManager()->Send(m_compositePresenter, &param);
} }
#else #else
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this)); NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(c_notificationPresenter, this));
#endif #endif
m_action->SetOrigin(p_omni ? p_omni : MxOmni::GetInstance()); m_action->SetOrigin(p_omni ? p_omni : MxOmni::GetInstance());

View File

@ -84,11 +84,11 @@ MxLong MxStreamer::Close(const char* p_name)
else { else {
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c); MxStreamerNotification notification(c_notificationStreamer, NULL, c);
NotificationManager()->Send(this, &notification); NotificationManager()->Send(this, &notification);
} }
#else #else
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c)); NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
#endif #endif
} }
@ -184,7 +184,7 @@ MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject)
// FUNCTION: LEGO1 0x100b9b60 // FUNCTION: LEGO1 0x100b9b60
MxLong MxStreamer::Notify(MxParam& p_param) MxLong MxStreamer::Notify(MxParam& p_param)
{ {
if (((MxNotificationParam&) p_param).GetNotification() == MXSTREAMER_DELETE_NOTIFY) { if (((MxNotificationParam&) p_param).GetNotification() == c_notificationStreamer) {
MxDSAction ds; MxDSAction ds;
ds.SetUnknown24(-2); ds.SetUnknown24(-2);
@ -196,11 +196,11 @@ MxLong MxStreamer::Notify(MxParam& p_param)
else { else {
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c); MxStreamerNotification notification(c_notificationStreamer, NULL, c);
NotificationManager()->Send(this, &notification); NotificationManager()->Send(this, &notification);
} }
#else #else
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c)); NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
#endif #endif
} }
} }