implement RegistrationBook::HandleClick

This commit is contained in:
Misha 2024-03-17 13:52:19 -04:00
parent 0fe3fa65aa
commit 33c7a89f7f
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
2 changed files with 43 additions and 2 deletions

View File

@ -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

View File

@ -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