Skip to content

Commit 355b92f

Browse files
authored
consolidate arrow tiles (#682)
1 parent d844877 commit 355b92f

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

graphics/fonts/down_arrow.png

-162 Bytes
Binary file not shown.

graphics/fonts/down_arrow_2.png

-150 Bytes
Binary file not shown.

graphics/fonts/down_arrow_RS.png

-163 Bytes
Binary file not shown.

graphics/fonts/down_arrow_RS_2.png

-150 Bytes
Binary file not shown.

graphics/fonts/down_arrows.png

237 Bytes
Loading

src/text.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#define CURSOR_DELAY 8
1212

13+
#define DARK_DOWN_ARROW_OFFSET 256
14+
1315
extern const struct OamData gOamData_AffineOff_ObjNormal_16x16;
1416

1517
static void DecompressGlyph_NormalCopy1(u16 glyphId, bool32 isJapanese);
@@ -26,12 +28,9 @@ static void SpriteCB_TextCursor(struct Sprite *sprite);
2628

2729
COMMON_DATA TextFlags gTextFlags = {0};
2830

29-
static const u8 sDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow.4bpp");
30-
static const u8 sDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_RS.4bpp");
31-
static const u8 sTinyArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_2.4bpp");
32-
static const u8 sTinyDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_RS_2.4bpp");
33-
static const u8 sDoubleArrowTiles1[] = INCBIN_U8("graphics/fonts/down_arrow_3.4bpp");
34-
static const u8 sDoubleArrowTiles2[] = INCBIN_U8("graphics/fonts/down_arrow_4.4bpp");
31+
static const u8 sDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrows.4bpp");
32+
static const u8 sDoubleArrowTiles1[] = INCBIN_U8("graphics/fonts/down_arrow_3.4bpp");
33+
static const u8 sDoubleArrowTiles2[] = INCBIN_U8("graphics/fonts/down_arrow_4.4bpp");
3534

3635
static const u8 sDownArrowYCoords[] = { 0, 16, 32, 16 };
3736
static const u8 sWindowVerticalScrollSpeeds[] = {
@@ -497,7 +496,7 @@ void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter)
497496
arrowTiles = sDownArrowTiles;
498497
break;
499498
case 1:
500-
arrowTiles = sDarkDownArrowTiles;
499+
arrowTiles = &sDownArrowTiles[DARK_DOWN_ARROW_OFFSET];
501500
break;
502501
}
503502

@@ -605,7 +604,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
605604
arrowTiles = sDownArrowTiles;
606605
break;
607606
case 1:
608-
arrowTiles = sDarkDownArrowTiles;
607+
arrowTiles = &sDownArrowTiles[DARK_DOWN_ARROW_OFFSET];
609608
break;
610609
}
611610

0 commit comments

Comments
 (0)