mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Improve BETA10 while keeping LEGO1 at 100 % effective
This commit is contained in:
parent
b092eafc1b
commit
8f79af0289
@ -50,6 +50,9 @@ class InfocenterState : public LegoState {
|
|||||||
|
|
||||||
void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
|
void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10031bd0
|
||||||
|
MxBool FirstLetterIsNotNull() { return m_letters[0] != NULL; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10071900
|
// SYNTHETIC: LEGO1 0x10071900
|
||||||
// InfocenterState::`scalar deleting destructor'
|
// InfocenterState::`scalar deleting destructor'
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class RegistrationBook : public LegoWorld {
|
|||||||
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'
|
||||||
|
|||||||
@ -268,6 +268,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()) {
|
||||||
@ -391,6 +392,10 @@ void RegistrationBook::FUN_100778c0()
|
|||||||
// FUNCTION: BETA10 0x100f3671
|
// 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 %.
|
||||||
|
|
||||||
LegoGameState* gameState = GameState();
|
LegoGameState* gameState = GameState();
|
||||||
gameState->m_history.WriteScoreHistory();
|
gameState->m_history.WriteScoreHistory();
|
||||||
|
|
||||||
@ -405,6 +410,7 @@ void RegistrationBook::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]);
|
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
|
||||||
letterBuffer[0]++;
|
letterBuffer[0]++;
|
||||||
@ -416,6 +422,7 @@ void RegistrationBook::ReadyWorld()
|
|||||||
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]);
|
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
|
||||||
// to get the next checkmark bitmap
|
// to get the next checkmark bitmap
|
||||||
@ -444,7 +451,15 @@ void RegistrationBook::ReadyWorld()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_infocenterState->m_letters[0] != NULL) {
|
#ifdef BETA10
|
||||||
|
InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||||
|
assert(infocenterState);
|
||||||
|
|
||||||
|
if (infocenterState->FirstLetterIsNotNull())
|
||||||
|
#else
|
||||||
|
if (m_infocenterState->FirstLetterIsNotNull())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
PlayAction(RegbookScript::c_iic008in_PlayWav);
|
PlayAction(RegbookScript::c_iic008in_PlayWav);
|
||||||
|
|
||||||
LegoROI* infoman = FindROI(g_infoman);
|
LegoROI* infoman = FindROI(g_infoman);
|
||||||
@ -457,6 +472,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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user