diff --git a/LEGO1/lego/legoomni/include/registrationbook.h b/LEGO1/lego/legoomni/include/registrationbook.h index c941ce5c..5ff61bdd 100644 --- a/LEGO1/lego/legoomni/include/registrationbook.h +++ b/LEGO1/lego/legoomni/include/registrationbook.h @@ -68,6 +68,7 @@ class RegistrationBook : public LegoWorld { MxLong HandleKeyPress(MxS8 p_key); MxLong HandleClick(LegoControlManagerEvent& p_param); MxLong HandleNotification19(MxParam& p_param); + void FUN_100775c(MxS16 p_playerIndex); }; #endif // REGISTRATIONBOOK_H diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index 3775b1bc..b7e510cf 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -12,6 +12,7 @@ #include "mxmisc.h" #include "mxnotificationmanager.h" #include "mxtimer.h" +#include "mxtransitionmanager.h" #include "regbook_actions.h" DECOMP_SIZE_ASSERT(RegistrationBook, 0x2d0) @@ -113,10 +114,49 @@ MxLong RegistrationBook::HandleKeyPress(MxS8 p_key) return 0; } -// STUB: LEGO1 0x100774a0 +// FUNCTION: LEGO1 0x100774a0 MxLong RegistrationBook::HandleClick(LegoControlManagerEvent& p_param) { - return 0; + MxS16 l = p_param.GetUnknown0x28(); + if (1 <= l && 28 >= l) { + if (p_param.GetClickedObjectId() == RegbookScript::c_Alphabet_Ctl) { + if (l == 28) { + DeleteObjects(&m_atom, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav); + if (GameState()->GetCurrentAct() == 0) { + m_infocenterState->SetUnknown0x74(15); + } + else { + m_infocenterState->SetUnknown0x74(2); + } + + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); + } + else { + if (28 < l) { + return 1; + } + + HandleKeyPress(l < 27 ? l + 0x40 : 8); + } + } + else { + InputManager()->DisableInputProcessing(); + DeleteObjects(&m_atom, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav); + MxS16 i; + for (i = 0; i < 10; i++) { + if (m_checkmark[i]->GetAction()->GetObjectId() == p_param.GetClickedObjectId()) { + break; + } + } + FUN_100775c(i); + } + } + return 1; +} + +// STUB: LEGO1 0x100775c0 +void RegistrationBook::FUN_100775c(MxS16 p_playerIndex) +{ } // FUNCTION: LEGO1 0x10077cc0