From 7103839a615463eeadeb671ad75436dd2e4a52e3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 11:14:59 -0500 Subject: [PATCH] Move summary screen graphics out of interface, fix some names --- .../a_button.png} | Bin .../b_button.png} | Bin .../effect_battle.bin} | Bin .../effect_cancel.bin} | Bin .../effect_contest.bin} | Bin .../markings.pal} | 0 .../move_select.png} | Bin .../page_battle_moves.bin} | Bin .../page_contest_moves.bin} | Bin .../page_info.bin} | Bin .../page_info_egg.bin} | Bin .../page_skills.bin} | Bin .../status_tilemap.bin | Bin .../tiles.pal} | 0 .../tiles.png} | Bin include/graphics.h | 8 ++--- src/graphics.c | 24 ++++++------- src/pokemon_summary_screen.c | 33 +++++++++--------- 18 files changed, 33 insertions(+), 32 deletions(-) rename graphics/{interface/summary_a_button.png => summary_screen/a_button.png} (100%) rename graphics/{interface/summary_b_button.png => summary_screen/b_button.png} (100%) rename graphics/{interface/powacc_tilemap.bin => summary_screen/effect_battle.bin} (100%) rename graphics/{interface/summary.bin => summary_screen/effect_cancel.bin} (100%) rename graphics/{interface/appealjam_tilemap.bin => summary_screen/effect_contest.bin} (100%) rename graphics/{interface/summary_markings.pal => summary_screen/markings.pal} (100%) rename graphics/{interface/summary_frames.png => summary_screen/move_select.png} (100%) rename graphics/{interface/summary_page_battle_moves.bin => summary_screen/page_battle_moves.bin} (100%) rename graphics/{interface/summary_page_contest_moves.bin => summary_screen/page_contest_moves.bin} (100%) rename graphics/{interface/summary_page_info.bin => summary_screen/page_info.bin} (100%) rename graphics/{interface/summary_page_info_copy.bin => summary_screen/page_info_egg.bin} (100%) rename graphics/{interface/summary_page_skills.bin => summary_screen/page_skills.bin} (100%) rename graphics/{interface => summary_screen}/status_tilemap.bin (100%) rename graphics/{interface/summary_screen.pal => summary_screen/tiles.pal} (100%) rename graphics/{interface/summary_screen.png => summary_screen/tiles.png} (100%) diff --git a/graphics/interface/summary_a_button.png b/graphics/summary_screen/a_button.png similarity index 100% rename from graphics/interface/summary_a_button.png rename to graphics/summary_screen/a_button.png diff --git a/graphics/interface/summary_b_button.png b/graphics/summary_screen/b_button.png similarity index 100% rename from graphics/interface/summary_b_button.png rename to graphics/summary_screen/b_button.png diff --git a/graphics/interface/powacc_tilemap.bin b/graphics/summary_screen/effect_battle.bin similarity index 100% rename from graphics/interface/powacc_tilemap.bin rename to graphics/summary_screen/effect_battle.bin diff --git a/graphics/interface/summary.bin b/graphics/summary_screen/effect_cancel.bin similarity index 100% rename from graphics/interface/summary.bin rename to graphics/summary_screen/effect_cancel.bin diff --git a/graphics/interface/appealjam_tilemap.bin b/graphics/summary_screen/effect_contest.bin similarity index 100% rename from graphics/interface/appealjam_tilemap.bin rename to graphics/summary_screen/effect_contest.bin diff --git a/graphics/interface/summary_markings.pal b/graphics/summary_screen/markings.pal similarity index 100% rename from graphics/interface/summary_markings.pal rename to graphics/summary_screen/markings.pal diff --git a/graphics/interface/summary_frames.png b/graphics/summary_screen/move_select.png similarity index 100% rename from graphics/interface/summary_frames.png rename to graphics/summary_screen/move_select.png diff --git a/graphics/interface/summary_page_battle_moves.bin b/graphics/summary_screen/page_battle_moves.bin similarity index 100% rename from graphics/interface/summary_page_battle_moves.bin rename to graphics/summary_screen/page_battle_moves.bin diff --git a/graphics/interface/summary_page_contest_moves.bin b/graphics/summary_screen/page_contest_moves.bin similarity index 100% rename from graphics/interface/summary_page_contest_moves.bin rename to graphics/summary_screen/page_contest_moves.bin diff --git a/graphics/interface/summary_page_info.bin b/graphics/summary_screen/page_info.bin similarity index 100% rename from graphics/interface/summary_page_info.bin rename to graphics/summary_screen/page_info.bin diff --git a/graphics/interface/summary_page_info_copy.bin b/graphics/summary_screen/page_info_egg.bin similarity index 100% rename from graphics/interface/summary_page_info_copy.bin rename to graphics/summary_screen/page_info_egg.bin diff --git a/graphics/interface/summary_page_skills.bin b/graphics/summary_screen/page_skills.bin similarity index 100% rename from graphics/interface/summary_page_skills.bin rename to graphics/summary_screen/page_skills.bin diff --git a/graphics/interface/status_tilemap.bin b/graphics/summary_screen/status_tilemap.bin similarity index 100% rename from graphics/interface/status_tilemap.bin rename to graphics/summary_screen/status_tilemap.bin diff --git a/graphics/interface/summary_screen.pal b/graphics/summary_screen/tiles.pal similarity index 100% rename from graphics/interface/summary_screen.pal rename to graphics/summary_screen/tiles.pal diff --git a/graphics/interface/summary_screen.png b/graphics/summary_screen/tiles.png similarity index 100% rename from graphics/interface/summary_screen.png rename to graphics/summary_screen/tiles.png diff --git a/include/graphics.h b/include/graphics.h index 7b29a70b7..5c6a043cc 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4035,16 +4035,16 @@ extern const u32 gPokenavRibbonsSummaryBg_Tilemap[]; extern const u32 gSummaryScreen_Gfx[]; extern const u32 gSummaryScreen_Pal[]; extern const u32 gSummaryPage_Info_Tilemap[]; -extern const u32 gSummaryPage_InfoCopy_Tilemap[]; +extern const u32 gSummaryPage_InfoEgg_Tilemap[]; extern const u32 gSummaryPage_Skills_Tilemap[]; extern const u32 gSummaryPage_BattleMoves_Tilemap[]; extern const u32 gSummaryPage_ContestMoves_Tilemap[]; extern const u16 gPPTextPalette[]; -extern const u16 gSummaryScreenWindow_Tilemap[]; extern const u32 gMoveTypes_Pal[]; -extern const u16 gSummaryScreenPowAcc_Tilemap[]; -extern const u16 gSummaryScreenAppealJam_Tilemap[]; +extern const u16 gSummaryScreen_MoveEffect_Battle_Tilemap[]; +extern const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[]; +extern const u16 gSummaryScreen_MoveEffect_Cancel_Tilemap[]; extern const u32 gMoveTypes_Gfx[]; extern const u32 gSummaryMoveSelect_Gfx[]; diff --git a/src/graphics.c b/src/graphics.c index d1a3654ea..51e585489 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1126,16 +1126,16 @@ const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapa const u32 gMoveTypes_Gfx[] = INCBIN_U32("graphics/types/move_types.4bpp.lz"); const u32 gMoveTypes_Pal[] = INCBIN_U32("graphics/types/move_types.gbapal.lz"); -const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/interface/summary_frames.4bpp.lz"); -const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.lz"); +const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/summary_screen/move_select.4bpp.lz"); +const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/summary_screen/move_select.gbapal.lz"); -const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/interface/summary_screen.4bpp.lz"); -const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/interface/summary_screen.gbapal.lz"); -const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info.bin.lz"); -const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_skills.bin.lz"); -const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_battle_moves.bin.lz"); -const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_contest_moves.bin.lz"); -const u32 gSummaryPage_InfoCopy_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info_copy.bin.lz"); +const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/summary_screen/tiles.4bpp.lz"); +const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/summary_screen/tiles.gbapal.lz"); +const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz"); +const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz"); +const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_battle_moves.bin.lz"); +const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_contest_moves.bin.lz"); +const u32 gSummaryPage_InfoEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info_egg.bin.lz"); const u32 gBagMaleTiles[] = INCBIN_U32("graphics/misc/bag_male.4bpp.lz"); const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/misc/bag_female.4bpp.lz"); @@ -1259,9 +1259,9 @@ const u32 gPokedexSearchMenu_Gfx[] = INCBIN_U32("graphics/pokedex/search_menu.4b const u32 gPokedexSearchMenuNational_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_national.bin.lz"); const u32 gPokedexSearchMenuHoenn_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_hoenn.bin.lz"); -const u16 gSummaryScreenPowAcc_Tilemap[] = INCBIN_U16("graphics/interface/powacc_tilemap.bin"); -const u16 gSummaryScreenAppealJam_Tilemap[] = INCBIN_U16("graphics/interface/appealjam_tilemap.bin"); -const u16 gSummaryScreenWindow_Tilemap[] = INCBIN_U16("graphics/interface/summary.bin"); +const u16 gSummaryScreen_MoveEffect_Battle_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_battle.bin"); +const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_contest.bin"); +const u16 gSummaryScreen_MoveEffect_Cancel_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_cancel.bin"); const u16 gIntroCopyright_Pal[] = INCBIN_U16("graphics/intro/copyright.gbapal"); const u32 gIntroCopyright_Gfx[] = INCBIN_U32("graphics/intro/copyright.4bpp.lz"); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index c5aeb6b47..10c69a422 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -365,7 +365,7 @@ struct TilemapCtrl u8 field_9; }; -static const u16 sStatusTilemap[] = INCBIN_U16("graphics/interface/status_tilemap.bin"); +static const u16 sStatusTilemap[] = INCBIN_U16("graphics/summary_screen/status_tilemap.bin"); static const struct TilemapCtrl sStatusTilemapCtrl1 = { sStatusTilemap, 1, 10, 2, 0, 18 @@ -376,11 +376,11 @@ static const struct TilemapCtrl sStatusTilemapCtrl2 = }; static const struct TilemapCtrl sBattleMoveTilemapCtrl = { - gSummaryScreenPowAcc_Tilemap, 0, 10, 7, 0, 45 + gSummaryScreen_MoveEffect_Battle_Tilemap, 0, 10, 7, 0, 45 }; static const struct TilemapCtrl sContestMoveTilemapCtrl = { - gSummaryScreenAppealJam_Tilemap, 0, 10, 7, 0, 45 + gSummaryScreen_MoveEffect_Contest_Tilemap, 0, 10, 7, 0, 45 }; static const s8 sMultiBattleOrder[] = {0, 2, 3, 1, 4, 5}; static const struct WindowTemplate sSummaryTemplate[] = @@ -701,8 +701,8 @@ static const u8 sTextColors[][3] = {0, 7, 8} }; -static const u8 sSummaryAButtonBitmap[] = INCBIN_U8("graphics/interface/summary_a_button.4bpp"); -static const u8 sSummaryBButtonBitmap[] = INCBIN_U8("graphics/interface/summary_b_button.4bpp"); +static const u8 sAButton_Gfx[] = INCBIN_U8("graphics/summary_screen/a_button.4bpp"); +static const u8 sBButton_Gfx[] = INCBIN_U8("graphics/summary_screen/b_button.4bpp"); static void (*const sTextPrinterFunctions[])(void) = { @@ -1071,7 +1071,7 @@ static const struct SpriteTemplate sSpriteTemplate_StatusCondition = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; -static const u16 sSummaryMarkingsPalette[] = INCBIN_U16("graphics/interface/summary_markings.gbapal"); +static const u16 sMarkings_Pal[] = INCBIN_U16("graphics/summary_screen/markings.gbapal"); // code void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)) @@ -1312,7 +1312,7 @@ static bool8 DecompressGraphics(void) } break; case 2: - LZDecompressWram(gSummaryPage_InfoCopy_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); + LZDecompressWram(gSummaryPage_InfoEgg_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); sMonSummaryScreen->switchCounter++; break; case 3: @@ -2551,6 +2551,7 @@ static void Task_ShowStatusWindow(u8 taskId) } } +// Toggles the "Cancel" window that appears when selecting a move static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove) { u16 i, id; @@ -2561,18 +2562,18 @@ static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove) { for (i = 0; i < 20; i++) { - dst[id + i] = gSummaryScreenWindow_Tilemap[i] + palette; - dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i] + palette; - dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 20] + palette; + dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette; + dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette; + dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette; } } else // Remove { for (i = 0; i < 20; i++) { - dst[id + i] = gSummaryScreenWindow_Tilemap[i + 20] + palette; - dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i + 40] + palette; - dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 40] + palette; + dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette; + dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette; + dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette; } } } @@ -2788,8 +2789,8 @@ static void PrintGenderSymbol(struct Pokemon *mon, u16 species) static void PrintAOrBButtonIcon(u8 windowId, bool8 bButton, u32 x) { - // sSummaryBButtonBitmap - 0x80 = sSummaryAButtonBitmap - BlitBitmapToWindow(windowId, (bButton) ? sSummaryBButtonBitmap : sSummaryBButtonBitmap - 0x80, x, 0, 16, 16); + // sBButton_Gfx - sizeof(sBButton_Gfx) = sAButton_Gfx + BlitBitmapToWindow(windowId, (bButton) ? sBButton_Gfx : sBButton_Gfx - sizeof(sBButton_Gfx), x, 0, 16, 16); } static void PrintPageNamesAndStats(void) @@ -4011,7 +4012,7 @@ static void StopPokemonAnimations(void) // A subtle effect, this function stops static void CreateMonMarkingsSprite(struct Pokemon *mon) { - struct Sprite *sprite = CreateMonMarkingAllCombosSprite(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sSummaryMarkingsPalette); + struct Sprite *sprite = CreateMonMarkingAllCombosSprite(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sMarkings_Pal); sMonSummaryScreen->markingsSprite = sprite; if (sprite != NULL)