diff --git a/LEGO1/lego/legoomni/include/legoinputmanager.h b/LEGO1/lego/legoomni/include/legoinputmanager.h index 961d8ffc..1d1d8f7e 100644 --- a/LEGO1/lego/legoomni/include/legoinputmanager.h +++ b/LEGO1/lego/legoomni/include/legoinputmanager.h @@ -46,6 +46,7 @@ class LegoInputManager : public MxPresenter { MxResult GetJoystickState(MxU32* p_joystickX, MxU32* p_joystickY, DWORD* p_buttonsState, MxU32* p_povPosition); void SetTimer(); void KillTimer(); + void FUN_1005cff0(); void SetCamera(LegoCameraController* p_camera); void ClearCamera(); void SetWorld(LegoWorld* p_world); @@ -54,6 +55,12 @@ class LegoInputManager : public MxPresenter { inline void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; } inline void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; } + inline void AllowEventProcessing() + { + m_unk0x88 = 1; + m_unk0x336 = 0; + } + inline LegoControlManager* GetControlManager() { return m_controlManager; } inline LegoWorld* GetWorld() { return m_world; } inline LegoCameraController* GetCamera() { return m_camera; } diff --git a/LEGO1/lego/legoomni/include/legoomni.h b/LEGO1/lego/legoomni/include/legoomni.h index fc9ba1c2..cbdf0a41 100644 --- a/LEGO1/lego/legoomni/include/legoomni.h +++ b/LEGO1/lego/legoomni/include/legoomni.h @@ -99,6 +99,7 @@ class LegoOmni : public MxOmni { LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid); void AddWorld(LegoWorld* p_world); + void FUN_1005b4f0(MxBool p_unk1, MxU32 p_unk2); LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; } LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; } diff --git a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp index cdfd4bb3..ea8e8274 100644 --- a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp +++ b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp @@ -7,6 +7,12 @@ DECOMP_SIZE_ASSERT(LegoInputManager, 0x338); DECOMP_SIZE_ASSERT(LegoEventQueue, 0x18); +// GLOBAL: LEGO1 0x100f31b0 +MxS32 g_unk0x100f31b0 = -1; + +// GLOBAL: LEGO1 0x100f31b4 +MxS32 g_unk0x100f31b4 = 0; + // FUNCTION: LEGO1 0x1005b790 LegoInputManager::LegoInputManager() { @@ -271,3 +277,11 @@ void LegoInputManager::KillTimer() ::KillTimer(omni->GetWindowHandle(), m_timer); } } + +// FUNCTION: LEGO1 0x1005cff0 +void LegoInputManager::FUN_1005cff0() +{ + m_unk0x88 = FALSE; + g_unk0x100f31b0 = -1; + g_unk0x100f31b4 = 0; +} diff --git a/LEGO1/lego/legoomni/src/main/legoomni.cpp b/LEGO1/lego/legoomni/src/main/legoomni.cpp index 9f27a980..c4f64c91 100644 --- a/LEGO1/lego/legoomni/src/main/legoomni.cpp +++ b/LEGO1/lego/legoomni/src/main/legoomni.cpp @@ -636,6 +636,27 @@ MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value) return GetCurrentWorld()->GetCurrPathInfo(p_path, p_value); } +// FUNCTION: LEGO1 0x1005b4f0 +void LegoOmni::FUN_1005b4f0(MxBool p_unk1, MxU32 p_unk2) +{ + if (p_unk1) { + if (p_unk2 & 1) { + m_inputMgr->AllowEventProcessing(); + } + + if (p_unk2 & 2) { + ((LegoVideoManager*)m_videoManager)->SetUnkE4(FALSE); + } + + if (p_unk2 & 4) { + m_videoManager->GetDisplaySurface()->FUN_100ba640(); + } + } + else { + m_inputMgr->FUN_1005cff0(); + } +} + // FUNCTION: LEGO1 0x1005b560 void LegoOmni::CreateBackgroundAudio() {