diff --git a/src/berry_blender.c b/src/berry_blender.c index 140d1042eb..c05f4c761b 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -2676,7 +2676,7 @@ static void CB2_EndBlenderGame(void) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 1: - case -1: + case MENU_B_PRESSED: sBerryBlender->yesNoAnswer = 1; sBerryBlender->gameEndState++; for (i = 0; i < BLENDER_MAX_PLAYERS; i++) diff --git a/src/clear_save_data_screen.c b/src/clear_save_data_screen.c index 9b79b48f1f..ed5461d918 100644 --- a/src/clear_save_data_screen.c +++ b/src/clear_save_data_screen.c @@ -95,7 +95,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId) gTasks[taskId].func = Task_ClearSaveData; break; case 1: - case -1: + case MENU_B_PRESSED: PlaySE(SE_SELECT); DestroyTask(taskId); SetMainCallback2(CB2_FadeAndDoReset); diff --git a/src/data/union_room.h b/src/data/union_room.h index 533425fa85..129c629941 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -930,7 +930,7 @@ static const struct WindowTemplate sWindowTemplate_TradingBoardMain = { }; static const struct ListMenuItem sTradeBoardListMenuItems[] = { - { sText_EmptyString, -3 }, + { sText_EmptyString, LIST_HEADER }, { sText_EmptyString, 0 }, { sText_EmptyString, 1 }, { sText_EmptyString, 2 }, diff --git a/src/main_menu.c b/src/main_menu.c index 5b18e440a6..7d9bb9a6c8 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -1631,7 +1631,7 @@ static void Task_NewGameBirchSpeech_ProcessNameYesNoMenu(u8 taskId) NewGameBirchSpeech_StartFadePlatformIn(taskId, 1); gTasks[taskId].func = Task_NewGameBirchSpeech_SlidePlatformAway2; break; - case -1: + case MENU_B_PRESSED: case 1: PlaySE(SE_SELECT); gTasks[taskId].func = Task_NewGameBirchSpeech_BoyOrGirl; diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 50b8ff7e80..92644810d9 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -1538,7 +1538,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg 0, 15 * i, color, - -1, + TEXT_SKIP_DRAW, sLvlUpStatStrings[i]); StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash); @@ -1547,7 +1547,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg 56, 15 * i, color, - -1, + TEXT_SKIP_DRAW, text); if (abs(statsDiff[i]) <= 9) x = 18; @@ -1560,7 +1560,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg 56 + x, 15 * i, color, - -1, + TEXT_SKIP_DRAW, text); } } @@ -1602,7 +1602,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s 0, 15 * i, color, - -1, + TEXT_SKIP_DRAW, sLvlUpStatStrings[i]); AddTextPrinterParameterized3(windowId, @@ -1610,7 +1610,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s 56 + x, 15 * i, color, - -1, + TEXT_SKIP_DRAW, text); } } diff --git a/src/move_relearner.c b/src/move_relearner.c index d9c943b576..3c8b06a785 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -553,7 +553,7 @@ static void DoMoveRelearnerMain(void) gSpecialVar_0x8004 = FALSE; sMoveRelearnerStruct->state = MENU_STATE_FADE_AND_RETURN; } - else if (selection == -1 || selection == 1) + else if (selection == MENU_B_PRESSED || selection == 1) { if (sMoveRelearnerMenuSate.showContestInfo == FALSE) { @@ -579,14 +579,14 @@ static void DoMoveRelearnerMain(void) break; case MENU_STATE_CONFIRM_DELETE_OLD_MOVE: { - s8 var = Menu_ProcessInputNoWrapClearOnChoose(); + s8 selection = Menu_ProcessInputNoWrapClearOnChoose(); - if (var == 0) + if (selection == 0) { FormatAndPrintText(gText_MoveRelearnerWhichMoveToForget); sMoveRelearnerStruct->state = MENU_STATE_PRINT_WHICH_MOVE_PROMPT; } - else if (var == -1 || var == 1) + else if (selection == MENU_B_PRESSED || selection == 1) { sMoveRelearnerStruct->state = MENU_STATE_PRINT_STOP_TEACHING; } @@ -606,13 +606,13 @@ static void DoMoveRelearnerMain(void) break; case MENU_STATE_CONFIRM_STOP_TEACHING: { - s8 var = Menu_ProcessInputNoWrapClearOnChoose(); + s8 selection = Menu_ProcessInputNoWrapClearOnChoose(); - if (var == 0) + if (selection == 0) { sMoveRelearnerStruct->state = MENU_STATE_CHOOSE_SETUP_STATE; } - else if (var == MENU_B_PRESSED || var == 1) + else if (selection == MENU_B_PRESSED || selection == 1) { // What's the point? It gets set to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT, anyway. if (sMoveRelearnerMenuSate.showContestInfo == FALSE) diff --git a/src/secret_base.c b/src/secret_base.c index 6344fb7ed4..1a4a0ac9cd 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -953,7 +953,7 @@ static void BuildRegistryMenuItems(u8 taskId) } sRegistryMenu->items[count].name = gText_Cancel; - sRegistryMenu->items[count].id = -2; + sRegistryMenu->items[count].id = LIST_CANCEL; tNumBases = count + 1; if (tNumBases < 8) tMaxShownItems = tNumBases; diff --git a/src/start_menu.c b/src/start_menu.c index 7489f09d69..2590ee828f 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -996,7 +996,7 @@ static u8 SaveConfirmInputCallback(void) sSaveDialogCallback = SaveFileExistsCallback; return SAVE_IN_PROGRESS; } - case -1: // B Button + case MENU_B_PRESSED: case 1: // No HideSaveInfoWindow(); HideSaveMessageWindow(); @@ -1042,7 +1042,7 @@ static u8 SaveOverwriteInputCallback(void) case 0: // Yes sSaveDialogCallback = SaveSavingMessageCallback; return SAVE_IN_PROGRESS; - case -1: // B Button + case MENU_B_PRESSED: case 1: // No HideSaveInfoWindow(); HideSaveMessageWindow(); @@ -1161,7 +1161,7 @@ static u8 BattlePyramidRetireInputCallback(void) { case 0: // Yes return SAVE_CANCELED; - case -1: // B Button + case MENU_B_PRESSED: case 1: // No HideSaveMessageWindow(); return SAVE_SUCCESS; diff --git a/src/union_room_chat.c b/src/union_room_chat.c index e1ca7c0b0d..eb902fbe68 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1171,7 +1171,7 @@ static void Chat_AskQuitChatting(void) input = ProcessMenuInput(); switch (input) { - case -1: + case MENU_B_PRESSED: case 1: StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0); sChat->funcState = 3; @@ -1210,7 +1210,7 @@ static void Chat_AskQuitChatting(void) input = ProcessMenuInput(); switch (input) { - case -1: + case MENU_B_PRESSED: case 1: StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0); sChat->funcState = 3; @@ -1512,7 +1512,7 @@ static void Chat_SaveAndExit(void) input = ProcessMenuInput(); switch (input) { - case -1: + case MENU_B_PRESSED: case 1: sChat->funcState = 12; break; @@ -1537,7 +1537,7 @@ static void Chat_SaveAndExit(void) input = ProcessMenuInput(); switch (input) { - case -1: + case MENU_B_PRESSED: case 1: sChat->funcState = 12; break;