Colorize menu icon graphics, document sMenuInfoIcons
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
+3
-3
@@ -2745,9 +2745,9 @@ extern const u32 gTrainerPalette_RuinManiac[];
|
||||
extern const u32 gTrainerPalette_Lady[];
|
||||
extern const u32 gTrainerPalette_Painter[];
|
||||
|
||||
extern const u8 gFireRedMenuElements_Gfx[];
|
||||
extern const u16 gFireRedMenuElements1_Pal[];
|
||||
extern const u16 gFireRedMenuElements2_Pal[];
|
||||
extern const u8 gMenuInfoElements_Gfx[];
|
||||
extern const u16 gMenuInfoElements1_Pal[];
|
||||
extern const u16 gMenuInfoElements2_Pal[];
|
||||
|
||||
extern const u32 gItemIcon_QuestionMark[];
|
||||
extern const u32 gItemIconPalette_QuestionMark[];
|
||||
|
||||
+8
-1
@@ -8,6 +8,13 @@
|
||||
#define MENU_NOTHING_CHOSEN -2
|
||||
#define MENU_B_PRESSED -1
|
||||
|
||||
#define MENU_INFO_ICON_CAUGHT 0
|
||||
#define MENU_INFO_ICON_TYPE (NUMBER_OF_MON_TYPES + 1)
|
||||
#define MENU_INFO_ICON_POWER (NUMBER_OF_MON_TYPES + 2)
|
||||
#define MENU_INFO_ICON_ACCURACY (NUMBER_OF_MON_TYPES + 3)
|
||||
#define MENU_INFO_ICON_PP (NUMBER_OF_MON_TYPES + 4)
|
||||
#define MENU_INFO_ICON_EFFECT (NUMBER_OF_MON_TYPES + 5)
|
||||
|
||||
struct MenuAction
|
||||
{
|
||||
const u8 *text;
|
||||
@@ -31,7 +38,7 @@ s8 Menu2_GetMonSpriteAnchorCoordMinusx20(u16 species, u32 personality, u8 a2);
|
||||
void ListMenu_LoadMonIconPalette(u8 palOffset, u16 speciesId);
|
||||
void ListMenu_DrawMonIconGraphics(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y);
|
||||
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId);
|
||||
void BlitMoveInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
|
||||
void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
|
||||
|
||||
// menu
|
||||
s8 Menu_ProcessInputGridLayout(void);
|
||||
|
||||
+3
-3
@@ -1137,9 +1137,9 @@ const u32 gGhostFrontPic[] = INCBIN_U32("graphics/pokemon/ghost/front.4bpp.lz");
|
||||
|
||||
#include "data/graphics/mail.h"
|
||||
|
||||
const u16 gFireRedMenuElements1_Pal[] = INCBIN_U16("graphics/interface/dex_caught_pokeball.gbapal");
|
||||
const u16 gFireRedMenuElements2_Pal[] = INCBIN_U16("graphics/interface/pokemon_types.gbapal");
|
||||
const u8 gFireRedMenuElements_Gfx[] = INCBIN_U8("graphics/interface/dex_caught_pokeball_and_pokemon_types.4bpp");
|
||||
const u16 gMenuInfoElements1_Pal[] = INCBIN_U16("graphics/interface/dex_caught_pokeball.gbapal");
|
||||
const u16 gMenuInfoElements2_Pal[] = INCBIN_U16("graphics/interface/pokemon_types.gbapal");
|
||||
const u8 gMenuInfoElements_Gfx[] = INCBIN_U8("graphics/interface/menu_info.4bpp");
|
||||
|
||||
const u16 gMoveRelearner_Pal[] = INCBIN_U16("graphics/interface/learn_move.gbapal");
|
||||
const u32 gMoveRelearner_Gfx[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz");
|
||||
|
||||
+6
-6
@@ -816,7 +816,7 @@ static void MoveLearnerInitListMenu(void)
|
||||
static void PrintMoveInfo(u16 move)
|
||||
{
|
||||
u8 buffer[50];
|
||||
BlitMoveInfoIcon(2, gBattleMoves[move].type + 1, 1, 4);
|
||||
BlitMenuInfoIcon(2, gBattleMoves[move].type + 1, 1, 4);
|
||||
|
||||
if (gBattleMoves[move].power < 2)
|
||||
{
|
||||
@@ -844,11 +844,11 @@ static void PrintMoveInfo(u16 move)
|
||||
|
||||
static void LoadMoveInfoUI(void)
|
||||
{
|
||||
BlitMoveInfoIcon(0, 19, 1, 4);
|
||||
BlitMoveInfoIcon(1, 20, 0, 4);
|
||||
BlitMoveInfoIcon(1, 21, 0, 19);
|
||||
BlitMoveInfoIcon(0, 22, 1, 19);
|
||||
BlitMoveInfoIcon(0, 23, 1, 34);
|
||||
BlitMenuInfoIcon(0, MENU_INFO_ICON_TYPE, 1, 4);
|
||||
BlitMenuInfoIcon(1, MENU_INFO_ICON_POWER, 0, 4);
|
||||
BlitMenuInfoIcon(1, MENU_INFO_ICON_ACCURACY, 0, 19);
|
||||
BlitMenuInfoIcon(0, MENU_INFO_ICON_PP, 1, 19);
|
||||
BlitMenuInfoIcon(0, MENU_INFO_ICON_EFFECT, 1, 34);
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(1);
|
||||
PutWindowTilemap(4);
|
||||
|
||||
+30
-30
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1554,11 +1554,11 @@ static void ItemPrintFunc_OrderedListMenu(u8 windowId, u32 itemId, u8 y)
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->numericalOrderWindowId, FONT_SMALL, species, 12, y);
|
||||
if (caught)
|
||||
{
|
||||
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y);
|
||||
BlitMenuInfoIcon(sPokedexScreenData->numericalOrderWindowId, MENU_INFO_ICON_CAUGHT, 0x28, y);
|
||||
type1 = gSpeciesInfo[species].types[0];
|
||||
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, type1 + 1, 0x78, y);
|
||||
BlitMenuInfoIcon(sPokedexScreenData->numericalOrderWindowId, type1 + 1, 0x78, y);
|
||||
if (type1 != gSpeciesInfo[species].types[1])
|
||||
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gSpeciesInfo[species].types[1] + 1, 0x98, y);
|
||||
BlitMenuInfoIcon(sPokedexScreenData->numericalOrderWindowId, gSpeciesInfo[species].types[1] + 1, 0x98, y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3091,9 +3091,9 @@ u8 DexScreen_DrawMonAreaPage(void)
|
||||
|
||||
if (monIsCaught)
|
||||
{
|
||||
BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[0], 0, 1);
|
||||
BlitMenuInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[0], 0, 1);
|
||||
if (gSpeciesInfo[species].types[0] != gSpeciesInfo[species].types[1])
|
||||
BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[1], 32, 1);
|
||||
BlitMenuInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[1], 32, 1);
|
||||
}
|
||||
PutWindowTilemap(sPokedexScreenData->windowIds[12]);
|
||||
CopyWindowToVram(sPokedexScreenData->windowIds[12], COPYWIN_GFX);
|
||||
|
||||
@@ -2919,11 +2919,11 @@ static void PokeSum_DrawMoveTypeIcons(void)
|
||||
if (sMonSummaryScreen->moveIds[i] == MOVE_NONE)
|
||||
continue;
|
||||
|
||||
BlitMoveInfoIcon(sMonSummaryScreen->windowIds[5], sMonSummaryScreen->moveTypes[i] + 1, 3, GetMoveNamePrinterYpos(i));
|
||||
BlitMenuInfoIcon(sMonSummaryScreen->windowIds[5], sMonSummaryScreen->moveTypes[i] + 1, 3, GetMoveNamePrinterYpos(i));
|
||||
}
|
||||
|
||||
if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE)
|
||||
BlitMoveInfoIcon(sMonSummaryScreen->windowIds[5], sMonSummaryScreen->moveTypes[4] + 1, 3, GetMoveNamePrinterYpos(4));
|
||||
BlitMenuInfoIcon(sMonSummaryScreen->windowIds[5], sMonSummaryScreen->moveTypes[4] + 1, 3, GetMoveNamePrinterYpos(4));
|
||||
}
|
||||
|
||||
static void PokeSum_PrintPageHeaderText(u8 curPageIndex)
|
||||
@@ -3362,10 +3362,10 @@ static void PokeSum_PrintMonTypeIcons(void)
|
||||
case PSS_PAGE_INFO:
|
||||
if (!sMonSummaryScreen->isEgg)
|
||||
{
|
||||
BlitMoveInfoIcon(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], sMonSummaryScreen->monTypes[0] + 1, 47, 35);
|
||||
BlitMenuInfoIcon(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], sMonSummaryScreen->monTypes[0] + 1, 47, 35);
|
||||
|
||||
if (sMonSummaryScreen->monTypes[0] != sMonSummaryScreen->monTypes[1])
|
||||
BlitMoveInfoIcon(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], sMonSummaryScreen->monTypes[1] + 1, 83, 35);
|
||||
BlitMenuInfoIcon(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], sMonSummaryScreen->monTypes[1] + 1, 83, 35);
|
||||
}
|
||||
break;
|
||||
case PSS_PAGE_SKILLS:
|
||||
@@ -3374,10 +3374,10 @@ static void PokeSum_PrintMonTypeIcons(void)
|
||||
break;
|
||||
case PSS_PAGE_MOVES_INFO:
|
||||
FillWindowPixelBuffer(sMonSummaryScreen->windowIds[6], 0);
|
||||
BlitMoveInfoIcon(sMonSummaryScreen->windowIds[6], sMonSummaryScreen->monTypes[0] + 1, 0, 3);
|
||||
BlitMenuInfoIcon(sMonSummaryScreen->windowIds[6], sMonSummaryScreen->monTypes[0] + 1, 0, 3);
|
||||
|
||||
if (sMonSummaryScreen->monTypes[0] != sMonSummaryScreen->monTypes[1])
|
||||
BlitMoveInfoIcon(sMonSummaryScreen->windowIds[6], sMonSummaryScreen->monTypes[1] + 1, 36, 3);
|
||||
BlitMenuInfoIcon(sMonSummaryScreen->windowIds[6], sMonSummaryScreen->monTypes[1] + 1, 36, 3);
|
||||
|
||||
PutWindowTilemap(sMonSummaryScreen->windowIds[6]);
|
||||
break;
|
||||
|
||||
+5
-5
@@ -1529,10 +1529,10 @@ static void PrintTitle(void)
|
||||
|
||||
static void DrawMoveInfoLabels(void)
|
||||
{
|
||||
BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 19, 0, 0);
|
||||
BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 20, 0, 12);
|
||||
BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 21, 0, 24);
|
||||
BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 22, 0, 36);
|
||||
BlitMenuInfoIcon(WIN_MOVE_INFO_LABELS, MENU_INFO_ICON_TYPE, 0, 0);
|
||||
BlitMenuInfoIcon(WIN_MOVE_INFO_LABELS, MENU_INFO_ICON_POWER, 0, 12);
|
||||
BlitMenuInfoIcon(WIN_MOVE_INFO_LABELS, MENU_INFO_ICON_ACCURACY, 0, 24);
|
||||
BlitMenuInfoIcon(WIN_MOVE_INFO_LABELS, MENU_INFO_ICON_PP, 0, 36);
|
||||
CopyWindowToVram(WIN_MOVE_INFO_LABELS, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
@@ -1553,7 +1553,7 @@ static void PrintMoveInfo(u16 itemId)
|
||||
{
|
||||
// Draw type icon
|
||||
move = ItemIdToBattleMoveId(itemId);
|
||||
BlitMoveInfoIcon(WIN_MOVE_INFO, gBattleMoves[move].type + 1, 0, 0);
|
||||
BlitMenuInfoIcon(WIN_MOVE_INFO, gBattleMoves[move].type + 1, 0, 0);
|
||||
|
||||
// Print power
|
||||
if (gBattleMoves[move].power < 2)
|
||||
|
||||
+1
-1
@@ -3934,7 +3934,7 @@ static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct RfuGameData * data
|
||||
}
|
||||
else
|
||||
{
|
||||
BlitMoveInfoIcon(windowId, type + 1, 68, y);
|
||||
BlitMenuInfoIcon(windowId, type + 1, 68, y);
|
||||
PrintUnionRoomText(windowId, FONT_NORMAL, gSpeciesNames[species], 118, y, colorIdx);
|
||||
ConvertIntToDecimalStringN(levelStr, level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
PrintUnionRoomText(windowId, FONT_NORMAL, levelStr, GetStringRightAlignXOffset(2, levelStr, 218), y, colorIdx);
|
||||
|
||||
Reference in New Issue
Block a user