From 7dc95a0103af08c95c9093b6efa6c77af77a2538 Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Sun, 13 Sep 2020 04:22:50 -0300 Subject: Undo PokeCodec's PRs This commit undoes most of PokeCodec's PRs after the debate in chat. Some harmless or completely superseded PRs have been left alone, as there is not much benefit in attempting to undo them. Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136, #1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179, #1180, #1181, #1182 and #1183. --- src/menu_helpers.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/menu_helpers.c') diff --git a/src/menu_helpers.c b/src/menu_helpers.c index c80e52d27..69443d309 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -183,7 +183,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) { s16 valBefore = (*arg0); - if (JOY_REPEAT(DPAD_ANY) == DPAD_UP) + if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) { (*arg0)++; if ((*arg0) > arg1) @@ -199,7 +199,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return TRUE; } } - else if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) { (*arg0)--; if ((*arg0) <= 0) @@ -215,7 +215,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return TRUE; } } - else if (JOY_REPEAT(DPAD_ANY) == DPAD_RIGHT) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT) { (*arg0) += 10; if ((*arg0) > arg1) @@ -231,7 +231,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return TRUE; } } - else if (JOY_REPEAT(DPAD_ANY) == DPAD_LEFT) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT) { (*arg0) -= 10; if ((*arg0) <= 0) @@ -255,9 +255,9 @@ u8 GetLRKeysPressed(void) { if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { - if (JOY_NEW(L_BUTTON)) + if (gMain.newKeys & L_BUTTON) return MENU_L_PRESSED; - if (JOY_NEW(R_BUTTON)) + if (gMain.newKeys & R_BUTTON) return MENU_R_PRESSED; } @@ -268,9 +268,9 @@ u8 GetLRKeysPressedAndHeld(void) { if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { - if (JOY_REPEAT(L_BUTTON)) + if (gMain.newAndRepeatedKeys & L_BUTTON) return MENU_L_PRESSED; - if (JOY_REPEAT(R_BUTTON)) + if (gMain.newAndRepeatedKeys & R_BUTTON) return MENU_R_PRESSED; } -- cgit v1.2.3 From bacc831aa91d059936bd7c852bf0a0fb44d8f27a Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Mon, 2 Nov 2020 22:02:39 -0300 Subject: Re-apply joypad macros (minus merge conflicts) --- src/menu_helpers.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/menu_helpers.c') diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 69443d309..b31d84a1e 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -183,7 +183,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) { s16 valBefore = (*arg0); - if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + if ((JOY_REPEAT(DPAD_ANY)) == DPAD_UP) { (*arg0)++; if ((*arg0) > arg1) @@ -199,7 +199,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return TRUE; } } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_DOWN) { (*arg0)--; if ((*arg0) <= 0) @@ -215,7 +215,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return TRUE; } } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT) + else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_RIGHT) { (*arg0) += 10; if ((*arg0) > arg1) @@ -231,7 +231,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1) return TRUE; } } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT) + else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_LEFT) { (*arg0) -= 10; if ((*arg0) <= 0) @@ -255,9 +255,9 @@ u8 GetLRKeysPressed(void) { if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { - if (gMain.newKeys & L_BUTTON) + if (JOY_NEW(L_BUTTON)) return MENU_L_PRESSED; - if (gMain.newKeys & R_BUTTON) + if (JOY_NEW(R_BUTTON)) return MENU_R_PRESSED; } @@ -268,9 +268,9 @@ u8 GetLRKeysPressedAndHeld(void) { if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { - if (gMain.newAndRepeatedKeys & L_BUTTON) + if (JOY_REPEAT(L_BUTTON)) return MENU_L_PRESSED; - if (gMain.newAndRepeatedKeys & R_BUTTON) + if (JOY_REPEAT(R_BUTTON)) return MENU_R_PRESSED; } -- cgit v1.2.3