Document fonts

This commit is contained in:
GriffinR
2022-11-22 13:44:40 -05:00
parent 8f95e41d44
commit e78094de85
101 changed files with 1084 additions and 1091 deletions
+29 -29
View File
@@ -58,8 +58,8 @@ static const struct WindowTemplate sYesNo_WindowTemplate =
static const struct FontInfo gFontInfos[] =
{
[FONT_0] = {
.fontFunction = Font0Func,
[FONT_SMALL] = {
.fontFunction = FontFunc_Small,
.maxLetterWidth = 8,
.maxLetterHeight = 13,
.letterSpacing = 0,
@@ -68,8 +68,8 @@ static const struct FontInfo gFontInfos[] =
.bgColor = 1,
.shadowColor = 3,
},
[FONT_1] = {
.fontFunction = Font1Func,
[FONT_NORMAL_COPY_1] = {
.fontFunction = FontFunc_NormalCopy1,
.maxLetterWidth = 8,
.maxLetterHeight = 14,
.letterSpacing = 0,
@@ -78,8 +78,8 @@ static const struct FontInfo gFontInfos[] =
.bgColor = 1,
.shadowColor = 3,
},
[FONT_2] = {
.fontFunction = Font2Func,
[FONT_NORMAL] = {
.fontFunction = FontFunc_Normal,
.maxLetterWidth = 10,
.maxLetterHeight = 14,
.letterSpacing = 1,
@@ -88,8 +88,8 @@ static const struct FontInfo gFontInfos[] =
.bgColor = 1,
.shadowColor = 3,
},
[FONT_3] = {
.fontFunction = Font3Func,
[FONT_NORMAL_COPY_2] = {
.fontFunction = FontFunc_NormalCopy2,
.maxLetterWidth = 10,
.maxLetterHeight = 14,
.letterSpacing = 1,
@@ -98,8 +98,8 @@ static const struct FontInfo gFontInfos[] =
.bgColor = 1,
.shadowColor = 3,
},
[FONT_4] = {
.fontFunction = Font4Func,
[FONT_MALE] = {
.fontFunction = FontFunc_Male,
.maxLetterWidth = 10,
.maxLetterHeight = 14,
.letterSpacing = 0,
@@ -108,8 +108,8 @@ static const struct FontInfo gFontInfos[] =
.bgColor = 1,
.shadowColor = 3,
},
[FONT_5] = {
.fontFunction = Font5Func,
[FONT_FEMALE] = {
.fontFunction = FontFunc_Female,
.maxLetterWidth = 10,
.maxLetterHeight = 14,
.letterSpacing = 0,
@@ -119,7 +119,7 @@ static const struct FontInfo gFontInfos[] =
.shadowColor = 3,
},
[FONT_BRAILLE] = {
.fontFunction = Font6Func,
.fontFunction = FontFunc_Braille,
.maxLetterWidth = 8,
.maxLetterHeight = 16,
.letterSpacing = 0,
@@ -128,7 +128,7 @@ static const struct FontInfo gFontInfos[] =
.bgColor = 1,
.shadowColor = 3,
},
[FONT_7] = {
[FONT_BOLD] = {
.fontFunction = NULL,
.maxLetterWidth = 8,
.maxLetterHeight = 8,
@@ -142,14 +142,14 @@ static const struct FontInfo gFontInfos[] =
static const u8 gMenuCursorDimensions[][2] =
{
[FONT_0] = { 8, 13 },
[FONT_1] = { 8, 14 },
[FONT_2] = { 8, 14 },
[FONT_3] = { 8, 14 },
[FONT_4] = { 8, 14 },
[FONT_5] = { 8, 14 },
[FONT_BRAILLE] = { 8, 16 },
[FONT_7] = {}
[FONT_SMALL] = { 8, 13 },
[FONT_NORMAL_COPY_1] = { 8, 14 },
[FONT_NORMAL] = { 8, 14 },
[FONT_NORMAL_COPY_2] = { 8, 14 },
[FONT_MALE] = { 8, 14 },
[FONT_FEMALE] = { 8, 14 },
[FONT_BRAILLE] = { 8, 16 },
[FONT_BOLD] = {}
};
static u16 CopyDecompressedTileDataToVram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
@@ -428,23 +428,23 @@ void AddTextPrinterDiffStyle(bool8 allowSkippingDelayWithButtonPress)
gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress;
color = ContextNpcGetTextColor();
if (color == NPC_TEXT_COLOR_MALE)
AddTextPrinterParameterized2(0, FONT_4, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_BLUE, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
AddTextPrinterParameterized2(0, FONT_MALE, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_BLUE, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
else if (color == NPC_TEXT_COLOR_FEMALE)
AddTextPrinterParameterized2(0, FONT_5, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
AddTextPrinterParameterized2(0, FONT_FEMALE, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
else // NPC_TEXT_COLOR_MON / NPC_TEXT_COLOR_NEUTRAL
AddTextPrinterParameterized2(0, FONT_2, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
}
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress)
{
gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress;
AddTextPrinterParameterized2(0, FONT_2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
}
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed)
{
gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress;
AddTextPrinterParameterized2(0, FONT_2, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
}
void LoadStdWindowFrameGfx(void)
@@ -647,12 +647,12 @@ void DisplayItemMessageOnField(u8 taskId, u8 fontId, const u8 *string, TaskFunc
void DisplayYesNoMenuDefaultYes(void)
{
CreateYesNoMenu(&sYesNo_WindowTemplate, FONT_2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 0);
CreateYesNoMenu(&sYesNo_WindowTemplate, FONT_NORMAL, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 0);
}
void DisplayYesNoMenuDefaultNo(void)
{
CreateYesNoMenu(&sYesNo_WindowTemplate, FONT_2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 1);
CreateYesNoMenu(&sYesNo_WindowTemplate, FONT_NORMAL, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 1);
}
u8 GetTextSpeedSetting(void)