summaryrefslogtreecommitdiff
path: root/gflib/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'gflib/text.c')
-rw-r--r--gflib/text.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gflib/text.c b/gflib/text.c
index d75be2fbf..eb993c421 100644
--- a/gflib/text.c
+++ b/gflib/text.c
@@ -1398,8 +1398,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
if (lineWidth > width)
return lineWidth;
- else
- return width;
+ return width;
}
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
@@ -1417,9 +1416,9 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
fgColor = TEXT_COLOR_WHITE;
bgColor = TEXT_COLOR_TRANSPARENT;
- shadowColor = TEXT_COLOR_LIGHT_GREY;
+ shadowColor = TEXT_COLOR_LIGHT_GRAY;
- GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GREY);
+ GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GRAY);
strLocal = str;
strPos = 0;
@@ -1633,8 +1632,7 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
if (isJapanese == TRUE)
{
- int eff;
- glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
+ glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10));
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
gCurGlyph.width = 8;
@@ -1762,8 +1760,7 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
if (isJapanese == TRUE)
{
- int eff;
- glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
+ glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10));
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
gCurGlyph.width = 8;