diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 0e9f3535..d1841669 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -67,6 +67,12 @@ class LegoWorld : public LegoEntity { MxBool PresentersPending(); void Remove(MxCore* p_object); undefined4 FUN_1001fa70(IslePathActor* p_actor); + undefined4 FUN_1001fb70( + IslePathActor* p_actor, + LegoAnimPresenter* p_presenter, + Vector3& p_position, + Vector3& p_direction + ); void FUN_1001fc80(IslePathActor* p_actor); void FUN_1001fda0(LegoAnimPresenter* p_presenter); void AddPath(LegoPathController* p_controller); diff --git a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp index 8152b3b5..0e027bef 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp @@ -2,6 +2,7 @@ #include "decomp.h" #include "define.h" +#include "islepathactor.h" #include "legoanimationmanager.h" #include "legotraninfo.h" #include "legovideomanager.h" @@ -405,12 +406,49 @@ MxBool LegoAnimMMPresenter::FUN_1004b6b0(MxLong p_time) return TRUE; } -// STUB: LEGO1 0x1004b6d0 +// FUNCTION: LEGO1 0x1004b6d0 // FUNCTION: BETA10 0x1004ce18 MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time) { - // TODO - return FALSE; + LegoROI* viewROI = VideoManager()->GetViewROI(); + IslePathActor* actor = CurrentActor(); + + if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_unk0x12 != -1 && actor != NULL) { + if (m_unk0x64 != NULL) { + undefined4 und = 1; + + if (m_presenter != NULL) { + m_unk0x64->FUN_1001fc80(actor); + + if (m_tranInfo->m_unk0x29) { + Mx3DPointFloat position, direction; + + position = viewROI->GetWorldPosition(); + direction = viewROI->GetWorldDirection(); + position[1] -= 1.25; + + und = m_unk0x64->FUN_1001fb70(actor, m_presenter, position, direction); + } + else { + und = 0; + } + } + + if (und != 0) { + viewROI->WrappedSetLocalTransform(m_tranInfo->m_unk0x2c); + VideoManager()->Get3DManager()->Moved(*viewROI); + m_unk0x64->FUN_1001fa70(actor); + } + + if (m_tranInfo->m_unk0x29) { + actor->VTable0xa8(); + } + } + + actor->SetState(0); + } + + return TRUE; } // FUNCTION: LEGO1 0x1004b8b0 diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 000ec719..cc2ea8b3 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -274,6 +274,18 @@ undefined4 LegoWorld::FUN_1001fa70(IslePathActor* p_actor) return 0; } +// STUB: LEGO1 0x1001fb70 +undefined4 LegoWorld::FUN_1001fb70( + IslePathActor* p_actor, + LegoAnimPresenter* p_presenter, + Vector3& p_position, + Vector3& p_direction +) +{ + // TODO + return 0; +} + // FUNCTION: LEGO1 0x1001fc80 void LegoWorld::FUN_1001fc80(IslePathActor* p_actor) {