mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
match DecompressGlyphTile nicer
This commit is contained in:
parent
c7ca38ccf3
commit
d70c3a94c5
@ -229,7 +229,7 @@ u32 RenderFont(struct TextPrinter *textPrinter);
|
|||||||
void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor);
|
void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||||
void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
||||||
void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
||||||
void DecompressGlyphTile(const u16 *src, void *dest_);
|
void DecompressGlyphTile(const void *src_, void *dest_);
|
||||||
u8 GetLastTextColor(u8 colorType);
|
u8 GetLastTextColor(u8 colorType);
|
||||||
void CopyGlyphToWindow(struct TextPrinter *x);
|
void CopyGlyphToWindow(struct TextPrinter *x);
|
||||||
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width);
|
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width);
|
||||||
|
10
src/text.c
10
src/text.c
@ -848,17 +848,17 @@ void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
|
|||||||
GenerateFontHalfRowLookupTable(*fgColor, *bgColor, *shadowColor);
|
GenerateFontHalfRowLookupTable(*fgColor, *bgColor, *shadowColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecompressGlyphTile(const u16 *src, void *dest_)
|
void DecompressGlyphTile(const u16 *src_, void *dest_)
|
||||||
{
|
{
|
||||||
u32 temp;
|
u32 temp;
|
||||||
|
const u16 *src = src_;
|
||||||
u32 *dest = dest_;
|
u32 *dest = dest_;
|
||||||
|
|
||||||
temp = *(src);
|
temp = *(src++);
|
||||||
*(dest)++ = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
|
*(dest)++ = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
|
||||||
|
|
||||||
temp = src[1];
|
temp = *(src++);
|
||||||
src += 2;
|
*(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
|
||||||
*(dest)++ = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
|
|
||||||
|
|
||||||
temp = *(src++);
|
temp = *(src++);
|
||||||
*(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
|
*(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]);
|
||||||
|
Loading…
Reference in New Issue
Block a user