implement LegoAnimPresenter::VTable0x8c (#798)

This commit is contained in:
Misha 2024-04-13 17:42:05 -04:00 committed by GitHub
parent 54421ebcdf
commit c282b3019d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 4 deletions

View file

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

View file

@ -287,6 +287,12 @@ void LegoWorld::FUN_1001fc80(IslePathActor* p_actor)
} }
} }
// STUB: LEGO1 0x1001fda0
void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
{
// TODO
}
// FUNCTION: LEGO1 0x1001ff80 // FUNCTION: LEGO1 0x1001ff80
void LegoWorld::AddPath(LegoPathController* p_controller) void LegoWorld::AddPath(LegoPathController* p_controller)
{ {

View file

@ -746,14 +746,37 @@ MxResult LegoAnimPresenter::StartAction(MxStreamController* p_controller, MxDSAc
// STUB: LEGO1 0x1006c640 // STUB: LEGO1 0x1006c640
void LegoAnimPresenter::EndAction() void LegoAnimPresenter::EndAction()
{ {
if (m_action) {
// TODO // TODO
if (m_currentWorld) {
m_currentWorld->Remove(this);
}
FUN_1006c8a0(FALSE);
MxVideoPresenter::EndAction(); MxVideoPresenter::EndAction();
} }
}
// STUB: LEGO1 0x1006c7d0 // FUNCTION: LEGO1 0x1006c7d0
void LegoAnimPresenter::VTable0x8c() void LegoAnimPresenter::VTable0x8c()
{ {
// TODO if (m_unk0x78) {
m_unk0xa8.Add((*m_unk0x78)[3]);
}
else {
m_unk0xa8.Add(&m_action->GetLocation());
}
if (m_currentWorld == NULL) {
m_currentWorld = m_unk0x88 != -1 ? FindWorld(m_animAtom, m_unk0x88) : CurrentWorld();
}
if (m_currentWorld) {
m_currentWorld->FUN_1001fda0(this);
if (!m_compositePresenter || !m_compositePresenter->IsA("LegoAnimMMPresenter")) {
m_currentWorld->Add(this);
}
}
} }
// STUB: LEGO1 0x1006c860 // STUB: LEGO1 0x1006c860