Switch to button macros
This commit is contained in:
@@ -1756,10 +1756,10 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
||||
{
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
task->data[3] = task->data[1];
|
||||
if (gMain.newKeys & DPAD_UP && --task->data[3] < 0)
|
||||
if (JOY_NEW(DPAD_UP) && --task->data[3] < 0)
|
||||
task->data[3] = 4;
|
||||
|
||||
if (gMain.newKeys & DPAD_DOWN && ++task->data[3] > 4)
|
||||
if (JOY_NEW(DPAD_DOWN) && ++task->data[3] > 4)
|
||||
task->data[3] = 0;
|
||||
if (task->data[1] != task->data[3])
|
||||
{
|
||||
@@ -1798,13 +1798,13 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
||||
task->data[0] = 2;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_UP)
|
||||
else if (JOY_NEW(DPAD_UP))
|
||||
{
|
||||
if (--task->data[1] < 0)
|
||||
task->data[1] = 4;
|
||||
@@ -1814,7 +1814,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
|
||||
task->data[0] = 2;
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
if (++task->data[1] > 3)
|
||||
task->data[1] = 0;
|
||||
@@ -1976,22 +1976,22 @@ static void sub_80C78E4(void)
|
||||
|
||||
static u8 HandleBoxChooseSelectionInput(void)
|
||||
{
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
return 201;
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
return gUnknown_02039D04->curBox;
|
||||
}
|
||||
if (gMain.newKeys & DPAD_LEFT)
|
||||
if (JOY_NEW(DPAD_LEFT))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_80C7BB4();
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_RIGHT)
|
||||
else if (JOY_NEW(DPAD_RIGHT))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sub_80C7B80();
|
||||
@@ -2393,7 +2393,7 @@ static void Cb_ReshowPSS(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy() && gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
if (!IsDma3ManagerBusyWithBgCopy() && JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sPSSData->state++;
|
||||
@@ -2615,7 +2615,7 @@ static void Cb_MainPSS(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sPSSData->state = 0;
|
||||
@@ -2632,7 +2632,7 @@ static void Cb_MainPSS(u8 taskId)
|
||||
sPSSData->state = 6;
|
||||
break;
|
||||
case 6:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -2858,7 +2858,7 @@ static void Cb_OnSelectedMon(u8 taskId)
|
||||
sPSSData->state = 6;
|
||||
break;
|
||||
case 6:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -2943,7 +2943,7 @@ static void Cb_WithdrawMon(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -3034,7 +3034,7 @@ static void Cb_DepositMenu(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
PrintStorageActionText(PC_TEXT_DEPOSIT_IN_WHICH_BOX);
|
||||
sPSSData->state = 1;
|
||||
@@ -3095,14 +3095,14 @@ static void Cb_ReleaseMon(u8 taskId)
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 4:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
PrintStorageActionText(PC_TEXT_BYE_BYE);
|
||||
sPSSData->state++;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
if (sInPartyMenu)
|
||||
@@ -3134,14 +3134,14 @@ static void Cb_ReleaseMon(u8 taskId)
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 9:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
PrintStorageActionText(PC_TEXT_SURPRISE);
|
||||
sPSSData->state++;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sub_80CC064();
|
||||
@@ -3157,14 +3157,14 @@ static void Cb_ReleaseMon(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
PrintStorageActionText(PC_TEXT_WORRIED);
|
||||
sPSSData->state++;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -3257,7 +3257,7 @@ static void Cb_GiveMovingItemToMon(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sPSSData->state++;
|
||||
@@ -3296,7 +3296,7 @@ static void Cb_ItemToBag(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sub_80CE00C();
|
||||
@@ -3309,7 +3309,7 @@ static void Cb_ItemToBag(u8 taskId)
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
break;
|
||||
case 3:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -3349,7 +3349,7 @@ static void Cb_SwitchSelectedItem(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sPSSData->state++;
|
||||
@@ -3388,7 +3388,7 @@ static void Cb_ShowItemInfo(u8 taskId)
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 4:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
PlaySE(SE_WIN_OPEN);
|
||||
sPSSData->state++;
|
||||
@@ -3438,7 +3438,7 @@ static void Cb_CloseBoxWhileHoldingItem(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sPSSData->state = 5;
|
||||
@@ -3494,7 +3494,7 @@ static void Cb_PrintCantStoreMail(u8 taskId)
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 2:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
sPSSData->state++;
|
||||
@@ -3759,7 +3759,7 @@ static void Cb_OnCloseBoxPressed(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -3820,7 +3820,7 @@ static void Cb_OnBPressed(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON | DPAD_ANY))
|
||||
{
|
||||
ClearBottomWindow();
|
||||
SetPSSCallback(Cb_MainPSS);
|
||||
@@ -5462,7 +5462,7 @@ static void sub_80CCA3C(const void *tilemap, s8 direction, u8 arg2)
|
||||
|
||||
if (direction == 0)
|
||||
return;
|
||||
else if (direction > 0)
|
||||
if (direction > 0)
|
||||
x *= 1, x += 0x14; // x * 1 is needed to match, but can be safely removed as it makes no functional difference
|
||||
else
|
||||
x -= 4;
|
||||
@@ -6940,7 +6940,7 @@ static u8 InBoxInput_Normal(void)
|
||||
sPSSData->field_CD3 = 0;
|
||||
sPSSData->field_CD7 = 0;
|
||||
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
retVal = TRUE;
|
||||
if (sBoxCursorPosition >= IN_BOX_ROWS)
|
||||
@@ -6954,7 +6954,7 @@ static u8 InBoxInput_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
retVal = TRUE;
|
||||
cursorPosition += IN_BOX_ROWS;
|
||||
@@ -6968,7 +6968,7 @@ static u8 InBoxInput_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_LEFT)
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
retVal = TRUE;
|
||||
if (sBoxCursorPosition % IN_BOX_ROWS != 0)
|
||||
@@ -6982,7 +6982,7 @@ static u8 InBoxInput_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
retVal = TRUE;
|
||||
if ((sBoxCursorPosition + 1) % IN_BOX_ROWS != 0)
|
||||
@@ -6996,7 +6996,7 @@ static u8 InBoxInput_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (gMain.newKeys & START_BUTTON)
|
||||
else if (JOY_NEW(START_BUTTON))
|
||||
{
|
||||
retVal = TRUE;
|
||||
cursorArea = CURSOR_AREA_BOX;
|
||||
@@ -7004,7 +7004,7 @@ static u8 InBoxInput_Normal(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((gMain.newKeys & A_BUTTON) && sub_80CFA5C())
|
||||
if ((JOY_NEW(A_BUTTON)) && sub_80CFA5C())
|
||||
{
|
||||
if (!sCanOnlyMove)
|
||||
return 8;
|
||||
@@ -7038,18 +7038,18 @@ static u8 InBoxInput_Normal(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
return 19;
|
||||
|
||||
if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)
|
||||
{
|
||||
if (gMain.heldKeys & L_BUTTON)
|
||||
if (JOY_HELD(L_BUTTON))
|
||||
return 10;
|
||||
if (gMain.heldKeys & R_BUTTON)
|
||||
if (JOY_HELD(R_BUTTON))
|
||||
return 9;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
sub_80CFDC4();
|
||||
return 0;
|
||||
@@ -7067,9 +7067,9 @@ static u8 InBoxInput_Normal(void)
|
||||
|
||||
static u8 InBoxInput_GrabbingMultiple(void)
|
||||
{
|
||||
if (gMain.heldKeys & A_BUTTON)
|
||||
if (JOY_HELD(A_BUTTON))
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (sBoxCursorPosition / IN_BOX_ROWS != 0)
|
||||
{
|
||||
@@ -7081,7 +7081,7 @@ static u8 InBoxInput_GrabbingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (sBoxCursorPosition + IN_BOX_ROWS < IN_BOX_COUNT)
|
||||
{
|
||||
@@ -7093,7 +7093,7 @@ static u8 InBoxInput_GrabbingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_LEFT)
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (sBoxCursorPosition % IN_BOX_ROWS != 0)
|
||||
{
|
||||
@@ -7105,7 +7105,7 @@ static u8 InBoxInput_GrabbingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if ((sBoxCursorPosition + 1) % IN_BOX_ROWS != 0)
|
||||
{
|
||||
@@ -7142,7 +7142,7 @@ static u8 InBoxInput_GrabbingMultiple(void)
|
||||
|
||||
static u8 InBoxInput_MovingMultiple(void)
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (sub_80D0580(0))
|
||||
{
|
||||
@@ -7154,7 +7154,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (sub_80D0580(1))
|
||||
{
|
||||
@@ -7166,7 +7166,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_LEFT)
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (sub_80D0580(2))
|
||||
{
|
||||
@@ -7178,7 +7178,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (sub_80D0580(3))
|
||||
{
|
||||
@@ -7190,7 +7190,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
else if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
if (sub_80D0BC0())
|
||||
{
|
||||
@@ -7203,7 +7203,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
return 24;
|
||||
}
|
||||
@@ -7211,9 +7211,9 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)
|
||||
{
|
||||
if (gMain.heldKeys & L_BUTTON)
|
||||
if (JOY_HELD(L_BUTTON))
|
||||
return 10;
|
||||
if (gMain.heldKeys & R_BUTTON)
|
||||
if (JOY_HELD(R_BUTTON))
|
||||
return 9;
|
||||
}
|
||||
|
||||
@@ -7238,7 +7238,7 @@ static u8 HandleInput_InParty(void)
|
||||
gotoBox = FALSE;
|
||||
retVal = 0;
|
||||
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (--cursorPosition < 0)
|
||||
cursorPosition = PARTY_SIZE;
|
||||
@@ -7246,7 +7246,7 @@ static u8 HandleInput_InParty(void)
|
||||
retVal = 1;
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (++cursorPosition > PARTY_SIZE)
|
||||
cursorPosition = 0;
|
||||
@@ -7254,14 +7254,14 @@ static u8 HandleInput_InParty(void)
|
||||
retVal = 1;
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_LEFT && sBoxCursorPosition != 0)
|
||||
else if (JOY_REPEAT(DPAD_LEFT) && sBoxCursorPosition != 0)
|
||||
{
|
||||
retVal = 1;
|
||||
sPSSData->field_CD6 = sBoxCursorPosition;
|
||||
cursorPosition = 0;
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (sBoxCursorPosition == 0)
|
||||
{
|
||||
@@ -7277,7 +7277,7 @@ static u8 HandleInput_InParty(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
if (sBoxCursorPosition == PARTY_SIZE)
|
||||
{
|
||||
@@ -7313,7 +7313,7 @@ static u8 HandleInput_InParty(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
if (sPSSData->boxOption == BOX_OPTION_DEPOSIT)
|
||||
return 19;
|
||||
@@ -7327,7 +7327,7 @@ static u8 HandleInput_InParty(void)
|
||||
cursorArea = CURSOR_AREA_IN_BOX;
|
||||
cursorPosition = 0;
|
||||
}
|
||||
else if (gMain.newKeys & SELECT_BUTTON)
|
||||
else if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
sub_80CFDC4();
|
||||
return 0;
|
||||
@@ -7356,7 +7356,7 @@ static u8 HandleInput_OnBox(void)
|
||||
sPSSData->field_CD2 = 0;
|
||||
sPSSData->field_CD7 = 0;
|
||||
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
retVal = 1;
|
||||
cursorArea = CURSOR_AREA_BUTTONS;
|
||||
@@ -7364,7 +7364,7 @@ static u8 HandleInput_OnBox(void)
|
||||
sPSSData->field_CD7 = 1;
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
retVal = 1;
|
||||
cursorArea = CURSOR_AREA_IN_BOX;
|
||||
@@ -7372,30 +7372,30 @@ static u8 HandleInput_OnBox(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gMain.heldKeys & DPAD_LEFT)
|
||||
if (JOY_HELD(DPAD_LEFT))
|
||||
return 10;
|
||||
if (gMain.heldKeys & DPAD_RIGHT)
|
||||
if (JOY_HELD(DPAD_RIGHT))
|
||||
return 9;
|
||||
|
||||
if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)
|
||||
{
|
||||
if (gMain.heldKeys & L_BUTTON)
|
||||
if (JOY_HELD(L_BUTTON))
|
||||
return 10;
|
||||
if (gMain.heldKeys & R_BUTTON)
|
||||
if (JOY_HELD(R_BUTTON))
|
||||
return 9;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
sub_80CD1A8(FALSE);
|
||||
AddBoxMenu();
|
||||
return 7;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
return 19;
|
||||
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
sub_80CFDC4();
|
||||
return 0;
|
||||
@@ -7429,7 +7429,7 @@ static u8 HandleInput_OnButtons(void)
|
||||
sPSSData->field_CD2 = 0;
|
||||
sPSSData->field_CD7 = 0;
|
||||
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
retVal = 1;
|
||||
cursorArea = CURSOR_AREA_IN_BOX;
|
||||
@@ -7441,7 +7441,8 @@ static u8 HandleInput_OnButtons(void)
|
||||
sPSSData->field_CD7 = 1;
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & (DPAD_DOWN | START_BUTTON))
|
||||
|
||||
if (JOY_REPEAT(DPAD_DOWN | START_BUTTON))
|
||||
{
|
||||
retVal = 1;
|
||||
cursorArea = CURSOR_AREA_BOX;
|
||||
@@ -7450,14 +7451,14 @@ static u8 HandleInput_OnButtons(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gMain.newAndRepeatedKeys & DPAD_LEFT)
|
||||
if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
retVal = 1;
|
||||
if (--cursorPosition < 0)
|
||||
cursorPosition = 1;
|
||||
break;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
retVal = 1;
|
||||
if (++cursorPosition > 1)
|
||||
@@ -7465,12 +7466,12 @@ static u8 HandleInput_OnButtons(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
return (cursorPosition == 0) ? 5 : 4;
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
return 19;
|
||||
|
||||
if (gMain.newKeys & SELECT_BUTTON)
|
||||
if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
sub_80CFDC4();
|
||||
return 0;
|
||||
@@ -7919,23 +7920,23 @@ static s16 sub_80D00AC(void)
|
||||
|
||||
do
|
||||
{
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
textId = Menu_GetCursorPos();
|
||||
break;
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
textId = -1;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
if (JOY_NEW(DPAD_UP))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
Menu_MoveCursor(-1);
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
Menu_MoveCursor(1);
|
||||
|
||||
Reference in New Issue
Block a user