Re-apply joypad macros (minus merge conflicts)
This commit is contained in:
@@ -1755,10 +1755,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])
|
||||
{
|
||||
@@ -1797,13 +1797,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;
|
||||
@@ -1813,7 +1813,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;
|
||||
@@ -1975,22 +1975,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();
|
||||
@@ -2392,7 +2392,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++;
|
||||
@@ -2614,7 +2614,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;
|
||||
@@ -2631,7 +2631,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);
|
||||
@@ -2857,7 +2857,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);
|
||||
@@ -2942,7 +2942,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);
|
||||
@@ -3033,7 +3033,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;
|
||||
@@ -3094,14 +3094,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)
|
||||
@@ -3133,14 +3133,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();
|
||||
@@ -3156,14 +3156,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);
|
||||
@@ -3256,7 +3256,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++;
|
||||
@@ -3295,7 +3295,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();
|
||||
@@ -3308,7 +3308,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);
|
||||
@@ -3348,7 +3348,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++;
|
||||
@@ -3387,7 +3387,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++;
|
||||
@@ -3437,7 +3437,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;
|
||||
@@ -3493,7 +3493,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++;
|
||||
@@ -3758,7 +3758,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);
|
||||
@@ -3819,7 +3819,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);
|
||||
@@ -5461,7 +5461,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;
|
||||
@@ -6939,7 +6939,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)
|
||||
@@ -6953,7 +6953,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;
|
||||
@@ -6967,7 +6967,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)
|
||||
@@ -6981,7 +6981,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)
|
||||
@@ -6995,7 +6995,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;
|
||||
@@ -7003,7 +7003,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;
|
||||
@@ -7037,18 +7037,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;
|
||||
@@ -7066,9 +7066,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)
|
||||
{
|
||||
@@ -7080,7 +7080,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)
|
||||
{
|
||||
@@ -7092,7 +7092,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)
|
||||
{
|
||||
@@ -7104,7 +7104,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)
|
||||
{
|
||||
@@ -7141,7 +7141,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))
|
||||
{
|
||||
@@ -7153,7 +7153,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (sub_80D0580(1))
|
||||
{
|
||||
@@ -7165,7 +7165,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_LEFT)
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (sub_80D0580(2))
|
||||
{
|
||||
@@ -7177,7 +7177,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (sub_80D0580(3))
|
||||
{
|
||||
@@ -7189,7 +7189,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
else if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
if (sub_80D0BC0())
|
||||
{
|
||||
@@ -7202,7 +7202,7 @@ static u8 InBoxInput_MovingMultiple(void)
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
return 24;
|
||||
}
|
||||
@@ -7210,9 +7210,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;
|
||||
}
|
||||
|
||||
@@ -7237,7 +7237,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;
|
||||
@@ -7245,7 +7245,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;
|
||||
@@ -7253,14 +7253,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)
|
||||
{
|
||||
@@ -7276,7 +7276,7 @@ static u8 HandleInput_InParty(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
if (sBoxCursorPosition == PARTY_SIZE)
|
||||
{
|
||||
@@ -7312,7 +7312,7 @@ static u8 HandleInput_InParty(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
if (sPSSData->boxOption == BOX_OPTION_DEPOSIT)
|
||||
return 19;
|
||||
@@ -7326,7 +7326,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;
|
||||
@@ -7355,7 +7355,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;
|
||||
@@ -7363,7 +7363,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;
|
||||
@@ -7371,30 +7371,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;
|
||||
@@ -7428,7 +7428,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;
|
||||
@@ -7440,7 +7440,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;
|
||||
@@ -7449,14 +7450,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)
|
||||
@@ -7464,12 +7465,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;
|
||||
@@ -7918,23 +7919,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