Colorize menu icon graphics, document sMenuInfoIcons

This commit is contained in:
GriffinR
2023-06-01 14:33:32 -04:00
parent f52d3b6ce4
commit 86c21b8e79
11 changed files with 67 additions and 60 deletions
+30 -30
View File
@@ -49,32 +49,32 @@ static void ListMenuDrawCursor(struct ListMenu *list);
static void ListMenuCallSelectionChangedCallback(struct ListMenu *list, u8 onInit);
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind);
const struct MoveMenuInfoIcon gMoveMenuInfoIcons[] =
{
{ 12, 12, 0x00 }, // Unused
{ 32, 12, 0x20 }, // Normal icon
{ 32, 12, 0x64 }, // Fight icon
{ 32, 12, 0x60 }, // Flying icon
{ 32, 12, 0x80 }, // Poison icon
{ 32, 12, 0x48 }, // Ground icon
{ 32, 12, 0x44 }, // Rock icon
{ 32, 12, 0x6C }, // Bug icon
{ 32, 12, 0x68 }, // Ghost icon
{ 32, 12, 0x88 }, // Steel icon
{ 32, 12, 0xA4 }, // ??? (Mystery) icon
{ 32, 12, 0x24 }, // Fire icon
{ 32, 12, 0x28 }, // Water icon
{ 32, 12, 0x2C }, // Grass icon
{ 32, 12, 0x40 }, // Electric icon
{ 32, 12, 0x84 }, // Psychic icon
{ 32, 12, 0x4C }, // Ice icon
{ 32, 12, 0xA0 }, // Dragon icon
{ 32, 12, 0x8C }, // Dark icon
{ 40, 12, 0xA8 }, // -Type- icon
{ 40, 12, 0xC0 }, // -Power- icon
{ 40, 12, 0xC8 }, // -Accuracy- icon
{ 40, 12, 0xE0 }, // -PP- icon
{ 40, 12, 0xE8 }, // -Effect- icon
static const struct MoveMenuInfoIcon sMenuInfoIcons[] =
{ // { width, height, offset }
[MENU_INFO_ICON_CAUGHT] = { 12, 12, 0x00 },
[TYPE_NORMAL + 1] = { 32, 12, 0x20 },
[TYPE_FIGHTING + 1] = { 32, 12, 0x64 },
[TYPE_FLYING + 1] = { 32, 12, 0x60 },
[TYPE_POISON + 1] = { 32, 12, 0x80 },
[TYPE_GROUND + 1] = { 32, 12, 0x48 },
[TYPE_ROCK + 1] = { 32, 12, 0x44 },
[TYPE_BUG + 1] = { 32, 12, 0x6C },
[TYPE_GHOST + 1] = { 32, 12, 0x68 },
[TYPE_STEEL + 1] = { 32, 12, 0x88 },
[TYPE_MYSTERY + 1] = { 32, 12, 0xA4 },
[TYPE_FIRE + 1] = { 32, 12, 0x24 },
[TYPE_WATER + 1] = { 32, 12, 0x28 },
[TYPE_GRASS + 1] = { 32, 12, 0x2C },
[TYPE_ELECTRIC + 1] = { 32, 12, 0x40 },
[TYPE_PSYCHIC + 1] = { 32, 12, 0x84 },
[TYPE_ICE + 1] = { 32, 12, 0x4C },
[TYPE_DRAGON + 1] = { 32, 12, 0xA0 },
[TYPE_DARK + 1] = { 32, 12, 0x8C },
[MENU_INFO_ICON_TYPE] = { 40, 12, 0xA8 },
[MENU_INFO_ICON_POWER] = { 40, 12, 0xC0 },
[MENU_INFO_ICON_ACCURACY] = { 40, 12, 0xC8 },
[MENU_INFO_ICON_PP] = { 40, 12, 0xE0 },
[MENU_INFO_ICON_EFFECT] = { 40, 12, 0xE8 },
};
static void ListMenuDummyTask(u8 taskId)
@@ -743,16 +743,16 @@ void ListMenuLoadStdPalAt(u8 palOffset, u8 palId)
{
case 0:
default:
palette = gFireRedMenuElements1_Pal;
palette = gMenuInfoElements1_Pal;
break;
case 1:
palette = gFireRedMenuElements2_Pal;
palette = gMenuInfoElements2_Pal;
break;
}
LoadPalette(palette, palOffset, PLTT_SIZE_4BPP);
}
void BlitMoveInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y)
void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y)
{
BlitBitmapRectToWindow(windowId, gFireRedMenuElements_Gfx + gMoveMenuInfoIcons[iconId].offset * 32, 0, 0, 128, 128, x, y, gMoveMenuInfoIcons[iconId].width, gMoveMenuInfoIcons[iconId].height);
BlitBitmapRectToWindow(windowId, &gMenuInfoElements_Gfx[sMenuInfoIcons[iconId].offset * TILE_SIZE_4BPP], 0, 0, 128, 128, x, y, sMenuInfoIcons[iconId].width, sMenuInfoIcons[iconId].height);
}