From b092eafc1be538c4f7b1dc9fb16374055d2e3cf6 Mon Sep 17 00:00:00 2001 From: jonschz Date: Sat, 25 Jan 2025 11:45:28 +0100 Subject: [PATCH] Improve match --- LEGO1/lego/legoomni/include/legomain.h | 2 ++ LEGO1/lego/legoomni/src/common/misc.cpp | 3 +++ LEGO1/lego/legoomni/src/worlds/historybook.cpp | 2 ++ LEGO1/lego/legoomni/src/worlds/registrationbook.cpp | 8 ++++++-- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legomain.h b/LEGO1/lego/legoomni/include/legomain.h index 1ab6c2ee..263d59d5 100644 --- a/LEGO1/lego/legoomni/include/legomain.h +++ b/LEGO1/lego/legoomni/include/legomain.h @@ -168,7 +168,9 @@ class LegoOmni : public MxOmni { // FUNCTION: BETA10 0x100e52b0 LegoGameState* GetGameState() { return m_gameState; } + // FUNCTION: BETA10 0x100e5280 MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; } + MxTransitionManager* GetTransitionManager() { return m_transitionManager; } MxDSAction& GetCurrentAction() { return m_action; } LegoCharacterManager* GetCharacterManager() { return m_characterManager; } diff --git a/LEGO1/lego/legoomni/src/common/misc.cpp b/LEGO1/lego/legoomni/src/common/misc.cpp index 28f6c039..08072b7c 100644 --- a/LEGO1/lego/legoomni/src/common/misc.cpp +++ b/LEGO1/lego/legoomni/src/common/misc.cpp @@ -212,8 +212,11 @@ MxTransitionManager* TransitionManager() } // FUNCTION: LEGO1 0x10015910 +// FUNCTION: BETA10 0x100e4f4c void PlayMusic(JukeboxScript::Script p_objectId) { + assert(LegoOmni::GetInstance()); + MxDSAction action; action.SetAtomId(*g_jukeboxScript); action.SetObjectId(p_objectId); diff --git a/LEGO1/lego/legoomni/src/worlds/historybook.cpp b/LEGO1/lego/legoomni/src/worlds/historybook.cpp index b3df73d5..f31f1258 100644 --- a/LEGO1/lego/legoomni/src/worlds/historybook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/historybook.cpp @@ -103,6 +103,8 @@ void HistoryBook::ReadyWorld() MxS16 i; for (i = 0; i < 26; i++) { + // TODO: This might be an inline function. + // See also `RegistrationBook::ReadyWorld()`. if (i < 26) { m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", bitmap); assert(m_alphabet[i]); diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index 7a4a43c2..7787ccd5 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -388,6 +388,7 @@ void RegistrationBook::FUN_100778c0() } // FUNCTION: LEGO1 0x10077cc0 +// FUNCTION: BETA10 0x100f3671 void RegistrationBook::ReadyWorld() { LegoGameState* gameState = GameState(); @@ -399,9 +400,11 @@ void RegistrationBook::ReadyWorld() MxS16 i; for (i = 0; i < 26; i++) { + // TODO: This might be an inline function. + // See also `HistoryBook::ReadyWorld()`. if (i < 26) { m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", letterBuffer); - + assert(m_alphabet[i]); // We need to loop through the entire alphabet, // so increment the first char of the bitmap name letterBuffer[0]++; @@ -412,7 +415,7 @@ void RegistrationBook::ReadyWorld() char checkmarkBuffer[] = "Check0_Ctl"; for (i = 0; i < 10; i++) { m_checkmark[i] = (MxControlPresenter*) Find("MxControlPresenter", checkmarkBuffer); - + assert(m_checkmark[i]); // Just like in the prior letter loop, // we need to increment the fifth char // to get the next checkmark bitmap @@ -431,6 +434,7 @@ void RegistrationBook::ReadyWorld() // Start building the player names using a two-dimensional array m_name[i][j] = m_alphabet[players[i - 1].m_letters[j]]->Clone(); + assert(m_name[i][j]); // Enable the presenter to actually show the letter in the grid m_name[i][j]->Enable(TRUE);