implement LegoOmni::FUN_1005b4f0 (#450)

* push changes

* push changes

* fixes

* Changes

* Use proper values

* Name vtable function

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2024-01-17 15:48:48 -05:00
committed by GitHub
parent cf7466f901
commit c0af1dbac4
15 changed files with 72 additions and 21 deletions

View File

@@ -99,7 +99,7 @@ MxU32 Helicopter::VTable0xcc()
AnimationManager()->FUN_10064670(FALSE);
VTable0xe8(0x29, TRUE, 7);
((Isle*) GetCurrentWorld())->SetUnknown13c(0x3c);
FUN_10015820(1, 0);
FUN_10015820(TRUE, 0);
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, TRUE);
SetUnknownDC(4);
PlayMusic(9);

View File

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

View File

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

View File

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

View File

@@ -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::EnableInputProcessing()
{
m_unk0x88 = FALSE;
g_unk0x100f31b0 = -1;
g_unk0x100f31b4 = 0;
}

View File

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

View File

@@ -206,10 +206,10 @@ GifManager* GetGifManager()
return LegoOmni::GetInstance()->GetGifManager();
}
// STUB: LEGO1 0x10015820
void FUN_10015820(MxU32, MxU32)
// FUNCTION: LEGO1 0x10015820
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
{
// TODO
LegoOmni::GetInstance()->FUN_1005b4f0(p_disable, p_flags);
}
// STUB: LEGO1 0x10015860
@@ -680,6 +680,29 @@ 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_disable, MxU16 p_flags)
{
if (p_disable) {
if (p_flags & c_disableInput) {
m_inputMgr->DisableInputProcessing();
}
if (p_flags & c_disable3d) {
((LegoVideoManager*) m_videoManager)->SetRender3D(FALSE);
}
if (p_flags & c_clearScreen) {
m_videoManager->GetDisplaySurface()->ClearScreen();
}
}
else {
m_inputMgr->EnableInputProcessing();
((LegoVideoManager*) m_videoManager)->SetRender3D(TRUE);
((LegoVideoManager*) m_videoManager)->UpdateView(0, 0, 0, 0);
}
}
// FUNCTION: LEGO1 0x1005b560
void LegoOmni::CreateBackgroundAudio()
{

View File

@@ -423,7 +423,7 @@ void LegoVideoManager::OverrideSkyColor(MxBool p_shouldOverride)
}
// FUNCTION: LEGO1 0x1007c4d0
void LegoVideoManager::VTable0x34(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
void LegoVideoManager::UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
{
if (p_width == 0) {
p_width = m_videoParam.GetRect().GetWidth();