diff options
Diffstat (limited to 'src/engine/main_menu.c')
-rw-r--r-- | src/engine/main_menu.c | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/src/engine/main_menu.c b/src/engine/main_menu.c index 909b5676b..623969802 100644 --- a/src/engine/main_menu.c +++ b/src/engine/main_menu.c @@ -234,7 +234,7 @@ u32 InitMainMenu(u8 a1) ResetSpriteData(); FreeAllSpritePalettes(); SetUpWindowConfig(&gWindowConfig_81E6C3C); - InitMenuWindow((struct WindowConfig *)&gWindowConfig_81E6CE4); + InitMenuWindow((struct WindowTemplate *)&gWindowConfig_81E6CE4); if (a1) BeginNormalPaletteFade(-1, 0, 0x10, 0, 0x0000); // fade to black @@ -293,7 +293,7 @@ void Task_MainMenuCheckSave(u8 taskId) gTasks[taskId].func = Task_MainMenuCheckRtc; break; case 2: - MenuDrawTextWindow(2, 14, 27, 19); + Menu_DrawStdWindowFrame(2, 14, 27, 19); MenuPrintMessage(gSaveFileDeletedMessage, 3, 15); REG_WIN0H = WIN_RANGE(17, 223); REG_WIN0V = WIN_RANGE(113, 159); @@ -301,7 +301,7 @@ void Task_MainMenuCheckSave(u8 taskId) gTasks[taskId].func = Task_MainMenuWaitForSaveErrorAck; break; case 255: - MenuDrawTextWindow(2, 14, 27, 19); + Menu_DrawStdWindowFrame(2, 14, 27, 19); MenuPrintMessage(gSaveFileCorruptMessage, 3, 15); REG_WIN0H = WIN_RANGE(17, 223); REG_WIN0V = WIN_RANGE(113, 159); @@ -319,7 +319,7 @@ void Task_MainMenuCheckSave(u8 taskId) gTasks[taskId].func = Task_MainMenuCheckRtc; break; case 4: - MenuDrawTextWindow(2, 14, 27, 19); + Menu_DrawStdWindowFrame(2, 14, 27, 19); MenuPrintMessage(gBoardNotInstalledMessage, 3, 15); REG_WIN0H = WIN_RANGE(17, 223); REG_WIN0V = WIN_RANGE(113, 159); @@ -331,11 +331,11 @@ void Task_MainMenuCheckSave(u8 taskId) void Task_MainMenuWaitForSaveErrorAck(u8 taskId) { - if (MenuUpdateWindowText()) + if (Menu_UpdateWindowText()) { if (gMain.newKeys & A_BUTTON) { - MenuZeroFillWindowRect(2, 14, 27, 19); + Menu_EraseWindowRect(2, 14, 27, 19); gTasks[taskId].func = Task_MainMenuCheckRtc; } } @@ -359,7 +359,7 @@ void Task_MainMenuCheckRtc(u8 taskId) } else { - MenuDrawTextWindow(2, 14, 27, 19); + Menu_DrawStdWindowFrame(2, 14, 27, 19); MenuPrintMessage(gBatteryDryMessage, 3, 15); REG_WIN0H = WIN_RANGE(17, 223); REG_WIN0V = WIN_RANGE(113, 159); @@ -370,11 +370,11 @@ void Task_MainMenuCheckRtc(u8 taskId) void Task_MainMenuWaitForRtcErrorAck(u8 taskId) { - if (MenuUpdateWindowText()) + if (Menu_UpdateWindowText()) { if ( gMain.newKeys & 1 ) { - MenuZeroFillWindowRect(2, 14, 27, 19); + Menu_EraseWindowRect(2, 14, 27, 19); gTasks[taskId].func = Task_MainMenuDraw; } } @@ -412,28 +412,28 @@ void Task_MainMenuDraw(u8 taskId) { case HAS_NO_SAVED_GAME: default: - MenuDrawTextWindow(1, 0, 28, 3); + Menu_DrawStdWindowFrame(1, 0, 28, 3); PrintMainMenuItem(gMainMenuString_NewGame, 2, 1); - MenuDrawTextWindow(1, 4, 28, 7); + Menu_DrawStdWindowFrame(1, 4, 28, 7); PrintMainMenuItem(gMainMenuString_Option, 2, 5); break; case HAS_SAVED_GAME: - MenuDrawTextWindow(1, 0, 28, 7); + Menu_DrawStdWindowFrame(1, 0, 28, 7); PrintMainMenuItem(gMainMenuString_Continue, 2, 1); - MenuDrawTextWindow(1, 8, 28, 11); + Menu_DrawStdWindowFrame(1, 8, 28, 11); PrintMainMenuItem(gMainMenuString_NewGame, 2, 9); - MenuDrawTextWindow(1, 12, 28, 15); + Menu_DrawStdWindowFrame(1, 12, 28, 15); PrintMainMenuItem(gMainMenuString_Option, 2, 13); PrintSaveFileInfo(); break; case HAS_MYSTERY_GIFT: - MenuDrawTextWindow(1, 0, 28, 7); + Menu_DrawStdWindowFrame(1, 0, 28, 7); PrintMainMenuItem(gMainMenuString_Continue, 2, 1); - MenuDrawTextWindow(1, 8, 28, 11); + Menu_DrawStdWindowFrame(1, 8, 28, 11); PrintMainMenuItem(gMainMenuString_NewGame, 2, 9); - MenuDrawTextWindow(1, 12, 28, 15); + Menu_DrawStdWindowFrame(1, 12, 28, 15); PrintMainMenuItem(gMainMenuString_MysteryEvents, 2, 13); - MenuDrawTextWindow(1, 16, 28, 19); + Menu_DrawStdWindowFrame(1, 16, 28, 19); PrintMainMenuItem(gMainMenuString_Option, 2, 0x11); PrintSaveFileInfo(); break; @@ -681,7 +681,7 @@ void PrintMainMenuItem(const u8 *text, u8 left, u8 top) buffer[29] = EOS; - MenuPrint(buffer, left, top); + Menu_PrintText(buffer, left, top); } void PrintSaveFileInfo(void) @@ -694,8 +694,8 @@ void PrintSaveFileInfo(void) void PrintPlayerName(void) { - MenuPrint(gMainMenuString_Player, 2, 3); - MenuPrint(gSaveBlock2.playerName, 9, 3); + Menu_PrintText(gMainMenuString_Player, 2, 3); + Menu_PrintText(gSaveBlock2.playerName, 9, 3); } void PrintPlayTime(void) @@ -704,15 +704,15 @@ void PrintPlayTime(void) u8 alignedPlayTime[32]; #if defined(ENGLISH) - MenuPrint(gMainMenuString_Time, 16, 3); + Menu_PrintText(gMainMenuString_Time, 16, 3); FormatPlayTime(playTime, gSaveBlock2.playTimeHours, gSaveBlock2.playTimeMinutes, 1); sub_8072C74(alignedPlayTime, playTime, 48, 1); - MenuPrint(alignedPlayTime, 22, 3); + Menu_PrintText(alignedPlayTime, 22, 3); #elif defined(GERMAN) MenuPrint_PixelCoords(gMainMenuString_Time, 124, 24, TRUE); FormatPlayTime(playTime, gSaveBlock2.playTimeHours, gSaveBlock2.playTimeMinutes, 1); sub_8072C74(alignedPlayTime, playTime, 40, 1); - MenuPrint(alignedPlayTime, 23, 3); + Menu_PrintText(alignedPlayTime, 23, 3); #endif } @@ -720,9 +720,9 @@ void PrintPokedexCount(void) { u8 buffer[16]; - MenuPrint(gMainMenuString_Pokedex, 2, 5); + Menu_PrintText(gMainMenuString_Pokedex, 2, 5); sub_8072C14(buffer, GetPokedexSeenCount(), 18, 0); - MenuPrint(buffer, 9, 5); + Menu_PrintText(buffer, 9, 5); } void PrintBadgeCount(void) @@ -730,7 +730,7 @@ void PrintBadgeCount(void) u8 buffer[16]; #if defined(ENGLISH) - MenuPrint(gMainMenuString_Badges, 16, 5); + Menu_PrintText(gMainMenuString_Badges, 16, 5); #elif defined(GERMAN) MenuPrint_PixelCoords(gMainMenuString_Badges, 124, 40, TRUE); #endif @@ -751,7 +751,7 @@ void PrintBadgeCount(void) static void Task_NewGameSpeech1(u8 taskId) { SetUpWindowConfig(&gWindowConfig_81E6C3C); - InitMenuWindow((struct WindowConfig *)&gWindowConfig_81E6CE4); + InitMenuWindow((struct WindowTemplate *)&gWindowConfig_81E6CE4); REG_WIN0H = 0; REG_WIN0V = 0; REG_WININ = 0; @@ -812,7 +812,7 @@ static void Task_NewGameSpeech3(u8 taskId) } else { - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); //"Hi! Sorry to keep you waiting... //...But everyone calls me the POKEMON PROFESSOR." MenuPrintMessage(gBirchSpeech_Welcome, 3, 14); @@ -886,7 +886,7 @@ static void Task_NewGameSpeech9(u8 taskId) { if (BirchSpeechUpdateWindowText()) { - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); //"And you are?" MenuPrintMessage(gBirchSpeech_AndYouAre, 3, 14); gTasks[taskId].func = Task_NewGameSpeech10; @@ -962,7 +962,7 @@ static void Task_NewGameSpeech13(u8 taskId) static void Task_NewGameSpeech14(u8 taskId) { - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); //"Are you a boy? Or are you a girl?" MenuPrintMessage(gBirchSpeech_AreYouBoyOrGirl, 3, 14); gTasks[taskId].func = Task_NewGameSpeech15; @@ -988,19 +988,19 @@ static void Task_NewGameSpeech16(u8 taskId) HandleDestroyMenuCursors(); PlaySE(SE_SELECT); gSaveBlock2.playerGender = MALE; - MenuZeroFillWindowRect(2, 4, 8, 9); + Menu_EraseWindowRect(2, 4, 8, 9); gTasks[taskId].func = Task_NewGameSpeech19; break; case FEMALE: HandleDestroyMenuCursors(); PlaySE(SE_SELECT); gSaveBlock2.playerGender = FEMALE; - MenuZeroFillWindowRect(2, 4, 8, 9); + Menu_EraseWindowRect(2, 4, 8, 9); gTasks[taskId].func = Task_NewGameSpeech19; break; } - cursorPos = GetMenuCursorPos(); + cursorPos = Menu_GetCursorPos(); if (cursorPos != gTasks[taskId].tGenderSelection) { @@ -1062,7 +1062,7 @@ static void Task_NewGameSpeech18(u8 taskId) static void Task_NewGameSpeech19(u8 taskId) { - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); //"All right. What's your name?" MenuPrintMessage(gBirchSpeech_WhatsYourName, 3, 14); gTasks[taskId].func = Task_NewGameSpeech20; @@ -1090,7 +1090,7 @@ static void Task_NewGameSpeech21(u8 taskId) case 4: HandleDestroyMenuCursors(); PlaySE(SE_SELECT); - MenuZeroFillWindowRect(2, 1, 22, 12); + Menu_EraseWindowRect(2, 1, 22, 12); SetPresetPlayerName(selection); gTasks[taskId].func = Task_NewGameSpeech23; break; @@ -1102,7 +1102,7 @@ static void Task_NewGameSpeech21(u8 taskId) case -1: //B button HandleDestroyMenuCursors(); PlaySE(SE_SELECT); - MenuZeroFillWindowRect(2, 1, 22, 12); + Menu_EraseWindowRect(2, 1, 22, 12); gTasks[taskId].func = Task_NewGameSpeech14; //Go back to gender menu break; } @@ -1120,7 +1120,7 @@ static void Task_NewGameSpeech22(u8 taskId) static void Task_NewGameSpeech23(u8 taskId) { - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); //"So it's (PLAYER)?" StringExpandPlaceholders(gStringVar4, gBirchSpeech_SoItsPlayer); MenuPrintMessage(gStringVar4, 3, 14); @@ -1143,7 +1143,7 @@ static void Task_NewGameSpeech25(u8 taskId) { case 0: //YES PlaySE(SE_SELECT); - MenuZeroFillWindowRect(2, 1, 8, 7); + Menu_EraseWindowRect(2, 1, 8, 7); gSprites[gTasks[taskId].tTrainerSpriteId].oam.objMode = ST_OAM_OBJ_BLEND; StartSpriteFadeOut(taskId, 2); StartBackgroundFadeOut(taskId, 1); @@ -1152,7 +1152,7 @@ static void Task_NewGameSpeech25(u8 taskId) case -1: //B button case 1: //NO PlaySE(SE_SELECT); - MenuZeroFillWindowRect(2, 1, 8, 7); + Menu_EraseWindowRect(2, 1, 8, 7); gTasks[taskId].func = Task_NewGameSpeech14; //Go back to gender menu break; } @@ -1197,7 +1197,7 @@ static void Task_NewGameSpeech27(u8 taskId) StartSpriteFadeIn(taskId, 2); StartBackgroundFadeIn(taskId, 1); - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); StringExpandPlaceholders(gStringVar4, gBirchSpeech_AhOkayYouArePlayer); //"Ah, okay! You're (PLAYER) who's moving... //...I get it now!" @@ -1267,7 +1267,7 @@ static void Task_NewGameSpeech29(u8 taskId) StartSpriteFadeIn(taskId, 2); StartBackgroundFadeIn(taskId, 1); - MenuDrawTextWindow(2, 13, 27, 18); + Menu_DrawStdWindowFrame(2, 13, 27, 18); MenuPrintMessage(gBirchSpeech_AreYouReady, 3, 14); gTasks[taskId].func = Task_NewGameSpeech30; } @@ -1374,7 +1374,7 @@ void CB_ContinueNewGameSpeechPart2() AddBirchSpeechObjects(taskId); SetUpWindowConfig(&gWindowConfig_81E6C3C); - InitMenuWindow((struct WindowConfig *)&gWindowConfig_81E6CE4); + InitMenuWindow((struct WindowTemplate *)&gWindowConfig_81E6CE4); if (gSaveBlock2.playerGender != MALE) { @@ -1661,7 +1661,7 @@ static void StartBackgroundFadeIn(u8 taskId, u8 interval) static void CreateGenderMenu(u8 left, u8 top) { u8 menuLeft, menuTop; - MenuDrawTextWindow(left, top, left + 6, top + 5); + Menu_DrawStdWindowFrame(left, top, left + 6, top + 5); menuLeft = left + 1; menuTop = top + 1; PrintMenuItems(menuLeft, menuTop, 2, gUnknown_081E79B0); @@ -1670,12 +1670,12 @@ static void CreateGenderMenu(u8 left, u8 top) static s8 GenderMenuProcessInput(void) { - return ProcessMenuInputNoWrap(); + return Menu_ProcessInputNoWrap(); } static void CreateNameMenu(u8 left, u8 top) { - MenuDrawTextWindow(left, top, left + 10, top + 11); + Menu_DrawStdWindowFrame(left, top, left + 10, top + 11); if (gSaveBlock2.playerGender == MALE) PrintMenuItems(left + 1, top + 1, 5, gMalePresetNames); @@ -1687,7 +1687,7 @@ static void CreateNameMenu(u8 left, u8 top) static s8 NameMenuProcessInput(void) { - return ProcessMenuInput(); + return Menu_ProcessInput(); } static void SetPresetPlayerName(u8 index) |