Implement/match LegoAnimMMPresenter::EndAction (#826)

* Implement/match LegoAnimMMPresenter::EndAction

* Add missing vtable
This commit is contained in:
Christian Semmler 2024-04-20 10:41:34 -04:00 committed by GitHub
parent 8d729f77b7
commit c617139d5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 41 additions and 2 deletions

View file

@ -13,6 +13,7 @@
#include "mxnotificationmanager.h" #include "mxnotificationmanager.h"
#include "mxobjectfactory.h" #include "mxobjectfactory.h"
#include "mxtimer.h" #include "mxtimer.h"
#include "mxtype18notificationparam.h"
#include "mxutilities.h" #include "mxutilities.h"
DECOMP_SIZE_ASSERT(LegoAnimMMPresenter, 0x74) DECOMP_SIZE_ASSERT(LegoAnimMMPresenter, 0x74)
@ -96,10 +97,30 @@ MxResult LegoAnimMMPresenter::StartAction(MxStreamController* p_controller, MxDS
return result; return result;
} }
// STUB: LEGO1 0x1004aec0 // FUNCTION: LEGO1 0x1004aec0
// FUNCTION: BETA10 0x1004c01a
void LegoAnimMMPresenter::EndAction() 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(), &param);
}
if (m_action != NULL) {
MxCompositePresenter::EndAction();
if (m_unk0x64 != NULL) {
m_unk0x64->Remove(this);
}
}
} }
// FUNCTION: LEGO1 0x1004b140 // FUNCTION: LEGO1 0x1004b140

View file

@ -7,8 +7,26 @@
// VTABLE: LEGO1 0x100d7e80 // VTABLE: LEGO1 0x100d7e80
// SIZE 0x10 // SIZE 0x10
class MxType18NotificationParam : public MxNotificationParam { 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: protected:
undefined4 m_unk0x0c; // 0x0c undefined4 m_unk0x0c; // 0x0c
}; };
// SYNTHETIC: LEGO1 0x1004b080
// MxType18NotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1004b0f0
// MxType18NotificationParam::~MxType18NotificationParam
#endif // MXTYPE18NOTIFICATIONPARAM_H #endif // MXTYPE18NOTIFICATIONPARAM_H