From ca950a8daf6dd95ab5dacc51f250fea7b605361c Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Mon, 2 Nov 2020 22:18:26 -0300 Subject: [PATCH] Solve merge conflicts from previous commit --- gflib/text.c | 2 +- src/menu.c | 8 ++++---- src/pokenav_conditions_1.c | 8 ++++---- src/pokenav_conditions_3.c | 2 +- src/pokenav_menu_handler_1.c | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gflib/text.c b/gflib/text.c index 30c142fa88..4cbad13766 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -783,7 +783,7 @@ bool16 TextPrinterWait(struct TextPrinter *textPrinter) } else { - if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + if (JOY_NEW(A_BUTTON | B_BUTTON)) { result = TRUE; PlaySE(SE_SELECT); diff --git a/src/menu.c b/src/menu.c index 1a040cafc4..339106bfd1 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1069,23 +1069,23 @@ s8 Menu_ProcessInputNoWrapAround_other(void) { u8 oldPos = sMenu.cursorPos; - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { if (!sMenu.APressMuted) PlaySE(SE_SELECT); return sMenu.cursorPos; } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { return MENU_B_PRESSED; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_UP) { if (oldPos != Menu_MoveCursorNoWrapAround(-1)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN) { if (oldPos != Menu_MoveCursorNoWrapAround(1)) PlaySE(SE_SELECT); diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 77d982d85b..c27cd410c6 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -88,13 +88,13 @@ u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr) if (ret == PARTY_CONDITION_FUNC_NONE) { - if (gMain.newKeys & B_BUTTON) + if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); structPtr->callback = GetConditionReturnCallback; ret = PARTY_CONDITION_FUNC_RETURN; } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { if (structPtr->searchMode == 0) { @@ -165,7 +165,7 @@ u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); u8 ret = 0; - if (gMain.heldKeys & DPAD_UP) + if (JOY_HELD(DPAD_UP)) { if (structPtr->searchMode == 0 || monListPtr->currIndex != 0) { @@ -173,7 +173,7 @@ u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) ret = SwitchConditionSummaryIndex(1); } } - else if (gMain.heldKeys & DPAD_DOWN) + else if (JOY_HELD(DPAD_DOWN)) { if (structPtr->searchMode == 0 || monListPtr->currIndex < monListPtr->listCount - 1) { diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index c4beb924c2..d02d844d0d 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -196,7 +196,7 @@ static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr) structPtr->callback = ReturnToConditionSearchList; return CONDITION_SEARCH_FUNC_EXIT; } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { structPtr->monList->currIndex = GetSelectedPokenavListIndex(); structPtr->isPartyCondition = 1; diff --git a/src/pokenav_menu_handler_1.c b/src/pokenav_menu_handler_1.c index c3a878b3f7..4792756c18 100644 --- a/src/pokenav_menu_handler_1.c +++ b/src/pokenav_menu_handler_1.c @@ -263,7 +263,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state) if (UpdateMenuCursorPos(state)) return POKENAV_MENU_FUNC_MOVE_CURSOR; - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { if (sMenuItems[state->menuType][state->cursorPos] == POKENAV_MENUITEM_MATCH_CALL) { @@ -278,7 +278,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state) } } - if (gMain.newKeys & B_BUTTON) + if (JOY_NEW(B_BUTTON)) { PlaySE(SE_FAILURE); return POKENAV_MENU_FUNC_NONE; @@ -293,7 +293,7 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state) if (UpdateMenuCursorPos(state)) return POKENAV_MENU_FUNC_MOVE_CURSOR; - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { u32 menuItem = sMenuItems[state->menuType][state->cursorPos]; if (menuItem != POKENAV_MENUITEM_MATCH_CALL && menuItem != POKENAV_MENUITEM_SWITCH_OFF) @@ -343,7 +343,7 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state) if (UpdateMenuCursorPos(state)) return POKENAV_MENU_FUNC_MOVE_CURSOR; - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { switch (sMenuItems[state->menuType][state->cursorPos]) { @@ -387,7 +387,7 @@ static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state) if (UpdateMenuCursorPos(state)) return POKENAV_MENU_FUNC_MOVE_CURSOR; - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { u8 menuItem = sMenuItems[state->menuType][state->cursorPos]; if (menuItem != POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL)