summaryrefslogtreecommitdiff
path: root/src/text.c
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2019-03-23 09:39:46 -0500
committerMarcus Huderle <huderlem@gmail.com>2019-03-23 09:39:46 -0500
commit65391a1eb2979dc050dd4a98afea02bb0ef310ea (patch)
treee31a90d0966cec7e8713ead9ca8083d439c8d9b5 /src/text.c
parenteb48cc2f7eefc1e56c2dcec21c38381b4534b897 (diff)
parentabe56579c107af58e6f3a43968ba2257ff358189 (diff)
Merge remote-tracking branch 'upstream/master' into use_pokeblock
# Conflicts: # src/use_pokeblock.c
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/text.c b/src/text.c
index a439d3ced..be4bf2697 100644
--- a/src/text.c
+++ b/src/text.c
@@ -12,10 +12,6 @@
#include "menu.h"
#include "dynamic_placeholder_text_util.h"
-extern u8 GetKeypadIconWidth(u8 keypadIconId);
-extern u16 Font6Func(struct TextPrinter *textPrinter);
-extern u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese);
-
EWRAM_DATA struct TextPrinter gTempTextPrinter = {0};
EWRAM_DATA struct TextPrinter gTextPrinters[NUM_TEXT_PRINTERS] = {0};
@@ -1581,7 +1577,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
textPrinter->printerTemplate.currentChar++;
return 2;
case 15:
- FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, textPrinter->printerTemplate.bgColor | textPrinter->printerTemplate.bgColor << 4);
+ FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
return 2;
@@ -1702,7 +1698,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
case 2:
if (TextPrinterWaitWithDownArrow(textPrinter))
{
- FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, (textPrinter->printerTemplate.bgColor << 4) | textPrinter->printerTemplate.bgColor);
+ FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
textPrinter->state = 0;
@@ -1724,12 +1720,12 @@ u16 RenderText(struct TextPrinter *textPrinter)
int speed = gWindowVerticalScrollSpeeds[scrollSpeed];
if (textPrinter->scrollDistance < speed)
{
- ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, textPrinter->printerTemplate.bgColor << 4 | textPrinter->printerTemplate.bgColor);
+ ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->scrollDistance = 0;
}
else
{
- ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, textPrinter->printerTemplate.bgColor << 4 | textPrinter->printerTemplate.bgColor);
+ ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->scrollDistance -= speed;
}
CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);