mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-13 03:31:15 +00:00
Clear unknowns in MxCompositePresenter (#1717)
This commit is contained in:
parent
c31b3dcdff
commit
faa4e45e48
@ -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'
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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")) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user