diff --git a/LEGO1/lego/legoomni/include/legoentity.h b/LEGO1/lego/legoomni/include/legoentity.h index 003d7e03..d0f64079 100644 --- a/LEGO1/lego/legoomni/include/legoentity.h +++ b/LEGO1/lego/legoomni/include/legoentity.h @@ -56,7 +56,7 @@ class LegoEntity : public MxEntity { virtual void VTable0x4c(); // vtable+0x4c void FUN_10010c30(); - void FUN_100114e0(MxU8 p_val); + void FUN_100114e0(MxU8 p_unk0x59); void SetLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up, MxBool); inline LegoROI* GetROI() { return m_roi; } diff --git a/LEGO1/lego/legoomni/include/legomodelpresenter.h b/LEGO1/lego/legoomni/include/legomodelpresenter.h index 8b79561f..f84c04e6 100644 --- a/LEGO1/lego/legoomni/include/legomodelpresenter.h +++ b/LEGO1/lego/legoomni/include/legomodelpresenter.h @@ -38,7 +38,7 @@ class LegoModelPresenter : public MxVideoPresenter { AutoROI* m_unk0x64; // 0x64 MxBool m_addedToView; // 0x68 - void LoadModel(MxStreamChunk* p_chunk); + undefined4 LoadModel(MxStreamChunk* p_chunk); }; #endif // LEGOMODELPRESENTER_H diff --git a/LEGO1/lego/legoomni/src/entity/legoentity.cpp b/LEGO1/lego/legoomni/src/entity/legoentity.cpp index c3943ec4..9ac45046 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentity.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentity.cpp @@ -164,9 +164,9 @@ void LegoEntity::VTable0x4c() } // FUNCTION: LEGO1 0x100114e0 -void LegoEntity::FUN_100114e0(MxU8 p_val) +void LegoEntity::FUN_100114e0(MxU8 p_unk0x59) { - m_unk0x59 = p_val; + m_unk0x59 = p_unk0x59; } // STUB: LEGO1 0x100114f0 diff --git a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp index 590304a5..d5fb18b9 100644 --- a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp @@ -28,15 +28,17 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor) m_unk0x64 = 0; m_addedToView = FALSE; m_criticalSection.Leave(); + if (!p_fromDestructor) { MxVideoPresenter::Destroy(FALSE); } } // STUB: LEGO1 0x1007f6b0 -void LegoModelPresenter::LoadModel(MxStreamChunk* p_chunk) +undefined4 LegoModelPresenter::LoadModel(MxStreamChunk* p_chunk) { // TODO + return 0; } // FUNCTION: LEGO1 0x10080050 @@ -68,14 +70,16 @@ void LegoModelPresenter::ReadyTickle() } else { MxStreamChunk* chunk = m_subscriber->CurrentChunk(); + if (chunk != NULL && chunk->GetTime() <= m_action->GetElapsedTime()) { chunk = m_subscriber->NextChunk(); - LoadModel(chunk); + undefined4 und = LoadModel(chunk); m_subscriber->DestroyChunk(chunk); - if (chunk == NULL) { + if (und == 0) { VideoManager()->Get3DManager()->GetLego3DView()->Add(*m_unk0x64); VideoManager()->Get3DManager()->GetLego3DView()->Moved(*m_unk0x64); + if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoEntityPresenter")) { ((LegoEntityPresenter*) m_compositePresenter) ->GetEntity() @@ -93,7 +97,6 @@ void LegoModelPresenter::ReadyTickle() EndAction(); } - return; } }