From 0bd1b5d8a7dea70e31b2cb4251ce6a336fb090d2 Mon Sep 17 00:00:00 2001 From: RavePossum Date: Mon, 4 Nov 2024 13:46:31 -0500 Subject: [PATCH] Summary screen - button prompt window name --- .../pokemon_summary_screen/main.h | 2 +- .../pokemon_summary_screen/window.h | 2 +- .../pokemon_summary_screen/main.c | 38 +++++++++---------- .../pokemon_summary_screen/window.c | 32 ++++++++-------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/include/applications/pokemon_summary_screen/main.h b/include/applications/pokemon_summary_screen/main.h index 0508eba126..c176731e89 100644 --- a/include/applications/pokemon_summary_screen/main.h +++ b/include/applications/pokemon_summary_screen/main.h @@ -129,7 +129,7 @@ enum PSSStaticWindow { PSS_WINDOW_ITEM_NAME, PSS_WINDOW_MON_LEVEL, PSS_WINDOW_MON_NICKNAME, - PSS_STATIC_WINDOW_35, + PSS_WINDOW_BUTTON_PROMPT, PSS_STATIC_WINDOW_MAX }; diff --git a/include/applications/pokemon_summary_screen/window.h b/include/applications/pokemon_summary_screen/window.h index 1e49662c0a..bbc49adbd1 100644 --- a/include/applications/pokemon_summary_screen/window.h +++ b/include/applications/pokemon_summary_screen/window.h @@ -10,7 +10,7 @@ void PokemonSummaryScreen_RemoveWindows(PokemonSummaryScreen *summaryScreen); void sub_0208FEA4(PokemonSummaryScreen *param0); void sub_0208FF3C(PokemonSummaryScreen *param0); void sub_0208FFE0(PokemonSummaryScreen *param0); -void PokemonSummaryScreen_ClearWindowAndPrintText(PokemonSummaryScreen *summaryScreen, u32 entryID); +void PokemonSummaryScreen_ClearAndPrintButtonPrompt(PokemonSummaryScreen *summaryScreen, u32 entryID); void sub_020904C4(PokemonSummaryScreen *param0); void PokemonSummaryScreen_PrintRibbonIndexAndMax(PokemonSummaryScreen *summaryScreen); void PokemonSummaryScreen_PrintRibbonNameAndDesc(PokemonSummaryScreen *summaryScreen); diff --git a/src/applications/pokemon_summary_screen/main.c b/src/applications/pokemon_summary_screen/main.c index 7cf6002d05..28630542a5 100644 --- a/src/applications/pokemon_summary_screen/main.c +++ b/src/applications/pokemon_summary_screen/main.c @@ -1585,7 +1585,7 @@ static u8 SetupBattleMoveInfo(PokemonSummaryScreen *summaryScreen) Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_MON_LEVEL]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_LABEL]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_NAME]); - Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, NULL); summaryScreen->cursor = 0; @@ -1605,8 +1605,8 @@ static u8 SetupBattleMoveInfo(PokemonSummaryScreen *summaryScreen) ShowMoveInfoOrCancel(summaryScreen); if (summaryScreen->data->mode != PSS_MODE_LOCK_MOVES) { - PokemonSummaryScreen_ClearWindowAndPrintText(summaryScreen, 152); - PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[35]); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, 152); + PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); } UpdateMoveInfo(summaryScreen); @@ -1633,7 +1633,7 @@ static u8 HideBattleMoveInfo(PokemonSummaryScreen *summaryScreen) SpriteActor_DrawSprite(summaryScreen->unk_41C[18], FALSE); SpriteActor_DrawSprite(summaryScreen->unk_41C[19], FALSE); CellActor_SetDrawFlag(summaryScreen->unk_41C[9], FALSE); - Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, NULL); HideMoveCancelText(summaryScreen); PokemonSummaryScreen_ClearBattleInfoWindows(summaryScreen); @@ -1653,9 +1653,9 @@ static u8 HideBattleMoveInfo(PokemonSummaryScreen *summaryScreen) Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_MON_LEVEL]); Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_LABEL]); Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_NAME]); - PokemonSummaryScreen_ClearWindowAndPrintText(summaryScreen, 129); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, 129); PokemonSummaryScreen_UpdatePageArrows(summaryScreen, TRUE); - PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[35]); + PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); return TRUE; } @@ -1793,7 +1793,7 @@ static u8 SetupContestMoveInfo(PokemonSummaryScreen *summaryScreen) Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_MON_LEVEL]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_LABEL]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_NAME]); - Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, NULL); summaryScreen->cursor = 0; summaryScreen->subscreen = 1; @@ -1812,8 +1812,8 @@ static u8 SetupContestMoveInfo(PokemonSummaryScreen *summaryScreen) ShowMoveInfoOrCancel(summaryScreen); if (summaryScreen->data->mode != PSS_MODE_LOCK_MOVES) { - PokemonSummaryScreen_ClearWindowAndPrintText(summaryScreen, 152); - PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[35]); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, 152); + PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); } UpdateMoveInfo(summaryScreen); @@ -1835,7 +1835,7 @@ static u8 HideContestMoveInfo(PokemonSummaryScreen *summaryScreen) SpriteActor_DrawSprite(summaryScreen->unk_41C[19], FALSE); UpdateAppealHearts(summaryScreen, PSS_MOVE_NONE); CellActor_SetDrawFlag(summaryScreen->unk_41C[9], FALSE); - Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, NULL); HideMoveCancelText(summaryScreen); PokemonSummaryScreen_ClearContestInfoWindows(summaryScreen); @@ -1855,9 +1855,9 @@ static u8 HideContestMoveInfo(PokemonSummaryScreen *summaryScreen) Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_MON_LEVEL]); Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_LABEL]); Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_NAME]); - PokemonSummaryScreen_ClearWindowAndPrintText(summaryScreen, 158); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, 158); PokemonSummaryScreen_UpdatePageArrows(summaryScreen, TRUE); - PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[35]); + PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); return TRUE; } @@ -1944,7 +1944,7 @@ static u8 SetupRibbonInfo(PokemonSummaryScreen *summaryScreen) Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_LABEL]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_NAME]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[30]); - Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[0]); PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, NULL); @@ -1963,8 +1963,8 @@ static u8 SetupRibbonInfo(PokemonSummaryScreen *summaryScreen) } } break; case 2: - PokemonSummaryScreen_ClearWindowAndPrintText(summaryScreen, 181); - PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[35]); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, 181); + PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); CellActor_SetDrawFlag(summaryScreen->unk_41C[67], TRUE); CellActor_SetDrawFlag(summaryScreen->unk_41C[70], TRUE); CellActor_SetDrawFlag(summaryScreen->unk_41C[63], FALSE); @@ -1988,7 +1988,7 @@ static u8 HideRibbonInfo(PokemonSummaryScreen *summaryScreen) Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[1]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[2]); Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[3]); - Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, NULL); sub_0208FA04(summaryScreen); summaryScreen->subscreen = 1; @@ -2007,11 +2007,11 @@ static u8 HideRibbonInfo(PokemonSummaryScreen *summaryScreen) Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_LABEL]); Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_ITEM_NAME]); Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[30]); - Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[0]); - PokemonSummaryScreen_ClearWindowAndPrintText(summaryScreen, 180); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, 180); PokemonSummaryScreen_UpdatePageArrows(summaryScreen, TRUE); - PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[35]); + PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); return TRUE; } diff --git a/src/applications/pokemon_summary_screen/window.c b/src/applications/pokemon_summary_screen/window.c index 7f3fac7ed4..e63933ff79 100644 --- a/src/applications/pokemon_summary_screen/window.c +++ b/src/applications/pokemon_summary_screen/window.c @@ -73,7 +73,7 @@ static const WindowTemplate sPSSStaticWindowTemplates[] = { [PSS_WINDOW_ITEM_NAME] = { 0x1, 0x1, 0x16, 0xC, 0x2, 0xF, 0x1F9 }, [PSS_WINDOW_MON_LEVEL] = { 0x1, 0x1, 0x5, 0x6, 0x2, 0xF, 0x211 }, [PSS_WINDOW_MON_NICKNAME] = { 0x1, 0x3, 0x3, 0x9, 0x2, 0xF, 0x21D }, - [PSS_STATIC_WINDOW_35] = { 0x1, 0x1A, 0x0, 0x6, 0x2, 0xF, 0x22F } + [PSS_WINDOW_BUTTON_PROMPT] = { 0x1, 0x1A, 0x0, 0x6, 0x2, 0xF, 0x22F } }; static const WindowTemplate Unk_020F4E20[] = { @@ -225,7 +225,7 @@ void PokemonSummaryScreen_RemoveWindows(PokemonSummaryScreen *summaryScreen) { PokemonSummaryScreen_RemoveExtraWindows(summaryScreen); - for (u32 i = 0; i < 36; i++) { // ravetodo magic number + for (u32 i = 0; i < PSS_STATIC_WINDOW_MAX; i++) { Window_Remove(&summaryScreen->staticWindows[i]); } } @@ -295,12 +295,12 @@ void sub_0208FFE0(PokemonSummaryScreen *param0) Window_ScheduleCopyToVRAM(¶m0->staticWindows[6]); Window_ScheduleCopyToVRAM(¶m0->staticWindows[32]); } -// ravetodo WHICH window -void PokemonSummaryScreen_ClearWindowAndPrintText(PokemonSummaryScreen *summaryScreen, u32 entryID) + +void PokemonSummaryScreen_ClearAndPrintButtonPrompt(PokemonSummaryScreen *summaryScreen, u32 entryID) { - Window_FillTilemap(&summaryScreen->staticWindows[35], 0); + Window_FillTilemap(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT], 0); sub_02090158(summaryScreen, 35, entryID, TEXT_COLOR(15, 14, 0), 0); - Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[35]); + Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); } static BOOL sub_02090098(PokemonSummaryScreen *param0) @@ -666,12 +666,12 @@ static void sub_02090CD4(PokemonSummaryScreen *param0) Window_ScheduleCopyToVRAM(¶m0->staticWindows[4]); if (param0->data->mode == 2) { - PokemonSummaryScreen_ClearWindowAndPrintText(param0, 155); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 155); } else { - PokemonSummaryScreen_ClearWindowAndPrintText(param0, 129); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 129); } - PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[35]); + PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); Window_FillTilemap(¶m0->extraWindows[0], 0); Window_FillTilemap(¶m0->extraWindows[1], 0); @@ -694,12 +694,12 @@ static void sub_02090D90(PokemonSummaryScreen *param0) Window_ScheduleCopyToVRAM(¶m0->staticWindows[5]); if (param0->data->mode == 2) { - PokemonSummaryScreen_ClearWindowAndPrintText(param0, 159); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 159); } else { - PokemonSummaryScreen_ClearWindowAndPrintText(param0, 158); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 158); } - PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[35]); + PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); Window_FillTilemap(¶m0->extraWindows[0], 0); Window_FillTilemap(¶m0->extraWindows[1], 0); @@ -728,16 +728,16 @@ static void sub_02090E4C(PokemonSummaryScreen *param0) Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]); if (param0->ribbonMax != 0) { - PokemonSummaryScreen_ClearWindowAndPrintText(param0, 180); - PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[35]); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 180); + PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); } } static void sub_02090EC8(PokemonSummaryScreen *param0) { Window_ScheduleCopyToVRAM(¶m0->staticWindows[28]); - PokemonSummaryScreen_ClearWindowAndPrintText(param0, 161); - PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[35]); + PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 161); + PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_BUTTON_PROMPT]); if ((param0->data->mode != 3) && (param0->data->mode != 4)) { return;