diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 25dc3300..0e9f3535 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -68,6 +68,7 @@ class LegoWorld : public LegoEntity { void Remove(MxCore* p_object); undefined4 FUN_1001fa70(IslePathActor* p_actor); void FUN_1001fc80(IslePathActor* p_actor); + void FUN_1001fda0(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); diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 0024a8d0..000ec719 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -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 void LegoWorld::AddPath(LegoPathController* p_controller) { diff --git a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp index a784f7f8..937bd7bc 100644 --- a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp @@ -746,14 +746,37 @@ MxResult LegoAnimPresenter::StartAction(MxStreamController* p_controller, MxDSAc // STUB: LEGO1 0x1006c640 void LegoAnimPresenter::EndAction() { - // TODO - MxVideoPresenter::EndAction(); + if (m_action) { + // TODO + + if (m_currentWorld) { + m_currentWorld->Remove(this); + } + FUN_1006c8a0(FALSE); + MxVideoPresenter::EndAction(); + } } -// STUB: LEGO1 0x1006c7d0 +// FUNCTION: LEGO1 0x1006c7d0 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