mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Fixes
This commit is contained in:
parent
a712ff6926
commit
8dad6b50bf
@ -10,7 +10,7 @@
|
||||
// SIZE 0x20
|
||||
class LegoEventNotificationParam : public MxNotificationParam {
|
||||
public:
|
||||
inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {}
|
||||
inline LegoEventNotificationParam() : MxNotificationParam(c_notificationNone, NULL) {}
|
||||
inline LegoEventNotificationParam(
|
||||
NotificationId p_type,
|
||||
MxCore* p_sender,
|
||||
|
||||
@ -105,10 +105,10 @@ MxLong Infocenter::Notify(MxParam& p_param)
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
);
|
||||
break;
|
||||
case TYPE17:
|
||||
case c_notificationType17:
|
||||
result = HandleNotification17(p_param);
|
||||
break;
|
||||
case MXTRANSITIONMANAGER_TRANSITIONENDED:
|
||||
case c_notificationTransitioned:
|
||||
StopBookAnimation();
|
||||
m_unk0x1d2 = 0;
|
||||
|
||||
|
||||
@ -90,10 +90,10 @@ MxLong Score::Notify(MxParam& p_param)
|
||||
DeleteScript(); // Shutting down
|
||||
ret = 1;
|
||||
break;
|
||||
case TYPE17:
|
||||
case c_notificationType17:
|
||||
ret = FUN_100016d0((MxType17NotificationParam&) p_param);
|
||||
break;
|
||||
case MXTRANSITIONMANAGER_TRANSITIONENDED:
|
||||
case c_notificationTransitioned:
|
||||
DeleteObjects(g_infoscorScript, 7, 9);
|
||||
if (m_unk0xf8)
|
||||
GameState()->HandleAction(m_unk0xf8);
|
||||
|
||||
@ -115,10 +115,10 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TYPE17:
|
||||
case c_notificationType17:
|
||||
result = HandleType17Notification(p_param);
|
||||
break;
|
||||
case TYPE18:
|
||||
case c_notificationType18:
|
||||
switch (m_act1state->GetUnknown18()) {
|
||||
case 4:
|
||||
result = GetCurrentVehicle()->Notify(p_param);
|
||||
@ -131,13 +131,13 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TYPE19:
|
||||
case c_notificationType19:
|
||||
result = HandleType19Notification(p_param);
|
||||
break;
|
||||
case TYPE20:
|
||||
case c_notificationType20:
|
||||
VTable0x68(TRUE);
|
||||
break;
|
||||
case MXTRANSITIONMANAGER_TRANSITIONENDED:
|
||||
case c_notificationTransitioned:
|
||||
result = HandleTransitionEnd();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -142,11 +142,11 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld)
|
||||
if (world) {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxNotificationParam param(MXTRANSITIONMANAGER_TRANSITIONENDED, this);
|
||||
MxNotificationParam param(c_notificationTransitioned, this);
|
||||
world->Notify(param);
|
||||
}
|
||||
#else
|
||||
world->Notify(MxNotificationParam(MXTRANSITIONMANAGER_TRANSITIONENDED, this));
|
||||
world->Notify(MxNotificationParam(c_notificationTransitioned, this));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ class MxEndActionNotificationParam : public MxActionNotificationParam {
|
||||
class MxType4NotificationParam : public MxActionNotificationParam {
|
||||
public:
|
||||
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;
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ class MxPresenter;
|
||||
// SIZE 0x2c
|
||||
class MxDSObject : public MxCore {
|
||||
public:
|
||||
enum MxDSType {
|
||||
enum Type {
|
||||
e_object = 0,
|
||||
e_action,
|
||||
e_mediaAction,
|
||||
@ -49,14 +49,14 @@ class MxDSObject : public MxCore {
|
||||
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 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 MxU32 GetObjectId() { return this->m_objectId; }
|
||||
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
||||
inline MxS16 GetUnknown24() { return this->m_unk0x24; }
|
||||
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 SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
|
||||
inline void SetUnknown28(MxPresenter* p_unk0x28) { this->m_unk0x28 = p_unk0x28; }
|
||||
|
||||
@ -8,29 +8,29 @@
|
||||
class MxCore;
|
||||
|
||||
enum NotificationId {
|
||||
PARAM_NONE = 0,
|
||||
c_notificationNone = 0,
|
||||
c_notificationStartAction = 1, // 100dc210:100d8350
|
||||
c_notificationEndAction = 2, // 100d8358:100d8350
|
||||
TYPE4 = 4, // 100dc208:100d8350
|
||||
MXPRESENTER_NOTIFICATION = 5,
|
||||
MXSTREAMER_DELETE_NOTIFY = 6, // 100dc760
|
||||
c_notificationType4 = 4, // 100dc208:100d8350
|
||||
c_notificationPresenter = 5,
|
||||
c_notificationStreamer = 6, // 100dc760
|
||||
c_notificationKeyPress = 7, // 100d6aa0
|
||||
c_notificationButtonUp = 8, // 100d6aa0
|
||||
c_notificationButtonDown = 9, // 100d6aa0
|
||||
c_notificationMouseMove = 10, // 100d6aa0
|
||||
TYPE11 = 11, // 100d6aa0
|
||||
c_notificationType11 = 11, // 100d6aa0
|
||||
c_notificationDragEnd = 12,
|
||||
c_notificationDragStart = 13,
|
||||
c_notificationDrag = 14,
|
||||
c_notificationTimer = 15, // 100d6aa0
|
||||
TYPE17 = 17,
|
||||
TYPE18 = 18, // 100d7e80
|
||||
TYPE19 = 19, // 100d6230
|
||||
TYPE20 = 20,
|
||||
c_notificationType17 = 17,
|
||||
c_notificationType18 = 18, // 100d7e80
|
||||
c_notificationType19 = 19, // 100d6230
|
||||
c_notificationType20 = 20,
|
||||
c_notificationNewPresenter = 21,
|
||||
TYPE22 = 22,
|
||||
TYPE23 = 23,
|
||||
MXTRANSITIONMANAGER_TRANSITIONENDED = 24
|
||||
c_notificationType22 = 22,
|
||||
c_notificationType23 = 23,
|
||||
c_notificationTransitioned = 24
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d56e0
|
||||
|
||||
@ -6,84 +6,76 @@
|
||||
class MxOmniCreateFlags {
|
||||
public:
|
||||
enum LowFlags {
|
||||
Flag_CreateObjectFactory = 0x01,
|
||||
Flag_CreateVariableTable = 0x02,
|
||||
Flag_CreateTickleManager = 0x04,
|
||||
Flag_CreateNotificationManager = 0x08,
|
||||
Flag_CreateVideoManager = 0x10,
|
||||
Flag_CreateSoundManager = 0x20,
|
||||
Flag_CreateMusicManager = 0x40,
|
||||
Flag_CreateEventManager = 0x80
|
||||
c_createObjectFactory = 0x01,
|
||||
c_createVariableTable = 0x02,
|
||||
c_createTickleManager = 0x04,
|
||||
c_createNotificationManager = 0x08,
|
||||
c_createVideoManager = 0x10,
|
||||
c_createSoundManager = 0x20,
|
||||
c_createMusicManager = 0x40,
|
||||
c_createEventManager = 0x80
|
||||
};
|
||||
|
||||
enum HighFlags {
|
||||
Flag_CreateTimer = 0x02,
|
||||
Flag_CreateStreamer = 0x04
|
||||
c_createTimer = 0x02,
|
||||
c_createStreamer = 0x04
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxOmniCreateFlags();
|
||||
|
||||
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & Flag_CreateObjectFactory; }
|
||||
inline const MxBool CreateVariableTable() const { return this->m_flags1 & Flag_CreateVariableTable; }
|
||||
inline const MxBool CreateTickleManager() const { return this->m_flags1 & Flag_CreateTickleManager; }
|
||||
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & Flag_CreateNotificationManager; }
|
||||
inline const MxBool CreateVideoManager() const { return this->m_flags1 & Flag_CreateVideoManager; }
|
||||
inline const MxBool CreateSoundManager() const { return this->m_flags1 & Flag_CreateSoundManager; }
|
||||
inline const MxBool CreateMusicManager() const { return this->m_flags1 & Flag_CreateMusicManager; }
|
||||
inline const MxBool CreateEventManager() const { return this->m_flags1 & Flag_CreateEventManager; }
|
||||
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & c_createObjectFactory; }
|
||||
inline const MxBool CreateVariableTable() const { return this->m_flags1 & c_createVariableTable; }
|
||||
inline const MxBool CreateTickleManager() const { return this->m_flags1 & c_createTickleManager; }
|
||||
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & c_createNotificationManager; }
|
||||
inline const MxBool CreateVideoManager() const { return this->m_flags1 & c_createVideoManager; }
|
||||
inline const MxBool CreateSoundManager() const { return this->m_flags1 & c_createSoundManager; }
|
||||
inline const MxBool CreateMusicManager() const { return this->m_flags1 & c_createMusicManager; }
|
||||
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 CreateStreamer() const { return this->m_flags2 & Flag_CreateStreamer; }
|
||||
inline const MxBool CreateTimer() const { return this->m_flags2 & c_createTimer; }
|
||||
inline const MxBool CreateStreamer() const { return this->m_flags2 & c_createStreamer; }
|
||||
|
||||
inline void CreateObjectFactory(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateObjectFactory : this->m_flags1 & ~Flag_CreateObjectFactory);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createObjectFactory : this->m_flags1 & ~c_createObjectFactory);
|
||||
}
|
||||
inline void CreateVariableTable(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateVariableTable : this->m_flags1 & ~Flag_CreateVariableTable);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVariableTable : this->m_flags1 & ~c_createVariableTable);
|
||||
}
|
||||
inline void CreateTickleManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateTickleManager : this->m_flags1 & ~Flag_CreateTickleManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createTickleManager : this->m_flags1 & ~c_createTickleManager);
|
||||
}
|
||||
inline void CreateNotificationManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateNotificationManager
|
||||
: this->m_flags1 & ~Flag_CreateNotificationManager);
|
||||
(p_enable ? this->m_flags1 | c_createNotificationManager : this->m_flags1 & ~c_createNotificationManager);
|
||||
}
|
||||
inline void CreateVideoManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateVideoManager : this->m_flags1 & ~Flag_CreateVideoManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVideoManager : this->m_flags1 & ~c_createVideoManager);
|
||||
}
|
||||
inline void CreateSoundManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateSoundManager : this->m_flags1 & ~Flag_CreateSoundManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createSoundManager : this->m_flags1 & ~c_createSoundManager);
|
||||
}
|
||||
inline void CreateMusicManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateMusicManager : this->m_flags1 & ~Flag_CreateMusicManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createMusicManager : this->m_flags1 & ~c_createMusicManager);
|
||||
}
|
||||
inline void CreateEventManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateEventManager : this->m_flags1 & ~Flag_CreateEventManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createEventManager : this->m_flags1 & ~c_createEventManager);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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:
|
||||
|
||||
@ -112,7 +112,7 @@ MxLong MxCompositePresenter::Notify(MxParam& p_param)
|
||||
case c_notificationEndAction:
|
||||
VTable0x58((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case MXPRESENTER_NOTIFICATION:
|
||||
case c_notificationPresenter:
|
||||
VTable0x5c((MxNotificationParam&) p_param);
|
||||
}
|
||||
|
||||
|
||||
@ -112,11 +112,11 @@ void MxPresenter::SendToCompositePresenter(MxOmni* p_omni)
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxNotificationParam param(MXPRESENTER_NOTIFICATION, this);
|
||||
MxNotificationParam param(c_notificationPresenter, this);
|
||||
NotificationManager()->Send(m_compositePresenter, ¶m);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this));
|
||||
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(c_notificationPresenter, this));
|
||||
#endif
|
||||
|
||||
m_action->SetOrigin(p_omni ? p_omni : MxOmni::GetInstance());
|
||||
|
||||
@ -84,11 +84,11 @@ MxLong MxStreamer::Close(const char* p_name)
|
||||
else {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c);
|
||||
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
|
||||
NotificationManager()->Send(this, ¬ification);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c));
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject)
|
||||
// FUNCTION: LEGO1 0x100b9b60
|
||||
MxLong MxStreamer::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == MXSTREAMER_DELETE_NOTIFY) {
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationStreamer) {
|
||||
MxDSAction ds;
|
||||
|
||||
ds.SetUnknown24(-2);
|
||||
@ -196,11 +196,11 @@ MxLong MxStreamer::Notify(MxParam& p_param)
|
||||
else {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c);
|
||||
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
|
||||
NotificationManager()->Send(this, ¬ification);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c));
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user