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/start_menu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/start_menu.c') diff --git a/src/start_menu.c b/src/start_menu.c index fa51766e8..6a90946fe 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -462,7 +462,7 @@ static bool32 InitStartMenuStep(void) sInitStartMenuData[0]++; break; case 4: - if (PrintStartMenuActions((s8 *)&sInitStartMenuData[1], 2)) + if (PrintStartMenuActions(&sInitStartMenuData[1], 2)) sInitStartMenuData[0]++; break; case 5: @@ -550,19 +550,19 @@ void ShowStartMenu(void) static bool8 HandleStartMenuInput(void) { - if (JOY_NEW(DPAD_UP)) + if (gMain.newKeys & DPAD_UP) { PlaySE(SE_SELECT); sStartMenuCursorPos = Menu_MoveCursor(-1); } - if (JOY_NEW(DPAD_DOWN)) + if (gMain.newKeys & DPAD_DOWN) { PlaySE(SE_SELECT); sStartMenuCursorPos = Menu_MoveCursor(1); } - if (JOY_NEW(A_BUTTON)) + if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); if (sStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].func.u8_void == StartMenuPokedexCallback) @@ -584,7 +584,7 @@ static bool8 HandleStartMenuInput(void) return FALSE; } - if (JOY_NEW(START_BUTTON | B_BUTTON)) + if (gMain.newKeys & (START_BUTTON | B_BUTTON)) { RemoveExtraStartMenuWindows(); HideStartMenu(); @@ -906,12 +906,12 @@ static bool8 SaveSuccesTimer(void) { sSaveDialogTimer--; - if (JOY_HELD(A_BUTTON)) + if (gMain.heldKeys & A_BUTTON) { PlaySE(SE_SELECT); return TRUE; } - if (sSaveDialogTimer == 0) + else if (sSaveDialogTimer == 0) { return TRUE; } @@ -925,7 +925,7 @@ static bool8 SaveErrorTimer(void) { sSaveDialogTimer--; } - else if (JOY_HELD(A_BUTTON)) + else if (gMain.heldKeys & A_BUTTON) { return TRUE; } -- 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/start_menu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/start_menu.c') diff --git a/src/start_menu.c b/src/start_menu.c index 6a90946fe..35eb53475 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -550,19 +550,19 @@ void ShowStartMenu(void) static bool8 HandleStartMenuInput(void) { - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { PlaySE(SE_SELECT); sStartMenuCursorPos = Menu_MoveCursor(-1); } - if (gMain.newKeys & DPAD_DOWN) + if (JOY_NEW(DPAD_DOWN)) { PlaySE(SE_SELECT); sStartMenuCursorPos = Menu_MoveCursor(1); } - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); if (sStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].func.u8_void == StartMenuPokedexCallback) @@ -584,7 +584,7 @@ static bool8 HandleStartMenuInput(void) return FALSE; } - if (gMain.newKeys & (START_BUTTON | B_BUTTON)) + if (JOY_NEW(START_BUTTON | B_BUTTON)) { RemoveExtraStartMenuWindows(); HideStartMenu(); @@ -906,12 +906,12 @@ static bool8 SaveSuccesTimer(void) { sSaveDialogTimer--; - if (gMain.heldKeys & A_BUTTON) + if (JOY_HELD(A_BUTTON)) { PlaySE(SE_SELECT); return TRUE; } - else if (sSaveDialogTimer == 0) + if (sSaveDialogTimer == 0) { return TRUE; } @@ -925,7 +925,7 @@ static bool8 SaveErrorTimer(void) { sSaveDialogTimer--; } - else if (gMain.heldKeys & A_BUTTON) + else if (JOY_HELD(A_BUTTON)) { return TRUE; } -- cgit v1.2.3