diff options
author | aaaaaa123456789 <aaaaaa123456789@acidch.at> | 2020-11-02 22:02:39 -0300 |
---|---|---|
committer | aaaaaa123456789 <aaaaaa123456789@acidch.at> | 2020-11-02 22:02:39 -0300 |
commit | bacc831aa91d059936bd7c852bf0a0fb44d8f27a (patch) | |
tree | 660080b3d0dd091d8827c679f489ffbfb337d3c3 /src/battle_dome.c | |
parent | 6545745e5997f48e0c853b30b144a10244e7ba20 (diff) |
Re-apply joypad macros (minus merge conflicts)
Diffstat (limited to 'src/battle_dome.c')
-rw-r--r-- | src/battle_dome.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/battle_dome.c b/src/battle_dome.c index c305081c0..ce2f3cde6 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -4110,7 +4110,7 @@ static u8 Task_GetInfoCardInput(u8 taskId) u8 tourneyId = sTourneyTreeTrainerIds[position]; u16 roundId = gSaveBlock2Ptr->frontier.curChallengeBattleNum; - if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + if (JOY_NEW(A_BUTTON | B_BUTTON)) input = INFOCARD_INPUT_AB; // Next opponent card cant scroll @@ -4121,7 +4121,7 @@ static u8 Task_GetInfoCardInput(u8 taskId) { // For trainer info cards, pos is 0 when on a trainer info card (not viewing that trainer's match progression) // Scrolling up/down from a trainer info card goes to other trainer info cards - if (gMain.newKeys & DPAD_UP && sInfoCard->pos == 0) + if (JOY_NEW(DPAD_UP) && sInfoCard->pos == 0) { if (position == 0) position = DOME_TOURNAMENT_TRAINERS_COUNT - 1; @@ -4129,7 +4129,7 @@ static u8 Task_GetInfoCardInput(u8 taskId) position--; input = TRAINERCARD_INPUT_UP; } - else if (gMain.newKeys & DPAD_DOWN && sInfoCard->pos == 0) + else if (JOY_NEW(DPAD_DOWN) && sInfoCard->pos == 0) { if (position == DOME_TOURNAMENT_TRAINERS_COUNT - 1) position = 0; @@ -4138,13 +4138,13 @@ static u8 Task_GetInfoCardInput(u8 taskId) input = TRAINERCARD_INPUT_DOWN; } // Scrolling left can only be done after scrolling right - else if (gMain.newKeys & DPAD_LEFT && sInfoCard->pos != 0) + else if (JOY_NEW(DPAD_LEFT) && sInfoCard->pos != 0) { sInfoCard->pos--; input = TRAINERCARD_INPUT_LEFT; } // Scrolling right from a trainer info card shows their match progression - else if (gMain.newKeys & DPAD_RIGHT) + else if (JOY_NEW(DPAD_RIGHT)) { // Can only scroll right from a trainer card until the round they were eliminated if (DOME_TRAINERS[tourneyId].isEliminated && sInfoCard->pos - 1 < DOME_TRAINERS[tourneyId].eliminatedAt) @@ -4172,7 +4172,7 @@ static u8 Task_GetInfoCardInput(u8 taskId) { // For match info cards, pos is 1 when on the match card, 0 when on the left trainer, and 1 when on the right trainer // Scrolling up/down from a match info card goes to the next/previous match - if (gMain.newKeys & DPAD_UP && sInfoCard->pos == 1) + if (JOY_NEW(DPAD_UP) && sInfoCard->pos == 1) { if (position == DOME_TOURNAMENT_TRAINERS_COUNT) position = sLastMatchCardNum[roundId]; @@ -4180,7 +4180,7 @@ static u8 Task_GetInfoCardInput(u8 taskId) position--; input = MATCHCARD_INPUT_UP; } - else if (gMain.newKeys & DPAD_DOWN && sInfoCard->pos == 1) + else if (JOY_NEW(DPAD_DOWN) && sInfoCard->pos == 1) { if (position == sLastMatchCardNum[roundId]) position = DOME_TOURNAMENT_TRAINERS_COUNT; @@ -4189,12 +4189,12 @@ static u8 Task_GetInfoCardInput(u8 taskId) input = MATCHCARD_INPUT_DOWN; } // Scrolling left/right from a match info card shows the trainer info card of the competitors for that match - else if (gMain.newKeys & DPAD_LEFT && sInfoCard->pos != 0) + else if (JOY_NEW(DPAD_LEFT) && sInfoCard->pos != 0) { input = MATCHCARD_INPUT_LEFT; sInfoCard->pos--; } - else if (gMain.newKeys & DPAD_RIGHT && (sInfoCard->pos == 0 || sInfoCard->pos == 1)) + else if (JOY_NEW(DPAD_RIGHT) && (sInfoCard->pos == 0 || sInfoCard->pos == 1)) { input = MATCHCARD_INPUT_RIGHT; sInfoCard->pos++; @@ -5042,12 +5042,12 @@ static u8 UpdateTourneyTreeCursor(u8 taskId) int tourneyTreeCursorSpriteId = gTasks[taskId].data[1]; int roundId = gSaveBlock2Ptr->frontier.curChallengeBattleNum; - if (gMain.newKeys == B_BUTTON || (gMain.newKeys & A_BUTTON && tourneyTreeCursorSpriteId == TOURNEY_TREE_CLOSE_BUTTON)) + if (gMain.newKeys == B_BUTTON || (JOY_NEW(A_BUTTON) && tourneyTreeCursorSpriteId == TOURNEY_TREE_CLOSE_BUTTON)) { PlaySE(SE_SELECT); selection = TOURNEY_TREE_SELECTED_CLOSE; } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { if (tourneyTreeCursorSpriteId < DOME_TOURNAMENT_TRAINERS_COUNT) { @@ -5551,7 +5551,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId) gTasks[taskId].tState = STATE_WAIT_FOR_INPUT; break; case STATE_WAIT_FOR_INPUT: - if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + if (JOY_NEW(A_BUTTON | B_BUTTON)) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].tState = STATE_CLOSE_TOURNEY_TREE; |