From eba7933c0cdfbd9359123554315ab03f6e09deee Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 4 Jan 2021 19:50:05 -0500 Subject: [PATCH] Remove unnecessary subtraction in switch --- src/party_menu.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index f045a9a47..74a23cc93 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1221,16 +1221,16 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) } else { - switch (gPartyMenu.action - 3) + switch (gPartyMenu.action) { - case PARTY_ACTION_SOFTBOILED - 3: + case PARTY_ACTION_SOFTBOILED: if (IsSelectedMonNotEgg((u8*)slotPtr)) { PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); Task_TryUseSoftboiledOnPartyMon(taskId); } break; - case PARTY_ACTION_USE_ITEM - 3: + case PARTY_ACTION_USE_ITEM: if (IsSelectedMonNotEgg((u8*)slotPtr)) { if (gPartyMenu.menuType == PARTY_MENU_TYPE_IN_BATTLE) @@ -1240,7 +1240,7 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) gItemUseCB(taskId, Task_ClosePartyMenuAfterText); } break; - case PARTY_ACTION_MOVE_TUTOR - 3: + case PARTY_ACTION_MOVE_TUTOR: if (IsSelectedMonNotEgg((u8*)slotPtr)) { PlaySE(SE_SELECT); @@ -1248,7 +1248,7 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) TryTutorSelectedMon(taskId); } break; - case PARTY_ACTION_GIVE_MAILBOX_MAIL - 3: + case PARTY_ACTION_GIVE_MAILBOX_MAIL: if (IsSelectedMonNotEgg((u8*)slotPtr)) { PlaySE(SE_SELECT); @@ -1256,8 +1256,8 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) TryGiveMailToSelectedMon(taskId); } break; - case PARTY_ACTION_GIVE_ITEM - 3: - case PARTY_ACTION_GIVE_PC_ITEM - 3: + case PARTY_ACTION_GIVE_ITEM: + case PARTY_ACTION_GIVE_PC_ITEM: if (IsSelectedMonNotEgg((u8*)slotPtr)) { PlaySE(SE_SELECT); @@ -1265,23 +1265,23 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) TryGiveItemOrMailToSelectedMon(taskId); } break; - case PARTY_ACTION_SWITCH - 3: + case PARTY_ACTION_SWITCH: PlaySE(SE_SELECT); SwitchSelectedMons(taskId); break; - case PARTY_ACTION_CHOOSE_AND_CLOSE - 3: + case PARTY_ACTION_CHOOSE_AND_CLOSE: PlaySE(SE_SELECT); Task_ClosePartyMenu(taskId); break; - case PARTY_ACTION_MINIGAME - 3: + case PARTY_ACTION_MINIGAME: if (IsSelectedMonNotEgg((u8*)slotPtr)) { TryEnterMonForMinigame(taskId, (u8)*slotPtr); } break; default: - case PARTY_ACTION_ABILITY_PREVENTS - 3: - case PARTY_ACTION_SWITCHING - 3: + case PARTY_ACTION_ABILITY_PREVENTS: + case PARTY_ACTION_SWITCHING: PlaySE(SE_SELECT); Task_TryCreateSelectionWindow(taskId); break;