mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00:00
Improve naming, use virtual key constants (#979)
This commit is contained in:
committed by
GitHub
parent
77af1a5483
commit
b67af71f33
@@ -297,7 +297,7 @@ MxLong GasStation::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
// FUNCTION: LEGO1 0x10005920
|
||||
MxLong GasStation::HandleKeyPress(MxS8 p_key)
|
||||
{
|
||||
if (p_key == ' ' && g_unk0x100f0160 == 0 && this->m_unk0x106 != 0) {
|
||||
if (p_key == VK_SPACE && g_unk0x100f0160 == 0 && m_unk0x106 != 0) {
|
||||
m_state->FUN_10006490();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ MxLong Hospital::HandleKeyPress(MxS8 p_key)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_key == ' ' && g_unk0x100f7918 == 0) {
|
||||
if (p_key == VK_SPACE && g_unk0x100f7918 == 0) {
|
||||
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
|
||||
result = 1;
|
||||
}
|
||||
|
||||
@@ -612,7 +612,6 @@ MxU8 Infocenter::HandleMouseMove(MxS32 p_x, MxS32 p_y)
|
||||
VideoManager()->SortPresenterList();
|
||||
m_unk0x11c->Enable(TRUE);
|
||||
m_unk0x11c->SetPosition(p_x, p_y);
|
||||
|
||||
m_unk0x11c->SetDisplayZ(oldDisplayZ);
|
||||
}
|
||||
else {
|
||||
@@ -631,7 +630,7 @@ MxLong Infocenter::HandleKeyPress(MxS8 p_key)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_key == ' ' && m_worldStarted) {
|
||||
if (p_key == VK_SPACE && m_worldStarted) {
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
case 0:
|
||||
StopCutscene();
|
||||
|
||||
@@ -164,7 +164,7 @@ MxLong Police::HandleKeyPress(LegoEventNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetKey() == ' ' && m_policeState->GetUnknown0x0c() == 1) {
|
||||
if (p_param.GetKey() == VK_SPACE && m_policeState->GetUnknown0x0c() == 1) {
|
||||
DeleteObjects(&m_atom, PoliceScript::c_nps001ni_RunAnim, PoliceScript::c_nps002la_RunAnim);
|
||||
m_policeState->SetUnknown0x0c(0);
|
||||
return 1;
|
||||
|
||||
@@ -166,13 +166,13 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
|
||||
key = p_key;
|
||||
}
|
||||
|
||||
if ((key < 'A' || key > 'Z') && key != '\b') {
|
||||
if (key == ' ') {
|
||||
if ((key < 'A' || key > 'Z') && key != VK_BACK) {
|
||||
if (key == VK_SPACE) {
|
||||
DeleteObjects(&m_atom, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
}
|
||||
}
|
||||
else if (key != '\b' && m_unk0x280.m_cursorPos < 7) {
|
||||
else if (key != VK_BACK && m_unk0x280.m_cursorPos < 7) {
|
||||
m_name[0][m_unk0x280.m_cursorPos] = m_alphabet[key - 'A']->Clone();
|
||||
|
||||
if (m_name[0][m_unk0x280.m_cursorPos] != NULL) {
|
||||
@@ -190,7 +190,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (key == '\b' && m_unk0x280.m_cursorPos > 0) {
|
||||
if (key == VK_BACK && m_unk0x280.m_cursorPos > 0) {
|
||||
m_unk0x280.m_cursorPos--;
|
||||
|
||||
m_name[0][m_unk0x280.m_cursorPos]->Enable(FALSE);
|
||||
|
||||
Reference in New Issue
Block a user