isle/LEGO1/omni/include/mxactionnotificationparam.h

128 lines
2.9 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;
2023-10-24 19:38:27 -04:00
if (p_reallocAction)
this->m_action = new MxDSAction();
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
2023-10-24 19:38:27 -04:00
inline virtual ~MxActionNotificationParam() override
{
if (!this->m_realloc)
return;
2023-10-24 19:38:27 -04:00
if (this->m_action)
delete this->m_action;
}
// FUNCTION: LEGO1 0x100510c0
virtual MxNotificationParam* Clone() override
{
return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc);
}; // vtable+0x4
2023-10-24 19:38:27 -04:00
inline MxDSAction* GetAction() { return m_action; }
protected:
2023-10-24 19:38:27 -04:00
MxDSAction* m_action; // 0xc
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)
{
}
virtual MxNotificationParam* Clone() override; // vtable+0x4
};
(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
virtual MxNotificationParam* Clone() override
{
return new MxEndActionNotificationParam(
c_notificationEndAction,
this->m_sender,
this->m_action,
this->m_realloc
);
}; // vtable+0x4
};
// VTABLE: LEGO1 0x100dc208
// SIZE 0x18
class MxType4NotificationParam : public MxActionNotificationParam {
public:
inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14)
: MxActionNotificationParam(TYPE4, p_sender, p_action, FALSE)
{
m_unk0x14 = p_unk0x14;
}
virtual MxNotificationParam* Clone() override; // vtable+0x4
private:
MxPresenter* m_unk0x14; // 0x14
};
// SYNTHETIC: LEGO1 0x100513a0
// MxEndActionNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100b0430
// MxStartActionNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100b05c0
// MxType4NotificationParam::`scalar deleting destructor'
2023-10-24 19:24:29 -04:00
#endif