diff options
author | PokeCodec <67983839+PokeCodec@users.noreply.github.com> | 2020-09-04 21:11:55 -0400 |
---|---|---|
committer | PokeCodec <67983839+PokeCodec@users.noreply.github.com> | 2020-09-04 21:11:55 -0400 |
commit | 28ef2fb774bf596a3e7f81055453304e0d2ce066 (patch) | |
tree | 4a67ad17888cac15c7cb33fa8aced60a2e3bf6dc /src/pokemon_summary_screen.c | |
parent | da582d5258703eb52d8cadb4cbaef4ee7031b833 (diff) |
Switch to button macros
Diffstat (limited to 'src/pokemon_summary_screen.c')
-rw-r--r-- | src/pokemon_summary_screen.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index d016c455c..9b8e4ef9e 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1497,23 +1497,23 @@ static void Task_HandleInput(u8 taskId) { if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active) { - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { ChangeSummaryPokemon(taskId, -1); } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { ChangeSummaryPokemon(taskId, 1); } - else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) + else if ((JOY_NEW(DPAD_LEFT)) || GetLRKeysPressed() == MENU_L_PRESSED) { ChangePage(taskId, -1); } - else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) + else if ((JOY_NEW(DPAD_RIGHT)) || GetLRKeysPressed() == MENU_R_PRESSED) { ChangePage(taskId, 1); } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { if (sMonSummaryScreen->currPageIndex != PSS_PAGE_SKILLS) { @@ -1530,7 +1530,7 @@ static void Task_HandleInput(u8 taskId) } } } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { StopPokemonAnimations(); PlaySE(SE_SELECT); @@ -1878,17 +1878,17 @@ static void Task_HandleInput_MoveSelect(u8 taskId) if (MenuHelpers_CallLinkSomething() != 1) { - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { data[0] = 4; ChangeSelectedMove(data, -1, &sMonSummaryScreen->firstMoveIndex); } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { data[0] = 4; ChangeSelectedMove(data, 1, &sMonSummaryScreen->firstMoveIndex); } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { if (sMonSummaryScreen->lockMovesFlag == TRUE || (sMonSummaryScreen->newMove == MOVE_NONE && sMonSummaryScreen->firstMoveIndex == MAX_MON_MOVES)) @@ -1906,7 +1906,7 @@ static void Task_HandleInput_MoveSelect(u8 taskId) PlaySE(SE_FAILURE); } } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); CloseMoveSelectMode(taskId); @@ -2018,24 +2018,24 @@ static void Task_HandleInput_MovePositionSwitch(u8 taskId) if (MenuHelpers_CallLinkSomething() != TRUE) { - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { data[0] = 3; ChangeSelectedMove(&data[0], -1, &sMonSummaryScreen->secondMoveIndex); } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { data[0] = 3; ChangeSelectedMove(&data[0], 1, &sMonSummaryScreen->secondMoveIndex); } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { if (sMonSummaryScreen->firstMoveIndex == sMonSummaryScreen->secondMoveIndex) ExitMovePositionSwitchMode(taskId, FALSE); else ExitMovePositionSwitchMode(taskId, TRUE); } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { ExitMovePositionSwitchMode(taskId, FALSE); } @@ -2161,25 +2161,25 @@ static void Task_HandleReplaceMoveInput(u8 taskId) { if (gPaletteFade.active != TRUE) { - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { data[0] = 4; ChangeSelectedMove(data, -1, &sMonSummaryScreen->firstMoveIndex); } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { data[0] = 4; ChangeSelectedMove(data, 1, &sMonSummaryScreen->firstMoveIndex); } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) + else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) { ChangePage(taskId, -1); } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) + else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) { ChangePage(taskId, 1); } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { if (CanReplaceMove() == TRUE) { @@ -2195,7 +2195,7 @@ static void Task_HandleReplaceMoveInput(u8 taskId) ShowCantForgetHMsWindow(taskId); } } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { StopPokemonAnimations(); PlaySE(SE_SELECT); @@ -2235,7 +2235,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId) u16 move; if (FuncIsActiveTask(Task_ShowPowerAccWindow) != 1) { - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { data[1] = 1; data[0] = 4; @@ -2243,7 +2243,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId) data[1] = 0; gTasks[taskId].func = Task_HandleReplaceMoveInput; } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { data[1] = 1; data[0] = 4; @@ -2251,7 +2251,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId) data[1] = 0; gTasks[taskId].func = Task_HandleReplaceMoveInput; } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) + else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) { if (sMonSummaryScreen->currPageIndex != PSS_PAGE_BATTLE_MOVES) { @@ -2265,7 +2265,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId) HandleAppealJamTilemap(9, -2, move); } } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) + else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) { if (sMonSummaryScreen->currPageIndex != PSS_PAGE_CONTEST_MOVES) { @@ -2279,7 +2279,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId) HandleAppealJamTilemap(9, -2, move); } } - else if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + else if (JOY_NEW(A_BUTTON | B_BUTTON)) { ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES); if (!gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_STATUS]].invisible) |