From 8b2e7a92e132e5d8bd0c1d462f64f991549f29c7 Mon Sep 17 00:00:00 2001 From: Joshua Peisach <itzswirlz2020@outlook.com> Date: Sun, 12 Nov 2023 14:21:22 -0500 Subject: [PATCH] LegoTexturePresenter destructor and AddToManager (#282) * LegoTexturePresenter destructor and AddToManager * clang-format --- LEGO1/legotexturepresenter.cpp | 14 ++++++++++++-- LEGO1/legotexturepresenter.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/LEGO1/legotexturepresenter.cpp b/LEGO1/legotexturepresenter.cpp index 56925d97..2e9dba68 100644 --- a/LEGO1/legotexturepresenter.cpp +++ b/LEGO1/legotexturepresenter.cpp @@ -1,7 +1,17 @@ #include "legotexturepresenter.h" -// OFFSET: LEGO1 0x1004eb40 STUB +#include "legoomni.h" +#include "legovideomanager.h" + +// OFFSET: LEGO1 0x1004eb40 LegoTexturePresenter::~LegoTexturePresenter() { - // TODO + VideoManager()->RemovePresenter(*this); +} + +// OFFSET: LEGO1 0x1004ebb0 +MxResult LegoTexturePresenter::AddToManager() +{ + VideoManager()->AddPresenter(*this); + return SUCCESS; } diff --git a/LEGO1/legotexturepresenter.h b/LEGO1/legotexturepresenter.h index 50d6f86c..e39e4758 100644 --- a/LEGO1/legotexturepresenter.h +++ b/LEGO1/legotexturepresenter.h @@ -21,6 +21,8 @@ public: { return !strcmp(name, LegoTexturePresenter::ClassName()) || MxMediaPresenter::IsA(name); } + + virtual MxResult AddToManager() override; // vtable+0x34 }; #endif // LEGOTEXTUREPRESENTER_H