Implement/match various small LegoAnimPresenter functions

This commit is contained in:
Christian Semmler 2024-04-24 09:22:00 -04:00
parent f898462d17
commit 605d396eac
7 changed files with 55 additions and 11 deletions

View File

@ -10,6 +10,7 @@
class LegoWorld;
class LegoAnimClass;
class LegoAnimActor;
class LegoPathBoundary;
struct LegoAnimStructComparator {
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmp(p_a, p_b) < 0; }
@ -62,7 +63,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
virtual void VTable0x8c(); // vtable+0x8c
virtual void VTable0x90(); // vtable+0x90
virtual MxResult VTable0x94(Vector3&, Vector3&, float, float, Vector3&); // vtable+0x94
virtual void VTable0x98(); // vtable+0x98
virtual MxResult VTable0x98(LegoPathBoundary* p_boundary); // vtable+0x98
// FUNCTION: LEGO1 0x1000c990
virtual LegoROI** GetROIMap(MxU32& p_roiMapSize)
@ -71,7 +72,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
return m_roiMap;
} // vtable+0x9c
virtual void VTable0xa0(Matrix4*); // vtable+0xa0
virtual void VTable0xa0(Matrix4& p_matrix); // vtable+0xa0
MxResult FUN_1006afc0(MxMatrix*& p_matrix, float p_und);
MxResult FUN_1006b140(LegoROI* p_roi);

View File

@ -43,6 +43,7 @@ class LegoPathController : public MxCore {
undefined4 FUN_10046770(LegoPathActor* p_actor);
void FUN_100468f0(LegoAnimPresenter* p_presenter);
void FUN_10046930(LegoAnimPresenter* p_presenter);
MxResult FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value);
void Enable(MxBool p_enable);
void FUN_10046bb0(LegoWorld* p_world);

View File

@ -75,6 +75,7 @@ class LegoWorld : public LegoEntity {
);
void FUN_1001fc80(IslePathActor* p_actor);
void FUN_1001fda0(LegoAnimPresenter* p_presenter);
void FUN_1001fe90(LegoAnimPresenter* p_presenter);
void AddPath(LegoPathController* p_controller);
MxResult GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value);
MxCore* Find(const char* p_class, const char* p_name);

View File

@ -149,7 +149,7 @@ void LegoAnimMMPresenter::ReadyTickle()
}
if (m_tranInfo != NULL && m_tranInfo->m_unk0x0c != NULL) {
m_presenter->VTable0xa0(m_tranInfo->m_unk0x0c);
m_presenter->VTable0xa0(*m_tranInfo->m_unk0x0c);
}
if (m_presenter != NULL) {

View File

@ -311,6 +311,18 @@ void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
}
}
// FUNCTION: LEGO1 0x1001fe90
// FUNCTION: BETA10 0x100da6b5
void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter)
{
LegoPathControllerListCursor cursor(&m_list0x68);
LegoPathController* controller;
while (cursor.Next(controller)) {
controller->FUN_10046930(p_presenter);
}
}
// FUNCTION: LEGO1 0x1001ff80
void LegoWorld::AddPath(LegoPathController* p_controller)
{

View File

@ -39,6 +39,12 @@ void LegoPathController::FUN_100468f0(LegoAnimPresenter* p_presenter)
{
}
// STUB: LEGO1 0x10046930
// FUNCTION: BETA10 0x100b737b
void LegoPathController::FUN_10046930(LegoAnimPresenter* p_presenter)
{
}
// STUB: LEGO1 0x10046b30
MxResult LegoPathController::FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value)
{

View File

@ -805,10 +805,15 @@ void LegoAnimPresenter::ParseExtra()
// TODO
}
// STUB: LEGO1 0x1006c570
void LegoAnimPresenter::VTable0xa0(Matrix4*)
// FUNCTION: LEGO1 0x1006c570
// FUNCTION: BETA10 0x10051ab3
void LegoAnimPresenter::VTable0xa0(Matrix4& p_matrix)
{
// TODO
if (m_unk0x78 != NULL) {
delete m_unk0x78;
}
m_unk0x78 = new MxMatrix(p_matrix);
}
// FUNCTION: LEGO1 0x1006c620
@ -882,10 +887,19 @@ void LegoAnimPresenter::VTable0x8c()
}
}
// STUB: LEGO1 0x1006c860
// FUNCTION: LEGO1 0x1006c860
// FUNCTION: BETA10 0x10051f45
void LegoAnimPresenter::VTable0x90()
{
// TODO
if (m_currentWorld != NULL) {
m_currentWorld->FUN_1001fe90(this);
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoAnimMMPresenter")) {
return;
}
m_currentWorld->Remove(this);
}
}
// FUNCTION: LEGO1 0x1006c8a0
@ -914,10 +928,19 @@ MxResult LegoAnimPresenter::VTable0x94(Vector3&, Vector3&, float, float, Vector3
return SUCCESS;
}
// STUB: LEGO1 0x1006ca50
void LegoAnimPresenter::VTable0x98()
// FUNCTION: LEGO1 0x1006ca50
// FUNCTION: BETA10 0x100521d0
MxResult LegoAnimPresenter::VTable0x98(LegoPathBoundary* p_boundary)
{
// TODO
for (MxU32 i = 1; i <= m_roiMapSize; i++) {
LegoEntity* entity = m_roiMap[i]->GetEntity();
if (entity != NULL) {
p_boundary->AddActor((LegoPathActor*) entity);
}
}
return SUCCESS;
}
// STUB: LEGO1 0x1006d680