From 95ed90aacbbcfd4c04d77f8b7d50872b7cfed3e7 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 14 May 2024 10:15:35 -0400 Subject: [PATCH] Implement/match some LegoHideAnimPresenter functions (#920) --- .../legoomni/include/legohideanimpresenter.h | 2 + .../src/video/legohideanimpresenter.cpp | 61 +++++++++++++++---- 2 files changed, 51 insertions(+), 12 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legohideanimpresenter.h b/LEGO1/lego/legoomni/include/legohideanimpresenter.h index 6c4a9791..7dfab184 100644 --- a/LEGO1/lego/legoomni/include/legohideanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legohideanimpresenter.h @@ -36,6 +36,8 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter { private: void Init(); void Destroy(MxBool p_fromDestructor); + void FUN_1006db40(undefined4); + void FUN_1006dc10(); undefined4* m_unk0xc0; // 0xc0 }; diff --git a/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp index 19b2e3a4..b5d06b82 100644 --- a/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp @@ -1,5 +1,9 @@ #include "legohideanimpresenter.h" +#include "legomain.h" +#include "legoworld.h" +#include "misc.h" + DECOMP_SIZE_ASSERT(LegoHideAnimPresenter, 0xc4) // FUNCTION: LEGO1 0x1006d7e0 @@ -8,16 +12,14 @@ LegoHideAnimPresenter::LegoHideAnimPresenter() Init(); } -// STUB: LEGO1 0x1006d860 +// FUNCTION: LEGO1 0x1006d860 void LegoHideAnimPresenter::VTable0x8c() { - // TODO } -// STUB: LEGO1 0x1006d870 +// FUNCTION: LEGO1 0x1006d870 void LegoHideAnimPresenter::VTable0x90() { - // TODO } // FUNCTION: LEGO1 0x1006d9f0 @@ -62,26 +64,61 @@ void LegoHideAnimPresenter::Destroy() Destroy(FALSE); } -// STUB: LEGO1 0x1006dad0 +// FUNCTION: LEGO1 0x1006dad0 void LegoHideAnimPresenter::PutFrame() { - // TODO } -// STUB: LEGO1 0x1006dae0 +// FUNCTION: LEGO1 0x1006dae0 +// FUNCTION: BETA10 0x100530f4 void LegoHideAnimPresenter::ReadyTickle() { - // TODO + LegoLoopingAnimPresenter::ReadyTickle(); + + if (m_currentWorld) { + if (m_currentTickleState == e_starting && m_compositePresenter != NULL) { + SendToCompositePresenter(Lego()); + } + + m_currentWorld->Add(this); + } } -// STUB: LEGO1 0x1006db20 +// FUNCTION: LEGO1 0x1006db20 +// FUNCTION: BETA10 0x1005316b void LegoHideAnimPresenter::StartingTickle() { - // TODO + LegoLoopingAnimPresenter::StartingTickle(); + + if (m_currentTickleState == e_streaming) { + FUN_1006dc10(); + FUN_1006db40(0); + } } -// STUB: LEGO1 0x1006e9e0 -void LegoHideAnimPresenter::EndAction() +// STUB: LEGO1 0x1006db40 +// FUNCTION: BETA10 0x100531ab +void LegoHideAnimPresenter::FUN_1006db40(undefined4) { // TODO } + +// STUB: LEGO1 0x1006dc10 +// FUNCTION: BETA10 0x100532fd +void LegoHideAnimPresenter::FUN_1006dc10() +{ + // TODO +} + +// FUNCTION: LEGO1 0x1006e9e0 +// FUNCTION: BETA10 0x100535ef +void LegoHideAnimPresenter::EndAction() +{ + if (m_action) { + MxVideoPresenter::EndAction(); + + if (m_currentWorld) { + m_currentWorld->Remove(this); + } + } +}