Documentation of unk field

This commit is contained in:
PokeCodec 2020-08-23 18:57:00 -04:00
parent 6aee7d38f3
commit 86a1e89879
14 changed files with 36 additions and 36 deletions

View file

@ -34,8 +34,8 @@ struct BgConfig2
u32 unk_3:18;
void* tilemap;
s32 bg_x;
s32 bg_y;
u32 bg_x;
u32 bg_y;
};
static struct BgControl sGpuBgConfigs;

View file

@ -154,7 +154,7 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8
printerTemplate.currentY = y;
printerTemplate.letterSpacing = gFonts[fontId].letterSpacing;
printerTemplate.lineSpacing = gFonts[fontId].lineSpacing;
printerTemplate.unk = gFonts[fontId].unk;
printerTemplate.style = gFonts[fontId].style;
printerTemplate.fgColor = gFonts[fontId].fgColor;
printerTemplate.bgColor = gFonts[fontId].bgColor;
printerTemplate.shadowColor = gFonts[fontId].shadowColor;
@ -484,7 +484,7 @@ u8 GetLastTextColor(u8 colorType)
{ \
dst = windowTiles + ((j / 8) * 32) + ((j & 7) >> 1) + ((i / 8) * widthOffset) + ((i & 7) * 4); \
bits = ((j & 1) * 4); \
*dst = (toOrr << bits) | ((0xF0 >> bits) & *dst); \
*dst = (toOrr << bits) | (*dst & (0xF0 >> bits)); \
} \
r5 >>= 4; \
} \
@ -1567,7 +1567,7 @@ void SetDefaultFontsPointer(void)
u8 GetFontAttribute(u8 fontId, u8 attributeId)
{
int result = 0;
u8 result = 0;
switch (attributeId)
{
case FONTATTR_MAX_LETTER_WIDTH:
@ -1582,8 +1582,8 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId)
case FONTATTR_LINE_SPACING:
result = gFontInfos[fontId].lineSpacing;
break;
case FONTATTR_UNKNOWN:
result = gFontInfos[fontId].unk;
case FONTATTR_STYLE:
result = gFontInfos[fontId].style;
break;
case FONTATTR_COLOR_FOREGROUND:
result = gFontInfos[fontId].fgColor;

View file

@ -282,7 +282,7 @@ enum
FONTATTR_MAX_LETTER_HEIGHT,
FONTATTR_LETTER_SPACING,
FONTATTR_LINE_SPACING,
FONTATTR_UNKNOWN, // dunno what this is yet
FONTATTR_STYLE,
FONTATTR_COLOR_FOREGROUND,
FONTATTR_COLOR_BACKGROUND,
FONTATTR_COLOR_SHADOW
@ -310,7 +310,7 @@ struct TextPrinterTemplate
u8 currentY;
u8 letterSpacing;
u8 lineSpacing;
u8 unk:4; // 0xC
u8 style:4; // 0xC
u8 fgColor:4;
u8 bgColor:4;
u8 shadowColor:4;
@ -339,7 +339,7 @@ struct FontInfo
u8 maxLetterHeight;
u8 letterSpacing;
u8 lineSpacing;
u8 unk:4;
u8 style:4; //unused
u8 fgColor:4;
u8 bgColor:4;
u8 shadowColor:4;

View file

@ -24,7 +24,7 @@ struct ListMenu;
struct ListMenuItem
{
const u8 *name;
s32 id;
u32 id;
};
struct ListMenuTemplate
@ -98,7 +98,7 @@ struct CursorStruct
extern struct ScrollArrowsTemplate gTempScrollArrowTemplate;
extern struct ListMenuTemplate gMultiuseListMenuTemplate;
s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum);
u32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum);
u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow);
u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *arg1, u16 scrollOffset, u16 selectedRow);
s32 ListMenu_ProcessInput(u8 listTaskId);

View file

@ -4547,7 +4547,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
textPrinter.currentY = textPrinter.y;
textPrinter.letterSpacing = 2;
textPrinter.lineSpacing = 0;
textPrinter.unk = 0;
textPrinter.style = 0;
textPrinter.fgColor = TEXT_DYNAMIC_COLOR_5;
textPrinter.bgColor = TEXT_COLOR_TRANSPARENT;
textPrinter.shadowColor = TEXT_DYNAMIC_COLOR_4;
@ -5080,7 +5080,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
textPrinter.currentY = textPrinter.y;
textPrinter.letterSpacing = 0;
textPrinter.lineSpacing = 0;
textPrinter.unk = 0;
textPrinter.style = 0;
textPrinter.fgColor = TEXT_DYNAMIC_COLOR_5;
textPrinter.bgColor = TEXT_COLOR_TRANSPARENT;
textPrinter.shadowColor = TEXT_DYNAMIC_COLOR_4;
@ -5578,7 +5578,7 @@ static void Task_ShowTourneyTree(u8 taskId)
textPrinter.lineSpacing = 0;
textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x70, textPrinter.letterSpacing);
textPrinter.currentY = 1;
textPrinter.unk = 0;
textPrinter.style = 0;
textPrinter.fgColor = TEXT_DYNAMIC_COLOR_5;
textPrinter.bgColor = TEXT_COLOR_TRANSPARENT;
textPrinter.shadowColor = TEXT_DYNAMIC_COLOR_4;
@ -5759,7 +5759,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId)
textPrinter.y = 0;
textPrinter.letterSpacing = 2;
textPrinter.lineSpacing = 0;
textPrinter.unk = 0;
textPrinter.style = 0;
textPrinter.fgColor = TEXT_DYNAMIC_COLOR_2;
textPrinter.bgColor = TEXT_COLOR_TRANSPARENT;
textPrinter.shadowColor = TEXT_DYNAMIC_COLOR_4;

View file

@ -2995,7 +2995,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
printerTemplate.currentY = printerTemplate.y;
printerTemplate.letterSpacing = textInfo[windowId].letterSpacing;
printerTemplate.lineSpacing = textInfo[windowId].lineSpacing;
printerTemplate.unk = 0;
printerTemplate.style = 0;
printerTemplate.fgColor = textInfo[windowId].fgColor;
printerTemplate.bgColor = textInfo[windowId].bgColor;
printerTemplate.shadowColor = textInfo[windowId].shadowColor;

View file

@ -6036,7 +6036,7 @@ static void PutLevelAndGenderOnLvlUpBox(void)
printerTemplate.currentY = 0;
printerTemplate.letterSpacing = 0;
printerTemplate.lineSpacing = 0;
printerTemplate.unk = 0;
printerTemplate.style = 0;
printerTemplate.fgColor = TEXT_COLOR_WHITE;
printerTemplate.bgColor = TEXT_COLOR_TRANSPARENT;
printerTemplate.shadowColor = TEXT_COLOR_DARK_GREY;

View file

@ -5411,7 +5411,7 @@ static void Contest_PrintTextToBg0WindowStd(u32 windowId, const u8 *b)
printerTemplate.currentY = 1;
printerTemplate.letterSpacing = 0;
printerTemplate.lineSpacing = 0;
printerTemplate.unk = 0;
printerTemplate.style = 0;
printerTemplate.fgColor = 15;
printerTemplate.bgColor = 0;
printerTemplate.shadowColor = 8;
@ -5434,7 +5434,7 @@ void Contest_PrintTextToBg0WindowAt(u32 windowId, u8 *currChar, s32 x, s32 y, s3
printerTemplate.currentY = y;
printerTemplate.letterSpacing = 0;
printerTemplate.lineSpacing = 0;
printerTemplate.unk = 0;
printerTemplate.style = 0;
printerTemplate.fgColor = 15;
printerTemplate.bgColor = 0;
printerTemplate.shadowColor = 8;
@ -5458,7 +5458,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b)
printerTemplate.currentY = 1;
printerTemplate.letterSpacing = 0;
printerTemplate.lineSpacing = 0;
printerTemplate.unk = 0;
printerTemplate.style = 0;
printerTemplate.fgColor = 1;
printerTemplate.bgColor = 0;
printerTemplate.shadowColor = 8;

View file

@ -2201,7 +2201,7 @@ static void AddContestTextPrinter(int windowId, u8 *str, int x)
textPrinter.currentY = 2;
textPrinter.letterSpacing = 0;
textPrinter.lineSpacing = 0;
textPrinter.unk = 0;
textPrinter.style = 0;
textPrinter.fgColor = 1;
textPrinter.bgColor = 0;
textPrinter.shadowColor = 8;

View file

@ -1186,7 +1186,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
printer.y = y;
printer.currentX = x;
printer.currentY = y;
printer.unk = 0;
printer.style = 0;
gTextFlags.useAlternateDownArrow = 0;
printer.letterSpacing = 0;
printer.lineSpacing = 1;

View file

@ -312,7 +312,7 @@ static void ListMenuDummyTask(u8 taskId)
}
s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum)
u32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum)
{
switch (sMysteryGiftLinkMenu.state)
{

View file

@ -1335,7 +1335,7 @@ static void InitMatchCallTextPrinter(int windowId, const u8 *str)
printerTemplate.currentY = 1;
printerTemplate.letterSpacing = 0;
printerTemplate.lineSpacing = 0;
printerTemplate.unk = 0;
printerTemplate.style = 0;
printerTemplate.fgColor = 10;
printerTemplate.bgColor = 8;
printerTemplate.shadowColor = 14;

View file

@ -180,7 +180,7 @@ u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed
printer.currentY = 1;
printer.letterSpacing = 0;
printer.lineSpacing = 0;
printer.unk = 0;
printer.style = 0;
printer.fgColor = fgColor;
printer.bgColor = bgColor;
printer.shadowColor = shadowColor;
@ -1130,7 +1130,7 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l
printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND);
printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND);
printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW);
printer.unk = GetFontAttribute(fontId, FONTATTR_UNKNOWN);
printer.style = GetFontAttribute(fontId, FONTATTR_STYLE);
printer.letterSpacing = letterSpacing;
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
printer.x = left;
@ -1194,7 +1194,7 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top
printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND);
printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND);
printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW);
printer.unk = GetFontAttribute(fontId, FONTATTR_UNKNOWN);
printer.style = GetFontAttribute(fontId, FONTATTR_STYLE);
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
@ -1252,7 +1252,7 @@ void sub_8198DBC(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u
printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND);
printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND);
printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW);
printer.unk = GetFontAttribute(fontId, FONTATTR_UNKNOWN);
printer.style = GetFontAttribute(fontId, FONTATTR_STYLE);
printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING);
printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING);
@ -1625,7 +1625,7 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *strs, const
printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND);
printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW);
printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN);
printer.style = GetFontAttribute(1, FONTATTR_STYLE);
printer.letterSpacing = 0;
printer.lineSpacing = 0;
printer.x = 8;
@ -1659,7 +1659,7 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa
printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND);
printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW);
printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN);
printer.style = GetFontAttribute(1, FONTATTR_STYLE);
printer.letterSpacing = 0;
printer.lineSpacing = 0;
@ -1690,7 +1690,7 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M
printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND);
printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND);
printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW);
printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN);
printer.style = GetFontAttribute(1, FONTATTR_STYLE);
printer.letterSpacing = 0;
printer.lineSpacing = 0;
@ -1957,7 +1957,7 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const
printer.currentY = printer.y;
printer.letterSpacing = GetFontAttribute(fontId, 2);
printer.lineSpacing = GetFontAttribute(fontId, 3);
printer.unk = 0;
printer.style = 0;
printer.fgColor = color[1];
printer.bgColor = color[0];
printer.shadowColor = color[2];
@ -1978,7 +1978,7 @@ void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 left, u8 top, u8 le
printer.currentY = printer.y;
printer.letterSpacing = letterSpacing;
printer.lineSpacing = lineSpacing;
printer.unk = 0;
printer.style = 0;
printer.fgColor = color[1];
printer.bgColor = color[0];
printer.shadowColor = color[2];
@ -1999,7 +1999,7 @@ void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left
printer.currentY = top;
printer.letterSpacing = letterSpacing;
printer.lineSpacing = lineSpacing;
printer.unk = 0;
printer.style = 0;
printer.fgColor = GetFontAttribute(fontId, 5);
printer.bgColor = GetFontAttribute(fontId, 6);

View file

@ -3754,7 +3754,7 @@ static void UR_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str
printerTemplate.y = y;
printerTemplate.currentX = x;
printerTemplate.currentY = y;
printerTemplate.unk = 0;
printerTemplate.style = 0;
gTextFlags.useAlternateDownArrow = FALSE;
switch (colorIdx)