Clear unknowns in MxCompositePresenter (#1717)

This commit is contained in:
Fabian Neundorf 2026-01-12 23:16:44 +01:00 committed by GitHub
parent c31b3dcdff
commit faa4e45e48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 27 additions and 26 deletions

View File

@ -61,7 +61,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
void ParseExtra() override; // vtable+0x30
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
void EndAction() override; // vtable+0x40
void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60
void AdvanceSerialAction(MxPresenter* p_presenter) override; // vtable+0x60
// SYNTHETIC: LEGO1 0x1004aa40
// LegoAnimMMPresenter::`scalar deleting destructor'

View File

@ -42,7 +42,7 @@ class LegoWorldPresenter : public LegoEntityPresenter {
void StartingTickle() override; // vtable+0x1c
void ParseExtra() override; // vtable+0x30
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60
void AdvanceSerialAction(MxPresenter* p_presenter) override; // vtable+0x60
MxResult LoadWorld(char* p_worldName, LegoWorld* p_world);

View File

@ -18,7 +18,7 @@ class MxControlPresenter : public MxCompositePresenter {
void RepeatingTickle() override {} // vtable+0x24
// FUNCTION: LEGO1 0x10043fe0
MxBool VTable0x64(undefined4 p_undefined) override { return m_unk0x50; } // vtable+0x64
MxBool GetActionEnded(undefined4 p_undefined) override { return m_unk0x50; } // vtable+0x64
// FUNCTION: LEGO1 0x10043ff0
virtual void VTable0x68(MxBool p_unk0x50) { m_unk0x50 = p_unk0x50; } // vtable+0x68

View File

@ -26,7 +26,7 @@ void LegoActionControlPresenter::ReadyTickle()
m_subscriber->FreeDataChunk(chunk);
if (m_compositePresenter) {
if (m_action->GetDuration() == -1 || m_action->GetFlags() & 1) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
}
}

View File

@ -225,7 +225,7 @@ MxLong LegoAnimMMPresenter::Notify(MxParam& p_param)
}
// FUNCTION: LEGO1 0x1004b360
void LegoAnimMMPresenter::VTable0x60(MxPresenter* p_presenter)
void LegoAnimMMPresenter::AdvanceSerialAction(MxPresenter* p_presenter)
{
if (m_presenter == p_presenter && ((MxU8) p_presenter->GetCurrentTickleState() == MxPresenter::e_streaming ||
(MxU8) p_presenter->GetCurrentTickleState() == MxPresenter::e_done)) {
@ -403,7 +403,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b610(MxLong p_time)
m_action->SetTimeStarted(Timer()->GetTime());
if (m_compositePresenter != NULL) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
return TRUE;

View File

@ -400,9 +400,9 @@ MxResult LegoWorldPresenter::LoadWorldModel(ModelDbModel& p_model, FILE* p_wdbFi
}
// FUNCTION: LEGO1 0x10067a70
void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter)
void LegoWorldPresenter::AdvanceSerialAction(MxPresenter* p_presenter)
{
MxCompositePresenter::VTable0x60(p_presenter);
MxCompositePresenter::AdvanceSerialAction(p_presenter);
MxDSAction* action = p_presenter->GetAction();
if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::c_looping) == 0) {

View File

@ -820,7 +820,7 @@ void LegoAnimPresenter::StartingTickle()
if ((m_action->GetDuration() == -1 || ((MxDSMediaAction*) m_action)->GetSustainTime() == -1) &&
m_compositePresenter) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
else {
m_action->SetTimeStarted(Timer()->GetTime());
@ -830,7 +830,7 @@ void LegoAnimPresenter::StartingTickle()
if (m_compositePresenter && m_compositePresenter->IsA("LegoAnimMMPresenter")) {
m_unk0x96 = ((LegoAnimMMPresenter*) m_compositePresenter)->FUN_1004b8b0();
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
VTable0x8c();
@ -854,7 +854,7 @@ void LegoAnimPresenter::StreamingTickle()
ProgressTickleState(e_done);
if (m_compositePresenter) {
if (m_compositePresenter->IsA("LegoAnimMMPresenter")) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
}
}
@ -1235,7 +1235,7 @@ void LegoLoopingAnimPresenter::StreamingTickle()
ProgressTickleState(e_done);
if (m_compositePresenter) {
if (m_compositePresenter->IsA("LegoAnimMMPresenter")) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
}
}

View File

@ -139,7 +139,7 @@ MxResult LegoTexturePresenter::PutData()
// FUNCTION: LEGO1 0x1004fcb0
void LegoTexturePresenter::DoneTickle()
{
if (this->m_compositePresenter && !this->m_compositePresenter->VTable0x64(2)) {
if (this->m_compositePresenter && !this->m_compositePresenter->GetActionEnded(2)) {
SetTickleState(e_idle);
return;
}

View File

@ -43,15 +43,15 @@ class MxCompositePresenter : public MxPresenter {
void SetTickleState(TickleState p_tickleState) override; // vtable+0x44
MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48
void Enable(MxBool p_enable) override; // vtable+0x54
virtual void VTable0x58(MxEndActionNotificationParam& p_param); // vtable+0x58
virtual void VTable0x5c(MxNotificationParam& p_param); // vtable+0x5c
virtual void VTable0x60(MxPresenter* p_presenter); // vtable+0x60
virtual void HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0x58
virtual void HandlePresenter(MxNotificationParam& p_param); // vtable+0x5c
virtual void AdvanceSerialAction(MxPresenter* p_presenter); // vtable+0x60
// FUNCTION: LEGO1 0x1000caf0
virtual MxBool VTable0x64(undefined4 p_undefined)
virtual MxBool GetActionEnded(undefined4 p_undefined)
{
if (m_compositePresenter) {
return m_compositePresenter->VTable0x64(p_undefined);
return m_compositePresenter->GetActionEnded(p_undefined);
}
return TRUE;
} // vtable+0x64

View File

@ -117,10 +117,10 @@ MxLong MxCompositePresenter::Notify(MxParam& p_param)
switch (param.GetNotification()) {
case c_notificationEndAction:
VTable0x58((MxEndActionNotificationParam&) p_param);
HandleEndAction((MxEndActionNotificationParam&) p_param);
break;
case c_notificationPresenter:
VTable0x5c((MxNotificationParam&) p_param);
HandlePresenter((MxNotificationParam&) p_param);
break;
default:
assert(0);
@ -131,7 +131,7 @@ MxLong MxCompositePresenter::Notify(MxParam& p_param)
}
// FUNCTION: LEGO1 0x100b67f0
void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
void MxCompositePresenter::HandleEndAction(MxEndActionNotificationParam& p_param)
{
MxPresenter* presenter = (MxPresenter*) p_param.GetSender();
MxDSAction* action = p_param.GetAction();
@ -177,7 +177,7 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
}
// FUNCTION: LEGO1 0x100b69b0
void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
void MxCompositePresenter::HandlePresenter(MxNotificationParam& p_param)
{
if (!m_list.empty()) {
MxPresenter* presenter = (MxPresenter*) p_param.GetSender();
@ -218,13 +218,13 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
}
// FUNCTION: LEGO1 0x100b6b40
void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
void MxCompositePresenter::AdvanceSerialAction(MxPresenter* p_presenter)
{
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
if (*it == p_presenter) {
if (++it == m_list.end()) {
if (m_compositePresenter) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
}
else if (m_action->IsA("MxDSSerialAction")) {

View File

@ -142,7 +142,8 @@ void MxMediaPresenter::EndAction()
m_currentChunk = NULL;
if (m_action->GetFlags() & MxDSAction::c_world && (!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
if (m_action->GetFlags() & MxDSAction::c_world &&
(!m_compositePresenter || !m_compositePresenter->GetActionEnded(2))) {
MxPresenter::Enable(FALSE);
SetTickleState(e_idle);
}

View File

@ -132,7 +132,7 @@ void MxStillPresenter::StreamingTickle()
ProgressTickleState(e_repeating);
if (m_action->GetDuration() == -1 && m_compositePresenter) {
m_compositePresenter->VTable0x60(this);
m_compositePresenter->AdvanceSerialAction(this);
}
}
}