From b6fc8e27b17e3d4891d3ce547f9faf987572f985 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 12 May 2024 15:10:26 -0400 Subject: [PATCH] Implement/match LegoPathController::Tickle (#913) --- LEGO1/lego/legoomni/include/legopathactor.h | 4 ++++ .../legoomni/include/legopathcontroller.h | 4 ++++ .../legoomni/src/paths/legopathcontroller.cpp | 24 +++++++++++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legopathactor.h b/LEGO1/lego/legoomni/include/legopathactor.h index 2051a1b8..43b6c480 100644 --- a/LEGO1/lego/legoomni/include/legopathactor.h +++ b/LEGO1/lego/legoomni/include/legopathactor.h @@ -15,6 +15,10 @@ struct LegoUnknown100db7f4; // SIZE 0x154 class LegoPathActor : public LegoActor { public: + enum { + c_bit3 = 0x04 + }; + LegoPathActor(); ~LegoPathActor() override; diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index a5957f26..74957fb7 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -99,6 +99,7 @@ class LegoPathController : public MxCore { static MxResult Init(); private: + void FUN_10046970(); MxResult Read(LegoStorage* p_storage); MxResult ReadStructs(LegoStorage* p_storage); MxResult ReadEdges(LegoStorage* p_storage); @@ -119,6 +120,9 @@ class LegoPathController : public MxCore { }; // clang-format off +// TEMPLATE: LEGO1 0x1002c4a0 +// _Tree >::_Kfn,LegoPathActorSetCompare,allocator >::_Buynode + // TEMPLATE: LEGO1 0x100451a0 // _Tree >::_Kfn,LegoPathCtrlEdgeCompare,allocator >::~_TreeGetTime(); + + LegoPathActorSet lpas(m_actors); + + for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) { + LegoPathActor* actor = *itpa; + + if (m_actors.find(actor) != m_actors.end()) { + if (!((MxU8) actor->GetState() & LegoPathActor::c_bit3)) { + actor->VTable0x70(time); + } + } + } +} + // STUB: LEGO1 0x10046b30 MxResult LegoPathController::FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value) {