diff --git a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp index 52db2304..ec4113f1 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp @@ -13,6 +13,7 @@ #include "mxnotificationmanager.h" #include "mxobjectfactory.h" #include "mxtimer.h" +#include "mxtype18notificationparam.h" #include "mxutilities.h" DECOMP_SIZE_ASSERT(LegoAnimMMPresenter, 0x74) @@ -96,10 +97,30 @@ MxResult LegoAnimMMPresenter::StartAction(MxStreamController* p_controller, MxDS return result; } -// STUB: LEGO1 0x1004aec0 +// FUNCTION: LEGO1 0x1004aec0 +// FUNCTION: BETA10 0x1004c01a void LegoAnimMMPresenter::EndAction() { - // TODO + if (m_tranInfo != NULL && m_tranInfo->m_unk0x15 && m_tranInfo->m_unk0x1c != NULL && + m_tranInfo->m_unk0x1c[1] != NULL) { + m_tranInfo->m_unk0x1c[1]->Enable(FALSE); + m_tranInfo->m_unk0x1c[1]->Enable(TRUE); + } + + m_tranInfo = NULL; + + MxType18NotificationParam param(c_notificationType18, NULL, m_animmanId); + if (m_animmanId != 0) { + NotificationManager()->Send(AnimationManager(), ¶m); + } + + if (m_action != NULL) { + MxCompositePresenter::EndAction(); + + if (m_unk0x64 != NULL) { + m_unk0x64->Remove(this); + } + } } // FUNCTION: LEGO1 0x1004b140 diff --git a/LEGO1/omni/include/mxtype18notificationparam.h b/LEGO1/omni/include/mxtype18notificationparam.h index 589fd2bb..ca5f8c16 100644 --- a/LEGO1/omni/include/mxtype18notificationparam.h +++ b/LEGO1/omni/include/mxtype18notificationparam.h @@ -7,8 +7,26 @@ // 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() override + { + return new MxType18NotificationParam(m_type, m_sender, m_unk0x0c); + } // vtable+0x04 + protected: undefined4 m_unk0x0c; // 0x0c }; +// SYNTHETIC: LEGO1 0x1004b080 +// MxType18NotificationParam::`scalar deleting destructor' + +// SYNTHETIC: LEGO1 0x1004b0f0 +// MxType18NotificationParam::~MxType18NotificationParam + #endif // MXTYPE18NOTIFICATIONPARAM_H