Implement LegoWorldPresenter::VTable0x60 (#442)

* LegoWorldPresenter::VTable0x60

* Update infocenter.cpp

* Minor adjustments

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha 2024-01-15 15:17:54 -05:00 committed by GitHub
parent 5b7624c32a
commit 6df310bb66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View file

@ -10,6 +10,7 @@
#include "mxactionnotificationparam.h"
#include "mxautolocker.h"
#include "mxdsactionlist.h"
#include "mxdsmediaaction.h"
#include "mxdsmultiaction.h"
#include "mxnotificationmanager.h"
#include "mxobjectfactory.h"
@ -145,9 +146,27 @@ void LegoWorldPresenter::StartingTickle()
ProgressTickleState(TickleState_Streaming);
}
// STUB: LEGO1 0x10067a70
// FUNCTION: LEGO1 0x10067a70
void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter)
{
MxCompositePresenter::VTable0x60(p_presenter);
MxDSAction* action = p_presenter->GetAction();
if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::Flag_Looping) == 0) {
if (!action->IsA("MxDSMediaAction")) {
return;
}
if (((MxDSMediaAction*) action)->GetSustainTime() != -1) {
return;
}
}
if (!p_presenter->IsA("LegoAnimPresenter") && !p_presenter->IsA("MxControlPresenter") &&
!p_presenter->IsA("MxCompositePresenter")) {
p_presenter->SendToCompositePresenter(Lego());
((LegoWorld*) m_entity)->VTable0x58(p_presenter);
}
}
// STUB: LEGO1 0x10067b00

View file

@ -116,6 +116,7 @@ class MxPresenter : public MxCore {
__declspec(dllexport) virtual void Enable(MxBool p_enable); // vtable+0x54
MxEntity* CreateEntity(const char* p_name);
void SendToCompositePresenter(MxOmni*);
MxBool IsEnabled();
inline MxS32 GetCurrentTickleState() const { return this->m_currentTickleState; }
@ -130,7 +131,6 @@ class MxPresenter : public MxCore {
protected:
__declspec(dllexport) void Init();
void SendToCompositePresenter(MxOmni*);
TickleState m_currentTickleState; // 0x8
MxU32 m_previousTickleStates; // 0x0c