Legoworld vtables

This commit is contained in:
Misha 2023-12-26 18:57:26 -05:00
parent 22d72893f9
commit d11bd68d46
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
6 changed files with 62 additions and 1 deletions

View File

@ -82,6 +82,15 @@ void LegoEntityPresenter::RepeatingTickle()
}
}
// FUNCTION: LEGO1 0x10053730
void LegoEntityPresenter::SetBackendLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up)
{
if (m_objectBackend)
{
m_objectBackend->SetLocation(p_location, p_direction, p_up, TRUE);
}
}
// FUNCTION: LEGO1 0x10053750
void LegoEntityPresenter::ParseExtra()
{

View File

@ -32,10 +32,11 @@ class LegoEntityPresenter : public MxCompositePresenter {
virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
virtual void Init(); // vtable+0x68
virtual undefined4 SetBackend(LegoEntity* p_unk0x4c); // vtable+0x6c
void SetBackendLocation(Vector3Data& p_location, Vector3Data& p_direction, Vector3Data& p_up);
private:
void Destroy(MxBool p_fromDestructor);
protected:
LegoEntity* m_objectBackend; // 0x4c
};

View File

@ -568,6 +568,12 @@ LegoOmni* LegoOmni::GetInstance()
return (LegoOmni*) MxOmni::GetInstance();
}
// FUNCTION: LEGO1 0x1005ad20
void LegoOmni::AddWorld(LegoWorld* world)
{
m_worldList->Append(world);
}
// STUB: LEGO1 0x1005af10
void LegoOmni::RemoveWorld(const MxAtomId&, MxLong)
{

View File

@ -98,6 +98,7 @@ class LegoOmni : public MxOmni {
virtual void StopTimer() override; // vtable+3c
LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid);
void AddWorld(LegoWorld* world);
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }

View File

@ -1,5 +1,8 @@
#include "legoworldpresenter.h"
#include "legoentity.h"
#include "legoomni.h"
// GLOBAL: LEGO1 0x100f75d4
undefined4 g_legoWorldPresenterQuality = 1;
@ -20,3 +23,38 @@ LegoWorldPresenter::~LegoWorldPresenter()
{
// TODO
}
// STUB: LEGO1 0x10066870
MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action)
{
return FAILURE;
}
// FUNCTION: LEGO1 0x10066a50
void LegoWorldPresenter::ReadyTickle()
{
m_objectBackend = (LegoEntity*) MxPresenter::CreateEntityBackend("LegoWorld");
if (m_objectBackend) {
m_objectBackend->Create(*m_action);
Lego()->AddWorld((LegoWorld*) m_objectBackend);
SetBackendLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
}
ParseExtra();
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
m_currentTickleState = TickleState_Starting;
}
// STUB: LEGO1 0x10067a70
void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter)
{
}
// STUB: LEGO1 0x10066ac0
void LegoWorldPresenter::StartingTickle()
{
}
// FUNCTION: LEGO1 0x10067b00
void LegoWorldPresenter::ParseExtra()
{
}

View File

@ -25,6 +25,12 @@ class LegoWorldPresenter : public LegoEntityPresenter {
return !strcmp(p_name, LegoWorldPresenter::ClassName()) || LegoEntityPresenter::IsA(p_name);
}
virtual void ReadyTickle() override; // vtable+0x18
virtual void StartingTickle() override; // vtable+0x1c
virtual void ParseExtra() override; // vtable+0x30
virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
virtual void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60
private:
undefined4 m_unk0x50;
};