From b6ada8f46cb7a9ed44e7e5e2e1daf8aa7899587c Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Thu, 3 Aug 2023 19:43:36 -0400 Subject: [PATCH] Small implementations in MxEntity/MxEventManager (#96) * Small implementations in MxEntity/MxEventManager * Cleanup * Update LEGO1/mxentity.cpp --------- Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com> --- LEGO1/mxentity.cpp | 8 ++++++++ LEGO1/mxentity.h | 2 ++ LEGO1/mxeventmanager.cpp | 13 +++++++++---- LEGO1/mxeventmanager.h | 2 ++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/LEGO1/mxentity.cpp b/LEGO1/mxentity.cpp index da536504..65adad67 100644 --- a/LEGO1/mxentity.cpp +++ b/LEGO1/mxentity.cpp @@ -12,3 +12,11 @@ MxEntity::MxEntity() MxEntity::~MxEntity() { } + +// OFFSET: LEGO1 0x10001070 +MxResult MxEntity::SetEntityId(MxS32 p_id, const MxAtomId &p_atom) +{ + this->m_mxEntityId = p_id; + this->m_atom = p_atom; + return SUCCESS; +} diff --git a/LEGO1/mxentity.h b/LEGO1/mxentity.h index dc959c35..25e74d1b 100644 --- a/LEGO1/mxentity.h +++ b/LEGO1/mxentity.h @@ -26,6 +26,8 @@ class MxEntity : public MxCore { return !strcmp(name, MxEntity::ClassName()) || MxCore::IsA(name); } + + virtual MxResult SetEntityId(MxS32 p_id, const MxAtomId &p_atom); // vtable+0x14 private: MxS32 m_mxEntityId; // 0x8 MxAtomId m_atom; // 0xc diff --git a/LEGO1/mxeventmanager.cpp b/LEGO1/mxeventmanager.cpp index 786420bc..5383c25a 100644 --- a/LEGO1/mxeventmanager.cpp +++ b/LEGO1/mxeventmanager.cpp @@ -1,13 +1,18 @@ #include "mxeventmanager.h" -// OFFSET: LEGO1 0x100c0360 STUB +// OFFSET: LEGO1 0x100c0360 MxEventManager::MxEventManager() { - // TODO + Init(); } -// OFFSET: LEGO1 0x100c03f0 STUB +// OFFSET: LEGO1 0x100c03f0 MxEventManager::~MxEventManager() { - // TODO + // TODO: MxMediaManager::TerminateThread call } + +// OFFSET: LEGO1 0x100c0450 +void MxEventManager::Init() +{ +} \ No newline at end of file diff --git a/LEGO1/mxeventmanager.h b/LEGO1/mxeventmanager.h index be5a796c..1fe7daeb 100644 --- a/LEGO1/mxeventmanager.h +++ b/LEGO1/mxeventmanager.h @@ -11,6 +11,8 @@ class MxEventManager : public MxUnknown100dc6b0 MxEventManager(); virtual ~MxEventManager() override; +private: + void Init(); }; #endif // MXEVENTMANAGER_H