summaryrefslogtreecommitdiff
path: root/src/text_printer.c
diff options
context:
space:
mode:
authorSwastik Baranwal <swstkbaranwal@gmail.com>2019-06-23 18:47:35 +0530
committerGitHub <noreply@github.com>2019-06-23 18:47:35 +0530
commit99703c6ab831d34e6859d8a8f53ba8e73dc4d3d9 (patch)
tree3a712d3039d152616af58a45a13d82c40a87e58f /src/text_printer.c
parent6d190f861e3559eec922cd760778c0cba6e08397 (diff)
parent9ee0c34758a63f8c00724b6fc984b4e96be2f7af (diff)
Merge pull request #5 from pret/master
Take files
Diffstat (limited to 'src/text_printer.c')
-rw-r--r--src/text_printer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/text_printer.c b/src/text_printer.c
index 04de1af4c..6c124b448 100644
--- a/src/text_printer.c
+++ b/src/text_printer.c
@@ -48,11 +48,11 @@ void DeactivateAllTextPrinters (void)
sTextPrinters[printer].sub_union.sub.active = 0;
}
-u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16))
+u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16))
{
- struct TextSubPrinter subPrinter;
+ struct TextPrinterTemplate subPrinter;
- subPrinter.current_text_offset = str;
+ subPrinter.currentChar = str;
subPrinter.windowId = windowId;
subPrinter.fontId = fontId;
subPrinter.x = x;
@@ -61,14 +61,14 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8
subPrinter.currentY = y;
subPrinter.letterSpacing = gFonts[fontId].letterSpacing;
subPrinter.lineSpacing = gFonts[fontId].lineSpacing;
- subPrinter.fontColor_l = gFonts[fontId].fontColor_l;
- subPrinter.fontColor_h = gFonts[fontId].fontColor_h;
+ subPrinter.unk = gFonts[fontId].unk;
+ subPrinter.fgColor = gFonts[fontId].fgColor;
subPrinter.bgColor = gFonts[fontId].bgColor;
subPrinter.shadowColor = gFonts[fontId].shadowColor;
return AddTextPrinter(&subPrinter, speed, callback);
}
-bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16))
+bool16 AddTextPrinter(struct TextPrinterTemplate *textSubPrinter, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16))
{
int i;
u16 j;
@@ -92,7 +92,7 @@ bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*ca
sTempTextPrinter.minLetterSpacing = 0;
sTempTextPrinter.japanese = 0;
- GenerateFontHalfRowLookupTable(textSubPrinter->fontColor_h, textSubPrinter->bgColor, textSubPrinter->shadowColor);
+ GenerateFontHalfRowLookupTable(textSubPrinter->fgColor, textSubPrinter->bgColor, textSubPrinter->shadowColor);
if (speed != TEXT_SPEED_FF && speed != 0x0)
{
--sTempTextPrinter.text_speed;