summaryrefslogtreecommitdiff
path: root/src/battle_message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_message.c')
-rw-r--r--src/battle_message.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/battle_message.c b/src/battle_message.c
index 99ab8bbd6..018848218 100644
--- a/src/battle_message.c
+++ b/src/battle_message.c
@@ -2938,7 +2938,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
{
const struct BattleWindowText *textInfo = sBattleTextOnWindowsInfo[gBattleScripting.windowsType];
bool32 copyToVram;
- struct TextSubPrinter textSubPrinter;
+ struct TextPrinterTemplate printerTemplate;
u8 speed;
if (windowId & 0x80)
@@ -2952,25 +2952,25 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
copyToVram = TRUE;
}
- textSubPrinter.current_text_offset = text;
- textSubPrinter.windowId = windowId;
- textSubPrinter.fontId = textInfo[windowId].fontId;
- textSubPrinter.x = textInfo[windowId].x;
- textSubPrinter.y = textInfo[windowId].y;
- textSubPrinter.currentX = textSubPrinter.x;
- textSubPrinter.currentY = textSubPrinter.y;
- textSubPrinter.letterSpacing = textInfo[windowId].letterSpacing;
- textSubPrinter.lineSpacing = textInfo[windowId].lineSpacing;
- textSubPrinter.fontColor_l = 0;
- textSubPrinter.fgColor = textInfo[windowId].fgColor;
- textSubPrinter.bgColor = textInfo[windowId].bgColor;
- textSubPrinter.shadowColor = textInfo[windowId].shadowColor;
-
- if (textSubPrinter.x == 0xFF)
+ printerTemplate.currentChar = text;
+ printerTemplate.windowId = windowId;
+ printerTemplate.fontId = textInfo[windowId].fontId;
+ printerTemplate.x = textInfo[windowId].x;
+ printerTemplate.y = textInfo[windowId].y;
+ printerTemplate.currentX = printerTemplate.x;
+ printerTemplate.currentY = printerTemplate.y;
+ printerTemplate.letterSpacing = textInfo[windowId].letterSpacing;
+ printerTemplate.lineSpacing = textInfo[windowId].lineSpacing;
+ printerTemplate.fontColor_l = 0;
+ printerTemplate.fgColor = textInfo[windowId].fgColor;
+ printerTemplate.bgColor = textInfo[windowId].bgColor;
+ printerTemplate.shadowColor = textInfo[windowId].shadowColor;
+
+ if (printerTemplate.x == 0xFF)
{
u32 width = sub_80397C4(gBattleScripting.windowsType, windowId);
- s32 alignX = GetStringCenterAlignXOffsetWithLetterSpacing(textSubPrinter.fontId, textSubPrinter.current_text_offset, width, textSubPrinter.letterSpacing);
- textSubPrinter.x = textSubPrinter.currentX = alignX;
+ s32 alignX = GetStringCenterAlignXOffsetWithLetterSpacing(printerTemplate.fontId, printerTemplate.currentChar, width, printerTemplate.letterSpacing);
+ printerTemplate.x = printerTemplate.currentX = alignX;
}
if (windowId == 0x16)
@@ -2992,15 +2992,15 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
else
speed = GetPlayerTextSpeed();
- gTextFlags.flag_0 = 1;
+ gTextFlags.canABSpeedUpPrint = 1;
}
else
{
speed = textInfo[windowId].speed;
- gTextFlags.flag_0 = 0;
+ gTextFlags.canABSpeedUpPrint = 0;
}
- AddTextPrinter(&textSubPrinter, speed, NULL);
+ AddTextPrinter(&printerTemplate, speed, NULL);
if (copyToVram)
{