Repository navigation
Physical Special Split Icons In Summary
This tutorial will display the icons in the summary screen as seen on the gif. Make sure you have already done the "Add Physical Special Split" if not, do that first.
Download this image and place it in the graphics/summary_screen folder.
Locate and open the file src/pokemon_summary_screen.c, it is also the only file we'll be modifying in this tutorial.
Find this line:
#define PSS_LABEL_WINDOW_UNUSED1 7Change it to:
#define PSS_LABEL_WINDOW_CATEGORY 7Find this line:
static void SummaryScreen_DestroyAnimDelayTask(void);Insert the following codes directly below:
static void DisplayCategory(u16);
static const u16 sCategoryIcon_Pal[] = INCBIN_U16("graphics/summary_screen/split_icons_summary.gbapal");
static const u8 sCategoryIcon_Gfx[] = INCBIN_U8("graphics/summary_screen/split_icons_summary.4bpp");Find this chunk of code:
[PSS_LABEL_WINDOW_UNUSED1] = {
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 4,
.width = 0,
.height = 2,
.paletteNum = 6,
.baseBlock = 137,
},Change it to:
[PSS_LABEL_WINDOW_CATEGORY] = {
.bg = 0,
.tilemapLeft = 37,
.tilemapTop = 15,
.width = 2,
.height = 2,
.paletteNum = 10,
.baseBlock = 137,
},Find this Function:
static void Task_SlidePowerAccWindow(u8 taskId)Within this Function, find this chunk of code:
if (tScrollingSpeed < 0)
{
if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES)
PutWindowTilemap(PSS_LABEL_WINDOW_MOVES_POWER_ACC);
}
elseWe will be inserting a line of code
DisplayCategory(sMonSummaryScreen->summary.moves[sMonSummaryScreen->firstMoveIndex]);Thus the final result will be:
if (tScrollingSpeed < 0)
{
if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES)
{
PutWindowTilemap(PSS_LABEL_WINDOW_MOVES_POWER_ACC);
DisplayCategory(sMonSummaryScreen->summary.moves[sMonSummaryScreen->firstMoveIndex]);
}
}
elseFind this Function:
static void PrintMoveDetails(u16 move)Within this Function, find this chunk of code:
if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES)
{
PrintMovePowerAndAccuracy(move);
PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0);
}
elseJust like previous, we will again be inserting a line of code
DisplayCategory(move);Thus the final result will be:
if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES)
{
PrintMovePowerAndAccuracy(move);
PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0);
DisplayCategory(move);
}
elseThe last thing to do is to insert this Function the very end of the page.
static void DisplayCategory(u16 move)
{
LoadPalette(sCategoryIcon_Pal, 10 * 0x10, 0x20);
BlitBitmapToWindow(PSS_LABEL_WINDOW_CATEGORY, sCategoryIcon_Gfx + 0x80 * gBattleMoves[move].category, 0, 0, 16, 16);
PutWindowTilemap(PSS_LABEL_WINDOW_CATEGORY);
CopyWindowToVram(PSS_LABEL_WINDOW_CATEGORY, 3);
}