Font constants and slight PSS sync
This commit is contained in:
+41
-41
@@ -353,7 +353,7 @@ static const struct ListMenuTemplate sListMenuTemplate_KantoDexModeSelect = {
|
||||
.lettersSpacing = 1,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 2,
|
||||
.fontId = FONT_2,
|
||||
.cursorKind = 0,
|
||||
};
|
||||
|
||||
@@ -397,7 +397,7 @@ static const struct ListMenuTemplate sListMenuTemplate_NatDexModeSelect = {
|
||||
.lettersSpacing = 1,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 2,
|
||||
.fontId = FONT_2,
|
||||
.cursorKind = 0,
|
||||
};
|
||||
|
||||
@@ -520,7 +520,7 @@ static const struct ListMenuTemplate sListMenuTemplate_OrderedListMenu = {
|
||||
.lettersSpacing = 1,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 1,
|
||||
.fontId = 2,
|
||||
.fontId = FONT_2,
|
||||
.cursorKind = 0,
|
||||
};
|
||||
|
||||
@@ -1133,15 +1133,15 @@ static void DexScreen_InitGfxForTopMenu(void)
|
||||
listMenuTemplate.windowId = sPokedexScreenData->modeSelectWindowId;
|
||||
sPokedexScreenData->modeSelectListMenuId = ListMenuInit(&listMenuTemplate, sPokedexScreenData->modeSelectCursorPos, sPokedexScreenData->modeSelectItemsAbove);
|
||||
FillWindowPixelBuffer(sPokedexScreenData->dexCountsWindowId, PIXEL_FILL(0));
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Seen, 0, 2, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Kanto, 8, 13, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Seen, 0, 2, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Kanto, 8, 13, 0);
|
||||
DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numSeenKanto, 52, 13, 2);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_National, 8, 24, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_National, 8, 24, 0);
|
||||
DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numSeenNational, 52, 24, 2);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Owned, 0, 37, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Kanto, 8, 48, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Owned, 0, 37, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Kanto, 8, 48, 0);
|
||||
DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numOwnedKanto, 52, 48, 2);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_National, 8, 59, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_National, 8, 59, 0);
|
||||
DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numOwnedNational, 52, 59, 2);
|
||||
}
|
||||
else
|
||||
@@ -1150,9 +1150,9 @@ static void DexScreen_InitGfxForTopMenu(void)
|
||||
listMenuTemplate.windowId = sPokedexScreenData->modeSelectWindowId;
|
||||
sPokedexScreenData->modeSelectListMenuId = ListMenuInit(&listMenuTemplate, sPokedexScreenData->modeSelectCursorPos, sPokedexScreenData->modeSelectItemsAbove);
|
||||
FillWindowPixelBuffer(sPokedexScreenData->dexCountsWindowId, PIXEL_FILL(0));
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 1, gText_Seen, 0, 9, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_1, gText_Seen, 0, 9, 0);
|
||||
DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 1, sPokedexScreenData->numSeenKanto, 32, 21, 2);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 1, gText_Owned, 0, 37, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_1, gText_Owned, 0, 37, 0);
|
||||
DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 1, sPokedexScreenData->numOwnedKanto, 32, 49, 2);
|
||||
}
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(15));
|
||||
@@ -1548,7 +1548,7 @@ static void ItemPrintFunc_OrderedListMenu(u8 windowId, u32 itemId, u8 y)
|
||||
bool8 seen = (itemId >> 16) & 1; // not used but required to match
|
||||
bool8 caught = (itemId >> 17) & 1;
|
||||
u8 type1;
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->numericalOrderWindowId, 0, species, 12, y);
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->numericalOrderWindowId, FONT_0, species, 12, y);
|
||||
if (caught)
|
||||
{
|
||||
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y);
|
||||
@@ -2161,10 +2161,10 @@ static void DexScreen_AddTextPrinterParameterized(u8 windowId, u8 fontId, const
|
||||
textColor[2] = 2;
|
||||
break;
|
||||
}
|
||||
AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == 0 ? 0 : 1, 0, textColor, -1, str);
|
||||
AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == FONT_0 ? 0 : 1, 0, textColor, -1, str);
|
||||
}
|
||||
|
||||
void DexScreen_PrintNum3LeadingZeroes(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx)
|
||||
static void DexScreen_PrintNum3LeadingZeroes(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx)
|
||||
{
|
||||
u8 buff[4];
|
||||
buff[0] = (num / 100) + CHAR_0;
|
||||
@@ -2293,7 +2293,7 @@ static u16 DexScreen_GetDexCount(u8 caseId, bool8 whichDex)
|
||||
|
||||
static void DexScreen_PrintControlInfo(const u8 *src)
|
||||
{
|
||||
DexScreen_AddTextPrinterParameterized(1, 0, src, 236 - GetStringWidth(0, src, 0), 2, 4);
|
||||
DexScreen_AddTextPrinterParameterized(1, FONT_0, src, 236 - GetStringWidth(FONT_0, src, 0), 2, 4);
|
||||
}
|
||||
|
||||
bool8 DexScreen_DrawMonPicInCategoryPage(u16 species, u8 slot, u8 numSlots)
|
||||
@@ -2327,8 +2327,8 @@ bool8 DexScreen_DrawMonPicInCategoryPage(u16 species, u8 slot, u8 numSlots)
|
||||
template.baseBlock = slot * 40 + 0x108;
|
||||
sPokedexScreenData->categoryMonInfoWindowIds[slot] = AddWindow(&template);
|
||||
CopyToWindowPixelBuffer(sPokedexScreenData->categoryMonInfoWindowIds[slot], sCategoryMonInfoBgTiles, 0, 0);
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->categoryMonInfoWindowIds[slot], 0, species, 12, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->categoryMonInfoWindowIds[slot], 2, gSpeciesNames[species], 2, 13, 0);
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->categoryMonInfoWindowIds[slot], FONT_0, species, 12, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->categoryMonInfoWindowIds[slot], FONT_2, gSpeciesNames[species], 2, 13, 0);
|
||||
if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, TRUE))
|
||||
BlitBitmapRectToWindow(sPokedexScreenData->categoryMonInfoWindowIds[slot], sDexScreen_CaughtIcon, 0, 0, 8, 8, 2, 3, 8, 8);
|
||||
PutWindowTilemap(sPokedexScreenData->categoryMonInfoWindowIds[slot]);
|
||||
@@ -2695,9 +2695,9 @@ void DexScreen_PrintMonCategory(u8 windowId, u16 species, u8 x, u8 y)
|
||||
|
||||
categoryStr[index] = EOS;
|
||||
|
||||
DexScreen_AddTextPrinterParameterized(windowId, 0, categoryStr, x, y, 0);
|
||||
x += GetStringWidth(0, categoryStr, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, 0, gText_PokedexPokemon, x, y, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, FONT_0, categoryStr, x, y, 0);
|
||||
x += GetStringWidth(FONT_0, categoryStr, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, FONT_0, gText_PokedexPokemon, x, y, 0);
|
||||
}
|
||||
|
||||
void DexScreen_PrintMonHeight(u8 windowId, u16 species, u8 x, u8 y)
|
||||
@@ -2752,9 +2752,9 @@ void DexScreen_PrintMonHeight(u8 windowId, u16 species, u8 x, u8 y)
|
||||
}
|
||||
|
||||
buffer[i++] = EOS;
|
||||
DexScreen_AddTextPrinterParameterized(windowId, 0, labelText, x, y, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, FONT_0, labelText, x, y, 0);
|
||||
x += 30;
|
||||
DexScreen_AddTextPrinterParameterized(windowId, 0, buffer, x, y, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, FONT_0, buffer, x, y, 0);
|
||||
}
|
||||
|
||||
void DexScreen_PrintMonWeight(u8 windowId, u16 species, u8 x, u8 y)
|
||||
@@ -2844,9 +2844,9 @@ void DexScreen_PrintMonWeight(u8 windowId, u16 species, u8 x, u8 y)
|
||||
buffer[i + j] = lbsText[j];
|
||||
|
||||
buffer[i + j] = EOS;
|
||||
DexScreen_AddTextPrinterParameterized(windowId, 0, labelText, x, y, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, FONT_0, labelText, x, y, 0);
|
||||
x += 30;
|
||||
DexScreen_AddTextPrinterParameterized(windowId, 0, buffer, x, y, 0);
|
||||
DexScreen_AddTextPrinterParameterized(windowId, FONT_0, buffer, x, y, 0);
|
||||
}
|
||||
|
||||
void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y)
|
||||
@@ -2861,7 +2861,7 @@ void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y)
|
||||
{
|
||||
printerTemplate.currentChar = gPokedexEntries[species].description;
|
||||
printerTemplate.windowId = windowId;
|
||||
printerTemplate.fontId = 2;
|
||||
printerTemplate.fontId = FONT_2;
|
||||
printerTemplate.letterSpacing = 1;
|
||||
printerTemplate.lineSpacing = 0;
|
||||
printerTemplate.unk = 0;
|
||||
@@ -2869,7 +2869,7 @@ void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y)
|
||||
printerTemplate.bgColor = 0;
|
||||
printerTemplate.shadowColor = 2;
|
||||
|
||||
length = GetStringWidth(2, gPokedexEntries[species].description, 0);
|
||||
length = GetStringWidth(FONT_2, gPokedexEntries[species].description, 0);
|
||||
xCenter = x + (240 - length) / 2;
|
||||
|
||||
if (xCenter > 0)
|
||||
@@ -2937,8 +2937,8 @@ static u8 DexScreen_DrawMonDexPage(bool8 justRegistered)
|
||||
|
||||
// Species stats
|
||||
FillWindowPixelBuffer(sPokedexScreenData->windowIds[1], PIXEL_FILL(0));
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[1], 0, sPokedexScreenData->dexSpecies, 0, 8);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[1], 2, gSpeciesNames[sPokedexScreenData->dexSpecies], 28, 8, 0);
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[1], FONT_0, sPokedexScreenData->dexSpecies, 0, 8);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[1], FONT_2, gSpeciesNames[sPokedexScreenData->dexSpecies], 28, 8, 0);
|
||||
DexScreen_PrintMonCategory(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 24);
|
||||
DexScreen_PrintMonHeight(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 36);
|
||||
DexScreen_PrintMonWeight(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 48);
|
||||
@@ -2956,7 +2956,7 @@ static u8 DexScreen_DrawMonDexPage(bool8 justRegistered)
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(15));
|
||||
if (justRegistered == FALSE)
|
||||
{
|
||||
DexScreen_AddTextPrinterParameterized(1, 0, gText_Cry, 8, 2, 4);
|
||||
DexScreen_AddTextPrinterParameterized(1, FONT_0, gText_Cry, 8, 2, 4);
|
||||
DexScreen_PrintControlInfo(gText_NextDataCancel);
|
||||
}
|
||||
else
|
||||
@@ -3059,8 +3059,8 @@ u8 DexScreen_DrawMonAreaPage(void)
|
||||
// Print "Size"
|
||||
FillWindowPixelBuffer(sPokedexScreenData->windowIds[9], PIXEL_FILL(0));
|
||||
{
|
||||
s32 strWidth = GetStringWidth(0, gText_Size, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[9], 0, gText_Size, (sWindowTemplate_AreaMap_Size.width * 8 - strWidth) / 2, 4, 0);
|
||||
s32 strWidth = GetStringWidth(FONT_0, gText_Size, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[9], FONT_0, gText_Size, (sWindowTemplate_AreaMap_Size.width * 8 - strWidth) / 2, 4, 0);
|
||||
}
|
||||
PutWindowTilemap(sPokedexScreenData->windowIds[9]);
|
||||
CopyWindowToVram(sPokedexScreenData->windowIds[9], COPYWIN_GFX);
|
||||
@@ -3068,8 +3068,8 @@ u8 DexScreen_DrawMonAreaPage(void)
|
||||
// Print "Area"
|
||||
FillWindowPixelBuffer(sPokedexScreenData->windowIds[10], PIXEL_FILL(0));
|
||||
{
|
||||
s32 strWidth = GetStringWidth(0, gText_Area, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[10], 0, gText_Area, (sWindowTemplate_AreaMap_Area.width * 8 - strWidth) / 2, 4, 0);
|
||||
s32 strWidth = GetStringWidth(FONT_0, gText_Area, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[10], FONT_0, gText_Area, (sWindowTemplate_AreaMap_Area.width * 8 - strWidth) / 2, 4, 0);
|
||||
}
|
||||
SetWindowAttribute(sPokedexScreenData->windowIds[10], WINDOW_TILEMAP_TOP, GetWindowAttribute(sPokedexScreenData->windowIds[10], WINDOW_TILEMAP_TOP) + kantoMapVoff);
|
||||
PutWindowTilemap(sPokedexScreenData->windowIds[10]);
|
||||
@@ -3077,8 +3077,8 @@ u8 DexScreen_DrawMonAreaPage(void)
|
||||
|
||||
// Print species name
|
||||
FillWindowPixelBuffer(sPokedexScreenData->windowIds[8], PIXEL_FILL(0));
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[8], 0, species, 0, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[8], 2, gSpeciesNames[species], 3, 12, 0);
|
||||
DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[8], FONT_0, species, 0, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[8], FONT_2, gSpeciesNames[species], 3, 12, 0);
|
||||
PutWindowTilemap(sPokedexScreenData->windowIds[8]);
|
||||
CopyWindowToVram(sPokedexScreenData->windowIds[8], COPYWIN_GFX);
|
||||
|
||||
@@ -3128,15 +3128,15 @@ u8 DexScreen_DrawMonAreaPage(void)
|
||||
{
|
||||
BlitBitmapRectToWindow(sPokedexScreenData->windowIds[0], (void *)sBlitTiles_WideEllipse, 0, 0, 88, 16, 4, 28, 88, 16);
|
||||
{
|
||||
s32 strWidth = GetStringWidth(0, gText_AreaUnknown, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[0], 0, gText_AreaUnknown, (96 - strWidth) / 2, 29, 0);
|
||||
s32 strWidth = GetStringWidth(FONT_0, gText_AreaUnknown, 0);
|
||||
DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[0], FONT_0, gText_AreaUnknown, (96 - strWidth) / 2, 29, 0);
|
||||
}
|
||||
}
|
||||
CopyWindowToVram(sPokedexScreenData->windowIds[0], COPYWIN_GFX);
|
||||
|
||||
// Draw the control info
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(15));
|
||||
DexScreen_AddTextPrinterParameterized(1, 0, gText_Cry, 8, 2, 4);
|
||||
DexScreen_AddTextPrinterParameterized(1, FONT_0, gText_Cry, 8, 2, 4);
|
||||
DexScreen_PrintControlInfo(gText_CancelPreviousData);
|
||||
PutWindowTilemap(1);
|
||||
CopyWindowToVram(1, COPYWIN_GFX);
|
||||
@@ -3436,13 +3436,13 @@ void DexScreen_PrintStringWithAlignment(const u8 * str, s32 mode)
|
||||
x = 8;
|
||||
break;
|
||||
case TEXT_CENTER:
|
||||
x = (u32)(240 - GetStringWidth(2, str, 0)) / 2;
|
||||
x = (u32)(240 - GetStringWidth(FONT_2, str, 0)) / 2;
|
||||
break;
|
||||
case TEXT_RIGHT:
|
||||
default:
|
||||
x = 232 - GetStringWidth(2, str, 0);
|
||||
x = 232 - GetStringWidth(FONT_2, str, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
DexScreen_AddTextPrinterParameterized(0, 2, str, x, 2, 4);
|
||||
DexScreen_AddTextPrinterParameterized(0, FONT_2, str, x, 2, 4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user