Move summary screen graphics out of interface, fix some names

This commit is contained in:
GriffinR 2022-01-11 11:14:59 -05:00
parent fde18b4774
commit 7103839a61
18 changed files with 33 additions and 32 deletions

View File

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

View File

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -4035,16 +4035,16 @@ extern const u32 gPokenavRibbonsSummaryBg_Tilemap[];
extern const u32 gSummaryScreen_Gfx[]; extern const u32 gSummaryScreen_Gfx[];
extern const u32 gSummaryScreen_Pal[]; extern const u32 gSummaryScreen_Pal[];
extern const u32 gSummaryPage_Info_Tilemap[]; 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_Skills_Tilemap[];
extern const u32 gSummaryPage_BattleMoves_Tilemap[]; extern const u32 gSummaryPage_BattleMoves_Tilemap[];
extern const u32 gSummaryPage_ContestMoves_Tilemap[]; extern const u32 gSummaryPage_ContestMoves_Tilemap[];
extern const u16 gPPTextPalette[]; extern const u16 gPPTextPalette[];
extern const u16 gSummaryScreenWindow_Tilemap[];
extern const u32 gMoveTypes_Pal[]; extern const u32 gMoveTypes_Pal[];
extern const u16 gSummaryScreenPowAcc_Tilemap[]; extern const u16 gSummaryScreen_MoveEffect_Battle_Tilemap[];
extern const u16 gSummaryScreenAppealJam_Tilemap[]; extern const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[];
extern const u16 gSummaryScreen_MoveEffect_Cancel_Tilemap[];
extern const u32 gMoveTypes_Gfx[]; extern const u32 gMoveTypes_Gfx[];
extern const u32 gSummaryMoveSelect_Gfx[]; extern const u32 gSummaryMoveSelect_Gfx[];

View File

@ -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_Gfx[] = INCBIN_U32("graphics/types/move_types.4bpp.lz");
const u32 gMoveTypes_Pal[] = INCBIN_U32("graphics/types/move_types.gbapal.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_Gfx[] = INCBIN_U32("graphics/summary_screen/move_select.4bpp.lz");
const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.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_Gfx[] = INCBIN_U32("graphics/summary_screen/tiles.4bpp.lz");
const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/interface/summary_screen.gbapal.lz"); const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/summary_screen/tiles.gbapal.lz");
const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info.bin.lz"); const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz");
const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_skills.bin.lz"); const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz");
const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_battle_moves.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/interface/summary_page_contest_moves.bin.lz"); const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_contest_moves.bin.lz");
const u32 gSummaryPage_InfoCopy_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info_copy.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 gBagMaleTiles[] = INCBIN_U32("graphics/misc/bag_male.4bpp.lz");
const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/misc/bag_female.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 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 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 gSummaryScreen_MoveEffect_Battle_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_battle.bin");
const u16 gSummaryScreenAppealJam_Tilemap[] = INCBIN_U16("graphics/interface/appealjam_tilemap.bin"); const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_contest.bin");
const u16 gSummaryScreenWindow_Tilemap[] = INCBIN_U16("graphics/interface/summary.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 u16 gIntroCopyright_Pal[] = INCBIN_U16("graphics/intro/copyright.gbapal");
const u32 gIntroCopyright_Gfx[] = INCBIN_U32("graphics/intro/copyright.4bpp.lz"); const u32 gIntroCopyright_Gfx[] = INCBIN_U32("graphics/intro/copyright.4bpp.lz");

View File

@ -365,7 +365,7 @@ struct TilemapCtrl
u8 field_9; 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 = static const struct TilemapCtrl sStatusTilemapCtrl1 =
{ {
sStatusTilemap, 1, 10, 2, 0, 18 sStatusTilemap, 1, 10, 2, 0, 18
@ -376,11 +376,11 @@ static const struct TilemapCtrl sStatusTilemapCtrl2 =
}; };
static const struct TilemapCtrl sBattleMoveTilemapCtrl = 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 = 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 s8 sMultiBattleOrder[] = {0, 2, 3, 1, 4, 5};
static const struct WindowTemplate sSummaryTemplate[] = static const struct WindowTemplate sSummaryTemplate[] =
@ -701,8 +701,8 @@ static const u8 sTextColors[][3] =
{0, 7, 8} {0, 7, 8}
}; };
static const u8 sSummaryAButtonBitmap[] = INCBIN_U8("graphics/interface/summary_a_button.4bpp"); static const u8 sAButton_Gfx[] = INCBIN_U8("graphics/summary_screen/a_button.4bpp");
static const u8 sSummaryBButtonBitmap[] = INCBIN_U8("graphics/interface/summary_b_button.4bpp"); static const u8 sBButton_Gfx[] = INCBIN_U8("graphics/summary_screen/b_button.4bpp");
static void (*const sTextPrinterFunctions[])(void) = static void (*const sTextPrinterFunctions[])(void) =
{ {
@ -1071,7 +1071,7 @@ static const struct SpriteTemplate sSpriteTemplate_StatusCondition =
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy .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 // code
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)) void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void))
@ -1312,7 +1312,7 @@ static bool8 DecompressGraphics(void)
} }
break; break;
case 2: case 2:
LZDecompressWram(gSummaryPage_InfoCopy_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); LZDecompressWram(gSummaryPage_InfoEgg_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]);
sMonSummaryScreen->switchCounter++; sMonSummaryScreen->switchCounter++;
break; break;
case 3: 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) static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove)
{ {
u16 i, id; u16 i, id;
@ -2561,18 +2562,18 @@ static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove)
{ {
for (i = 0; i < 20; i++) for (i = 0; i < 20; i++)
{ {
dst[id + i] = gSummaryScreenWindow_Tilemap[i] + palette; dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette;
dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i] + palette; dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette;
dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 20] + palette; dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette;
} }
} }
else // Remove else // Remove
{ {
for (i = 0; i < 20; i++) for (i = 0; i < 20; i++)
{ {
dst[id + i] = gSummaryScreenWindow_Tilemap[i + 20] + palette; dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette;
dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i + 40] + palette; dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette;
dst[id + i + 0x40] = gSummaryScreenWindow_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) static void PrintAOrBButtonIcon(u8 windowId, bool8 bButton, u32 x)
{ {
// sSummaryBButtonBitmap - 0x80 = sSummaryAButtonBitmap // sBButton_Gfx - sizeof(sBButton_Gfx) = sAButton_Gfx
BlitBitmapToWindow(windowId, (bButton) ? sSummaryBButtonBitmap : sSummaryBButtonBitmap - 0x80, x, 0, 16, 16); BlitBitmapToWindow(windowId, (bButton) ? sBButton_Gfx : sBButton_Gfx - sizeof(sBButton_Gfx), x, 0, 16, 16);
} }
static void PrintPageNamesAndStats(void) static void PrintPageNamesAndStats(void)
@ -4011,7 +4012,7 @@ static void StopPokemonAnimations(void) // A subtle effect, this function stops
static void CreateMonMarkingsSprite(struct Pokemon *mon) 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; sMonSummaryScreen->markingsSprite = sprite;
if (sprite != NULL) if (sprite != NULL)