Switch to button macros
This commit is contained in:
@@ -1411,7 +1411,7 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & START_BUTTON)
|
||||
if (JOY_NEW(START_BUTTON))
|
||||
return 8;
|
||||
|
||||
if (movementDir)
|
||||
@@ -1421,10 +1421,10 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr)
|
||||
}
|
||||
|
||||
// Pressed Cancel
|
||||
if ((gMain.newKeys & A_BUTTON) && *slotPtr == PARTY_SIZE + 1)
|
||||
if ((JOY_NEW(A_BUTTON)) && *slotPtr == PARTY_SIZE + 1)
|
||||
return 2;
|
||||
|
||||
return gMain.newKeys & (A_BUTTON | B_BUTTON);
|
||||
return JOY_NEW(A_BUTTON | B_BUTTON);
|
||||
}
|
||||
|
||||
static void UpdateCurrentPartySelection(s8 *slotPtr, s8 movementDir)
|
||||
@@ -3765,7 +3765,7 @@ static u16 GetFieldMoveMonSpecies(void)
|
||||
|
||||
static void Task_CancelAfterAorBPress(u8 taskId)
|
||||
{
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
CursorCb_Cancel1(taskId);
|
||||
}
|
||||
|
||||
@@ -4722,7 +4722,7 @@ static void Task_DoLearnedMoveFanfareAfterText(u8 taskId)
|
||||
|
||||
static void Task_LearnNextMoveOrClosePartyMenu(u8 taskId)
|
||||
{
|
||||
if (IsFanfareTaskInactive() && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)))
|
||||
if (IsFanfareTaskInactive() && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
|
||||
{
|
||||
if (gPartyMenu.learnMoveState == 1)
|
||||
Task_TryLearningNextMove(taskId);
|
||||
@@ -4931,7 +4931,7 @@ static void UpdateMonDisplayInfoAfterRareCandy(u8 slot, struct Pokemon *mon)
|
||||
|
||||
static void Task_DisplayLevelUpStatsPg1(u8 taskId)
|
||||
{
|
||||
if (WaitFanfare(FALSE) && IsPartyMenuTextPrinterActive() != TRUE && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)))
|
||||
if (WaitFanfare(FALSE) && IsPartyMenuTextPrinterActive() != TRUE && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayLevelUpStatsPg1(taskId);
|
||||
@@ -4941,7 +4941,7 @@ static void Task_DisplayLevelUpStatsPg1(u8 taskId)
|
||||
|
||||
static void Task_DisplayLevelUpStatsPg2(u8 taskId)
|
||||
{
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayLevelUpStatsPg2(taskId);
|
||||
@@ -4972,7 +4972,7 @@ static void Task_TryLearnNewMoves(u8 taskId)
|
||||
{
|
||||
u16 learnMove;
|
||||
|
||||
if (WaitFanfare(0) && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)))
|
||||
if (WaitFanfare(0) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
|
||||
{
|
||||
RemoveLevelUpStatsWindow();
|
||||
learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE);
|
||||
@@ -5609,7 +5609,7 @@ static void Task_ValidateChosenHalfParty(u8 taskId)
|
||||
|
||||
static void Task_ContinueChoosingHalfParty(u8 taskId)
|
||||
{
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON);
|
||||
|
||||
Reference in New Issue
Block a user