From 4502737fe2fcd1a422e89e5859e943570eda4093 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 13 Apr 2024 10:02:55 -0400 Subject: [PATCH] Implement/match LegoAnimPresenter::FUN_100699e0 (#793) --- .../lego/legoomni/include/legoanimpresenter.h | 2 +- LEGO1/lego/legoomni/include/legoroilist.h | 31 +++++++++++++++++++ .../legoomni/src/video/legoanimpresenter.cpp | 19 ++++++++++-- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoanimpresenter.h b/LEGO1/lego/legoomni/include/legoanimpresenter.h index 8d9d04a4..8c6f5290 100644 --- a/LEGO1/lego/legoomni/include/legoanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legoanimpresenter.h @@ -85,7 +85,7 @@ class LegoAnimPresenter : public MxVideoPresenter { void FUN_100695c0(); LegoChar* FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2); LegoBool FUN_100698b0(const CompoundObject& p_rois, const LegoChar* p_und2); - LegoROI* FUN_100699e0(const LegoChar*); + LegoROI* FUN_100699e0(const LegoChar* p_und); void FUN_10069b10(); void FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi); void FUN_1006a4f0(LegoAnimPresenterMap& p_map, LegoAnimNodeData* p_data, const LegoChar* p_und, LegoROI* p_roi); diff --git a/LEGO1/lego/legoomni/include/legoroilist.h b/LEGO1/lego/legoomni/include/legoroilist.h index 3e1239bb..ee95215a 100644 --- a/LEGO1/lego/legoomni/include/legoroilist.h +++ b/LEGO1/lego/legoomni/include/legoroilist.h @@ -27,6 +27,19 @@ class LegoROIList : public MxPtrList { // LegoROIList::`scalar deleting destructor' }; +// VTABLE: LEGO1 0x100d8d68 +// class MxListCursor + +// VTABLE: LEGO1 0x100d8d38 +// class MxPtrListCursor + +// VTABLE: LEGO1 0x100d8d50 +// SIZE 0x10 +class LegoROIListCursor : public MxPtrListCursor { +public: + LegoROIListCursor(LegoROIList* p_list) : MxPtrListCursor(p_list) {} +}; + // TEMPLATE: LEGO1 0x1005f380 // MxCollection::Compare @@ -51,6 +64,24 @@ class LegoROIList : public MxPtrList { // SYNTHETIC: LEGO1 0x1005f660 // MxPtrList::`scalar deleting destructor' +// SYNTHETIC: LEGO1 0x10063540 +// LegoROIListCursor::`scalar deleting destructor' + +// FUNCTION: LEGO1 0x100635b0 +// MxPtrListCursor::~MxPtrListCursor + +// SYNTHETIC: LEGO1 0x10063600 +// MxListCursor::`scalar deleting destructor' + +// SYNTHETIC: LEGO1 0x10063670 +// MxPtrListCursor::`scalar deleting destructor' + +// FUNCTION: LEGO1 0x100636e0 +// MxListCursor::~MxListCursor + +// FUNCTION: LEGO1 0x10063730 +// LegoROIListCursor::~LegoROIListCursor + // TEMPLATE: LEGO1 0x1006ea00 // MxListEntry::MxListEntry diff --git a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp index 17a6f5cc..64f550b2 100644 --- a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp @@ -306,10 +306,23 @@ LegoBool LegoAnimPresenter::FUN_100698b0(const CompoundObject& p_rois, const Leg return result; } -// STUB: LEGO1 0x100699e0 -LegoROI* LegoAnimPresenter::FUN_100699e0(const LegoChar*) +// FUNCTION: LEGO1 0x100699e0 +LegoROI* LegoAnimPresenter::FUN_100699e0(const LegoChar* p_und) { - // TODO + LegoROIListCursor cursor(m_unk0x70); + LegoROI* roi; + + while (cursor.Next(roi)) { + LegoChar* und = FUN_100697c0(roi->GetName(), NULL); + + if (und != NULL && !strcmpi(und, p_und)) { + delete[] und; + return roi; + } + + delete[] und; + } + return NULL; }