From 52e6c9ac22af58eda2a107d780f6bf1e85217487 Mon Sep 17 00:00:00 2001 From: Ramen2X <64166386+Ramen2X@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:12:28 -0400 Subject: [PATCH] implement/match global ControlManager() function (#219) * implement/match global ControlManager() function * remove unnecessary forward declaration --- LEGO1/legoinputmanager.h | 2 ++ LEGO1/legoomni.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/LEGO1/legoinputmanager.h b/LEGO1/legoinputmanager.h index a44aef32..d2fe26de 100644 --- a/LEGO1/legoinputmanager.h +++ b/LEGO1/legoinputmanager.h @@ -41,6 +41,8 @@ public: void SetTimer(); void KillTimer(); + inline LegoControlManager *GetControlManager() { return m_controlManager; } + //private: MxCriticalSection m_criticalSection; MxList *m_unk0x5c; // list or hash table diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 7e306af1..d4ab47ea 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -5,6 +5,7 @@ #include "legogamestate.h" #include "legoutil.h" #include "legoobjectfactory.h" +#include "legoinputmanager.h" // 0x100f4588 MxAtomId *g_nocdSourceName = NULL; @@ -205,6 +206,12 @@ LegoInputManager *InputManager() return LegoOmni::GetInstance()->GetInputManager(); } +// OFFSET: LEGO1 0x10015750 +LegoControlManager *ControlManager() +{ + return LegoOmni::GetInstance()->GetInputManager()->GetControlManager(); +} + // OFFSET: LEGO1 0x10015760 LegoGameState *GameState() {