This commit is contained in:
Christian Semmler 2024-01-17 15:26:08 -05:00
parent d925e1ac28
commit 9aa29249f6
8 changed files with 32 additions and 24 deletions

View File

@ -46,7 +46,7 @@ class LegoInputManager : public MxPresenter {
MxResult GetJoystickState(MxU32* p_joystickX, MxU32* p_joystickY, DWORD* p_buttonsState, MxU32* p_povPosition); MxResult GetJoystickState(MxU32* p_joystickX, MxU32* p_joystickY, DWORD* p_buttonsState, MxU32* p_povPosition);
void SetTimer(); void SetTimer();
void KillTimer(); void KillTimer();
void FUN_1005cff0(); void EnableInputProcessing();
void SetCamera(LegoCameraController* p_camera); void SetCamera(LegoCameraController* p_camera);
void ClearCamera(); void ClearCamera();
void SetWorld(LegoWorld* p_world); void SetWorld(LegoWorld* p_world);
@ -58,10 +58,10 @@ class LegoInputManager : public MxPresenter {
inline void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; } inline void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; }
inline void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; } inline void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; }
inline void AllowEventProcessing() inline void DisableInputProcessing()
{ {
m_unk0x88 = 1; m_unk0x88 = TRUE;
m_unk0x336 = 0; m_unk0x336 = FALSE;
} }
inline LegoControlManager* GetControlManager() { return m_controlManager; } inline LegoControlManager* GetControlManager() { return m_controlManager; }

View File

@ -62,6 +62,12 @@ extern MxAtomId* g_nocdSourceName;
// SIZE 0x140 // SIZE 0x140
class LegoOmni : public MxOmni { class LegoOmni : public MxOmni {
public: public:
enum {
c_disableInput = 0x01,
c_disable3d = 0x02,
c_clearScreen = 0x04
};
__declspec(dllexport) void CreateBackgroundAudio(); __declspec(dllexport) void CreateBackgroundAudio();
__declspec(dllexport) void RemoveWorld(const MxAtomId&, MxLong); __declspec(dllexport) void RemoveWorld(const MxAtomId&, MxLong);
__declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary**, MxS32&); __declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary**, MxS32&);
@ -99,7 +105,7 @@ class LegoOmni : public MxOmni {
LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid); LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid);
void AddWorld(LegoWorld* p_world); void AddWorld(LegoWorld* p_world);
void FUN_1005b4f0(MxBool p_is3d, MxU32 p_flags); void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags);
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; } LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; } LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
@ -163,7 +169,7 @@ LegoPlantManager* PlantManager();
LegoWorld* GetCurrentWorld(); LegoWorld* GetCurrentWorld();
LegoUnkSaveDataWriter* GetUnkSaveDataWriter(); LegoUnkSaveDataWriter* GetUnkSaveDataWriter();
GifManager* GetGifManager(); GifManager* GetGifManager();
void FUN_10015820(MxBool p_is3d, MxU32 p_flags); void FUN_10015820(MxBool p_disable, MxU16 p_flags);
void FUN_10015860(const char*, MxU8); void FUN_10015860(const char*, MxU8);
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid); LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid);
MxDSAction& GetCurrentAction(); MxDSAction& GetCurrentAction();

View File

@ -45,7 +45,7 @@ LegoWorldPresenter::~LegoWorldPresenter()
} }
if (result == FALSE) { if (result == FALSE) {
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
} }
if (m_entity) { if (m_entity) {

View File

@ -304,7 +304,7 @@ void Infocenter::VTable0x50()
PlayDialogue(c_letsGetStartedDialogue); PlayDialogue(c_letsGetStartedDialogue);
PlayMusic(11); PlayMusic(11);
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
return; return;
default: default:
PlayMusic(11); PlayMusic(11);
@ -313,7 +313,7 @@ void Infocenter::VTable0x50()
case 8: case 8:
PlayMusic(11); PlayMusic(11);
PlayDialogue(c_exitConfirmationDialogue); PlayDialogue(c_exitConfirmationDialogue);
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
return; return;
case 0xf: case 0xf:
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) { if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
@ -322,7 +322,7 @@ void Infocenter::VTable0x50()
PlayDialogue(c_clickOnInfomanDialogue); PlayDialogue(c_clickOnInfomanDialogue);
PlayMusic(11); PlayMusic(11);
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
return; return;
} }
break; break;
@ -334,7 +334,7 @@ void Infocenter::VTable0x50()
break; break;
default: default:
m_infocenterState->SetUnknown0x74(11); m_infocenterState->SetUnknown0x74(11);
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
return; return;
} }
} }
@ -469,7 +469,7 @@ void Infocenter::StopCutscene()
VideoManager()->EnableFullScreenMovie(FALSE); VideoManager()->EnableFullScreenMovie(FALSE);
InputManager()->SetUnknown335(FALSE); InputManager()->SetUnknown335(FALSE);
SetAppCursor(0); // Restore cursor to arrow SetAppCursor(0); // Restore cursor to arrow
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
} }
// FUNCTION: LEGO1 0x10070d00 // FUNCTION: LEGO1 0x10070d00

View File

@ -147,7 +147,7 @@ void Score::VTable0x50()
else else
PlayMusic(11); PlayMusic(11);
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
} }
// FUNCTION: LEGO1 0x100016d0 // FUNCTION: LEGO1 0x100016d0

View File

@ -279,7 +279,7 @@ void LegoInputManager::KillTimer()
} }
// FUNCTION: LEGO1 0x1005cff0 // FUNCTION: LEGO1 0x1005cff0
void LegoInputManager::FUN_1005cff0() void LegoInputManager::EnableInputProcessing()
{ {
m_unk0x88 = FALSE; m_unk0x88 = FALSE;
g_unk0x100f31b0 = -1; g_unk0x100f31b0 = -1;

View File

@ -166,7 +166,7 @@ void Isle::VTable0x50()
FUN_1003ef00(TRUE); FUN_1003ef00(TRUE);
FUN_10032620(); FUN_10032620();
m_act1state->FUN_10034d00(); m_act1state->FUN_10034d00();
FUN_10015820(0, 7); FUN_10015820(0, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
} }
} }

View File

@ -207,9 +207,9 @@ GifManager* GetGifManager()
} }
// FUNCTION: LEGO1 0x10015820 // FUNCTION: LEGO1 0x10015820
void FUN_10015820(MxBool p_is3d, MxU32 p_flags) void FUN_10015820(MxBool p_disable, MxU16 p_flags)
{ {
LegoOmni::GetInstance()->FUN_1005b4f0(p_is3d, p_flags); LegoOmni::GetInstance()->FUN_1005b4f0(p_disable, p_flags);
} }
// STUB: LEGO1 0x10015860 // STUB: LEGO1 0x10015860
@ -681,23 +681,25 @@ MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
} }
// FUNCTION: LEGO1 0x1005b4f0 // FUNCTION: LEGO1 0x1005b4f0
void LegoOmni::FUN_1005b4f0(MxBool p_is3d, MxU32 p_flags) void LegoOmni::FUN_1005b4f0(MxBool p_disable, MxU16 p_flags)
{ {
if (p_is3d) { if (p_disable) {
if (p_flags & 1) { if (p_flags & c_disableInput) {
m_inputMgr->AllowEventProcessing(); m_inputMgr->DisableInputProcessing();
} }
if (p_flags & 2) { if (p_flags & c_disable3d) {
((LegoVideoManager*) m_videoManager)->SetRender3D(FALSE); ((LegoVideoManager*) m_videoManager)->SetRender3D(FALSE);
} }
if (p_flags & 4) { if (p_flags & c_clearScreen) {
m_videoManager->GetDisplaySurface()->ClearScreen(); m_videoManager->GetDisplaySurface()->ClearScreen();
} }
} }
else { else {
m_inputMgr->FUN_1005cff0(); m_inputMgr->EnableInputProcessing();
((LegoVideoManager*) m_videoManager)->SetRender3D(TRUE);
((LegoVideoManager*) m_videoManager)->VTable0x34(0, 0, 0, 0);
} }
} }