mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
BETA10 match RegistrationBook::ReadyWorld()
(#1376)
--------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -40,7 +40,10 @@ public:
|
|||||||
MxS16 GetMaxNameLength() { return sizeOfArray(m_letters); }
|
MxS16 GetMaxNameLength() { return sizeOfArray(m_letters); }
|
||||||
MxStillPresenter* GetNameLetter(MxS32 p_index) { return m_letters[p_index]; }
|
MxStillPresenter* GetNameLetter(MxS32 p_index) { return m_letters[p_index]; }
|
||||||
void SetNameLetter(MxS32 p_index, MxStillPresenter* p_letter) { m_letters[p_index] = p_letter; }
|
void SetNameLetter(MxS32 p_index, MxStillPresenter* p_letter) { m_letters[p_index] = p_letter; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10031bd0
|
||||||
MxBool HasRegistered() { return m_letters[0] != NULL; }
|
MxBool HasRegistered() { return m_letters[0] != NULL; }
|
||||||
|
|
||||||
Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; }
|
Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; }
|
||||||
Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; }
|
Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; }
|
||||||
Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; }
|
Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; }
|
||||||
|
@@ -168,7 +168,9 @@ public:
|
|||||||
// FUNCTION: BETA10 0x100e52b0
|
// FUNCTION: BETA10 0x100e52b0
|
||||||
LegoGameState* GetGameState() { return m_gameState; }
|
LegoGameState* GetGameState() { return m_gameState; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100e5280
|
||||||
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
|
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
|
||||||
|
|
||||||
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
||||||
MxDSAction& GetCurrentAction() { return m_action; }
|
MxDSAction& GetCurrentAction() { return m_action; }
|
||||||
LegoCharacterManager* GetCharacterManager() { return m_characterManager; }
|
LegoCharacterManager* GetCharacterManager() { return m_characterManager; }
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
MxBool Escape() override; // vtable+0x64
|
MxBool Escape() override; // vtable+0x64
|
||||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||||
|
|
||||||
inline void PlayAction(MxU32 p_objectId);
|
inline static void PlayAction(MxU32 p_objectId);
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10076f30
|
// SYNTHETIC: LEGO1 0x10076f30
|
||||||
// RegistrationBook::`scalar deleting destructor'
|
// RegistrationBook::`scalar deleting destructor'
|
||||||
|
@@ -212,8 +212,11 @@ MxTransitionManager* TransitionManager()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10015910
|
// FUNCTION: LEGO1 0x10015910
|
||||||
|
// FUNCTION: BETA10 0x100e4f4c
|
||||||
void PlayMusic(JukeboxScript::Script p_objectId)
|
void PlayMusic(JukeboxScript::Script p_objectId)
|
||||||
{
|
{
|
||||||
|
assert(LegoOmni::GetInstance());
|
||||||
|
|
||||||
MxDSAction action;
|
MxDSAction action;
|
||||||
action.SetAtomId(*g_jukeboxScript);
|
action.SetAtomId(*g_jukeboxScript);
|
||||||
action.SetObjectId(p_objectId);
|
action.SetObjectId(p_objectId);
|
||||||
|
@@ -103,6 +103,8 @@ void HistoryBook::ReadyWorld()
|
|||||||
MxS16 i;
|
MxS16 i;
|
||||||
|
|
||||||
for (i = 0; i < 26; i++) {
|
for (i = 0; i < 26; i++) {
|
||||||
|
// TODO: This might be an inline function.
|
||||||
|
// See also `RegistrationBook::ReadyWorld()`.
|
||||||
if (i < 26) {
|
if (i < 26) {
|
||||||
m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", bitmap);
|
m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", bitmap);
|
||||||
assert(m_alphabet[i]);
|
assert(m_alphabet[i]);
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
DECOMP_SIZE_ASSERT(RegistrationBook, 0x2d0)
|
DECOMP_SIZE_ASSERT(RegistrationBook, 0x2d0)
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100d9924
|
// GLOBAL: LEGO1 0x100d9924
|
||||||
|
// GLOBAL: BETA10 0x101bfb3c
|
||||||
const char* g_infoman = "infoman";
|
const char* g_infoman = "infoman";
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f7964
|
// GLOBAL: LEGO1 0x100f7964
|
||||||
@@ -268,6 +269,7 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100775c0
|
// FUNCTION: LEGO1 0x100775c0
|
||||||
|
// STUB: BETA10 0x100f32b2
|
||||||
void RegistrationBook::FUN_100775c0(MxS16 p_playerIndex)
|
void RegistrationBook::FUN_100775c0(MxS16 p_playerIndex)
|
||||||
{
|
{
|
||||||
if (m_infocenterState->HasRegistered()) {
|
if (m_infocenterState->HasRegistered()) {
|
||||||
@@ -388,10 +390,17 @@ void RegistrationBook::FUN_100778c0()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10077cc0
|
// FUNCTION: LEGO1 0x10077cc0
|
||||||
|
// FUNCTION: BETA10 0x100f3671
|
||||||
void RegistrationBook::ReadyWorld()
|
void RegistrationBook::ReadyWorld()
|
||||||
{
|
{
|
||||||
|
// This function is very fragile and appears to oscillate between two versions on small changes.
|
||||||
|
// This even happens for commenting out `assert()` calls, which shouldn't affect release builds at all.
|
||||||
|
// See https://github.com/isledecomp/isle/pull/1375 for a version that had 100 %.
|
||||||
|
|
||||||
|
#ifndef BETA10
|
||||||
LegoGameState* gameState = GameState();
|
LegoGameState* gameState = GameState();
|
||||||
gameState->m_history.WriteScoreHistory();
|
gameState->m_history.WriteScoreHistory();
|
||||||
|
#endif
|
||||||
|
|
||||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||||
|
|
||||||
@@ -399,8 +408,11 @@ void RegistrationBook::ReadyWorld()
|
|||||||
MxS16 i;
|
MxS16 i;
|
||||||
|
|
||||||
for (i = 0; i < 26; i++) {
|
for (i = 0; i < 26; i++) {
|
||||||
|
// TODO: This might be an inline function.
|
||||||
|
// See also `HistoryBook::ReadyWorld()`.
|
||||||
if (i < 26) {
|
if (i < 26) {
|
||||||
m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", letterBuffer);
|
m_alphabet[i] = (MxStillPresenter*) Find("MxStillPresenter", letterBuffer);
|
||||||
|
assert(m_alphabet[i]);
|
||||||
|
|
||||||
// We need to loop through the entire alphabet,
|
// We need to loop through the entire alphabet,
|
||||||
// so increment the first char of the bitmap name
|
// so increment the first char of the bitmap name
|
||||||
@@ -412,6 +424,7 @@ void RegistrationBook::ReadyWorld()
|
|||||||
char checkmarkBuffer[] = "Check0_Ctl";
|
char checkmarkBuffer[] = "Check0_Ctl";
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
m_checkmark[i] = (MxControlPresenter*) Find("MxControlPresenter", checkmarkBuffer);
|
m_checkmark[i] = (MxControlPresenter*) Find("MxControlPresenter", checkmarkBuffer);
|
||||||
|
assert(m_checkmark[i]);
|
||||||
|
|
||||||
// Just like in the prior letter loop,
|
// Just like in the prior letter loop,
|
||||||
// we need to increment the fifth char
|
// we need to increment the fifth char
|
||||||
@@ -431,6 +444,7 @@ void RegistrationBook::ReadyWorld()
|
|||||||
// Start building the player names using a two-dimensional array
|
// Start building the player names using a two-dimensional array
|
||||||
m_name[i][j] = m_alphabet[players[i - 1].m_letters[j]]->Clone();
|
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
|
// Enable the presenter to actually show the letter in the grid
|
||||||
m_name[i][j]->Enable(TRUE);
|
m_name[i][j]->Enable(TRUE);
|
||||||
|
|
||||||
@@ -440,7 +454,15 @@ void RegistrationBook::ReadyWorld()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_infocenterState->m_letters[0] != NULL) {
|
#ifdef BETA10
|
||||||
|
InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||||
|
assert(infocenterState);
|
||||||
|
|
||||||
|
if (infocenterState->HasRegistered())
|
||||||
|
#else
|
||||||
|
if (m_infocenterState->HasRegistered())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
PlayAction(RegbookScript::c_iic008in_PlayWav);
|
PlayAction(RegbookScript::c_iic008in_PlayWav);
|
||||||
|
|
||||||
LegoROI* infoman = FindROI(g_infoman);
|
LegoROI* infoman = FindROI(g_infoman);
|
||||||
@@ -453,6 +475,7 @@ void RegistrationBook::ReadyWorld()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100f3424
|
||||||
inline void RegistrationBook::PlayAction(MxU32 p_objectId)
|
inline void RegistrationBook::PlayAction(MxU32 p_objectId)
|
||||||
{
|
{
|
||||||
MxDSAction action;
|
MxDSAction action;
|
||||||
|
Reference in New Issue
Block a user