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/option_menu.c | |
parent | 6545745e5997f48e0c853b30b144a10244e7ba20 (diff) |
Re-apply joypad macros (minus merge conflicts)
Diffstat (limited to 'src/option_menu.c')
-rw-r--r-- | src/option_menu.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/option_menu.c b/src/option_menu.c index 1cf0bad2e..b6440a89c 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -271,16 +271,16 @@ static void Task_OptionMenuFadeIn(u8 taskId) static void Task_OptionMenuProcessInput(u8 taskId) { - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { if (gTasks[taskId].data[TD_MENUSELECTION] == MENUITEM_CANCEL) gTasks[taskId].func = Task_OptionMenuSave; } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { gTasks[taskId].func = Task_OptionMenuSave; } - else if (gMain.newKeys & DPAD_UP) + else if (JOY_NEW(DPAD_UP)) { if (gTasks[taskId].data[TD_MENUSELECTION] > 0) gTasks[taskId].data[TD_MENUSELECTION]--; @@ -288,7 +288,7 @@ static void Task_OptionMenuProcessInput(u8 taskId) gTasks[taskId].data[TD_MENUSELECTION] = MENUITEM_CANCEL; HighlightOptionMenuItem(gTasks[taskId].data[TD_MENUSELECTION]); } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { if (gTasks[taskId].data[TD_MENUSELECTION] < MENUITEM_CANCEL) gTasks[taskId].data[TD_MENUSELECTION]++; @@ -405,7 +405,7 @@ static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style) static u8 TextSpeed_ProcessInput(u8 selection) { - if (gMain.newKeys & DPAD_RIGHT) + if (JOY_NEW(DPAD_RIGHT)) { if (selection <= 1) selection++; @@ -414,7 +414,7 @@ static u8 TextSpeed_ProcessInput(u8 selection) sArrowPressed = TRUE; } - if (gMain.newKeys & DPAD_LEFT) + if (JOY_NEW(DPAD_LEFT)) { if (selection != 0) selection--; @@ -451,7 +451,7 @@ static void TextSpeed_DrawChoices(u8 selection) static u8 BattleScene_ProcessInput(u8 selection) { - if (gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) + if (JOY_NEW(DPAD_LEFT | DPAD_RIGHT)) { selection ^= 1; sArrowPressed = TRUE; @@ -474,7 +474,7 @@ static void BattleScene_DrawChoices(u8 selection) static u8 BattleStyle_ProcessInput(u8 selection) { - if (gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) + if (JOY_NEW(DPAD_LEFT | DPAD_RIGHT)) { selection ^= 1; sArrowPressed = TRUE; @@ -497,7 +497,7 @@ static void BattleStyle_DrawChoices(u8 selection) static u8 Sound_ProcessInput(u8 selection) { - if (gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) + if (JOY_NEW(DPAD_LEFT | DPAD_RIGHT)) { selection ^= 1; SetPokemonCryStereo(selection); @@ -521,7 +521,7 @@ static void Sound_DrawChoices(u8 selection) static u8 FrameType_ProcessInput(u8 selection) { - if (gMain.newKeys & DPAD_RIGHT) + if (JOY_NEW(DPAD_RIGHT)) { if (selection < WINDOW_FRAMES_COUNT - 1) selection++; @@ -532,7 +532,7 @@ static u8 FrameType_ProcessInput(u8 selection) LoadPalette(GetWindowFrameTilesPal(selection)->pal, 0x70, 0x20); sArrowPressed = TRUE; } - if (gMain.newKeys & DPAD_LEFT) + if (JOY_NEW(DPAD_LEFT)) { if (selection != 0) selection--; @@ -579,7 +579,7 @@ static void FrameType_DrawChoices(u8 selection) static u8 ButtonMode_ProcessInput(u8 selection) { - if (gMain.newKeys & DPAD_RIGHT) + if (JOY_NEW(DPAD_RIGHT)) { if (selection <= 1) selection++; @@ -588,7 +588,7 @@ static u8 ButtonMode_ProcessInput(u8 selection) sArrowPressed = TRUE; } - if (gMain.newKeys & DPAD_LEFT) + if (JOY_NEW(DPAD_LEFT)) { if (selection != 0) selection--; |