isle-portable/LEGO1/omni/include/mxactionnotificationparam.h

143 lines
3.3 KiB
C
Raw Normal View History

#ifndef MXACTIONNOTIFICATIONPARAM_H
#define MXACTIONNOTIFICATIONPARAM_H
#include "mxdsaction.h"
2023-10-24 19:38:27 -04:00
#include "mxnotificationparam.h"
class MxPresenter;
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// VTABLE: LEGO1 0x100d8350
// SIZE 0x14
2023-10-24 19:38:27 -04:00
class MxActionNotificationParam : public MxNotificationParam {
public:
inline MxActionNotificationParam(
NotificationId p_type,
MxCore* p_sender,
MxDSAction* p_action,
MxBool p_reallocAction
)
2023-10-24 19:38:27 -04:00
: MxNotificationParam(p_type, p_sender)
{
MxDSAction* oldAction = p_action;
this->m_realloc = p_reallocAction;
if (p_reallocAction) {
2023-10-24 19:38:27 -04:00
this->m_action = new MxDSAction();
}
2023-10-24 19:38:27 -04:00
else {
this->m_action = oldAction;
return;
}
2023-10-24 19:38:27 -04:00
this->m_action->SetAtomId(oldAction->GetAtomId());
this->m_action->SetObjectId(oldAction->GetObjectId());
this->m_action->SetUnknown24(oldAction->GetUnknown24());
}
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x10051050
inline ~MxActionNotificationParam() override
2023-10-24 19:38:27 -04:00
{
if (!this->m_realloc) {
2023-10-24 19:38:27 -04:00
return;
}
if (this->m_action) {
2023-10-24 19:38:27 -04:00
delete this->m_action;
}
2023-10-24 19:38:27 -04:00
}
// FUNCTION: LEGO1 0x100510c0
MxNotificationParam* Clone() override
{
return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc);
} // vtable+0x04
2023-10-24 19:38:27 -04:00
inline MxDSAction* GetAction() { return m_action; }
protected:
MxDSAction* m_action; // 0x0c
2023-10-24 19:38:27 -04:00
MxBool m_realloc; // 0x10
};
// VTABLE: LEGO1 0x100dc210
// SIZE 0x14
class MxStartActionNotificationParam : public MxActionNotificationParam {
public:
inline MxStartActionNotificationParam(
NotificationId p_type,
MxCore* p_sender,
MxDSAction* p_action,
MxBool p_reallocAction
)
: MxActionNotificationParam(p_type, p_sender, p_action, p_reallocAction)
{
}
MxNotificationParam* Clone() override; // vtable+0x04
};
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// VTABLE: LEGO1 0x100d8358
// SIZE 0x14
2023-10-24 19:38:27 -04:00
class MxEndActionNotificationParam : public MxActionNotificationParam {
public:
2023-10-24 19:38:27 -04:00
inline MxEndActionNotificationParam(
NotificationId p_type,
2023-10-24 19:38:27 -04:00
MxCore* p_sender,
MxDSAction* p_action,
MxBool p_reallocAction
)
: MxActionNotificationParam(p_type, p_sender, p_action, p_reallocAction)
{
}
// FUNCTION: LEGO1 0x10051270
MxNotificationParam* Clone() override
{
return new MxEndActionNotificationParam(
c_notificationEndAction,
this->m_sender,
this->m_action,
this->m_realloc
);
} // vtable+0x04
};
// VTABLE: LEGO1 0x100dc208
// SIZE 0x18
class MxType4NotificationParam : public MxActionNotificationParam {
public:
inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14)
: MxActionNotificationParam(c_notificationType4, p_sender, p_action, FALSE)
{
m_unk0x14 = p_unk0x14;
}
MxNotificationParam* Clone() override; // vtable+0x04
private:
MxPresenter* m_unk0x14; // 0x14
};
// SYNTHETIC: LEGO1 0x100511e0
// MxActionNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100513a0
// MxEndActionNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10051410
// MxEndActionNotificationParam::~MxEndActionNotificationParam
// SYNTHETIC: LEGO1 0x100b0430
// MxStartActionNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100b04a0
// MxStartActionNotificationParam::~MxStartActionNotificationParam
// SYNTHETIC: LEGO1 0x100b05c0
// MxType4NotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100b0630
// MxType4NotificationParam::~MxType4NotificationParam
2023-10-24 19:24:29 -04:00
#endif