summaryrefslogtreecommitdiff
path: root/gflib
diff options
context:
space:
mode:
authorPokeCodec <doremylover456@gmail.com>2020-08-23 18:57:00 -0400
committerPokeCodec <doremylover456@gmail.com>2020-08-23 21:34:31 -0400
commit86a1e8987953cea0b7bba7e5753611f926734f1b (patch)
treebd99f6bd97459af13153ebea5c91429c61a1356e /gflib
parent6aee7d38f3f3dcbfea7ce6d6d5ddecce740f9ee9 (diff)
Documentation of unk field
Diffstat (limited to 'gflib')
-rw-r--r--gflib/bg.c4
-rw-r--r--gflib/text.c10
-rw-r--r--gflib/text.h6
3 files changed, 10 insertions, 10 deletions
diff --git a/gflib/bg.c b/gflib/bg.c
index 66dd81a25..d6b2cf31e 100644
--- a/gflib/bg.c
+++ b/gflib/bg.c
@@ -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;
diff --git a/gflib/text.c b/gflib/text.c
index 636fe50a9..2f4dc4f19 100644
--- a/gflib/text.c
+++ b/gflib/text.c
@@ -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;
diff --git a/gflib/text.h b/gflib/text.h
index 0829d748f..b76897757 100644
--- a/gflib/text.h
+++ b/gflib/text.h
@@ -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;