aboutsummaryrefslogtreecommitdiffstats
path: root/src/text/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/text/text.h')
-rw-r--r--src/text/text.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/text/text.h b/src/text/text.h
index 01dddb0..931227c 100644
--- a/src/text/text.h
+++ b/src/text/text.h
@@ -109,12 +109,12 @@ txt_position(size_t tile_x, size_t tile_y) {
109// color merging issues. 109// color merging issues.
110static inline 110static inline
111void 111void
112txt_draws(char *msg, size_t x, size_t y, size_t spacing) { 112txt_draws(char *msg, size_t x, size_t y, size_t spacing, u8 clr) {
113 while (*msg) { 113 while (*msg) {
114 char c = *msg++; 114 char c = *msg++;
115 Tile *tile = FONT_DATA; 115 Tile *tile = FONT_DATA;
116 tile += c; 116 tile += c;
117 draw_tile(x, y, tile, true); 117 draw_tile(x, y, tile, clr, true);
118 x += spacing; 118 x += spacing;
119 } 119 }
120} 120}
@@ -129,11 +129,11 @@ txt_draws(char *msg, size_t x, size_t y, size_t spacing) {
129 129
130// Draws text to the screen with formatting starting on the x and y position and 130// Draws text to the screen with formatting starting on the x and y position and
131// with custom character spacing. 131// with custom character spacing.
132#define txt_drawf(msg, x, y, s, ...) \ 132#define txt_drawf(msg, x, y, s, c, ...) \
133 { \ 133 { \
134 char buf[256] = {0}; \ 134 char buf[256] = {0}; \
135 posprintf(buf, msg, ##__VA_ARGS__); \ 135 posprintf(buf, msg, ##__VA_ARGS__); \
136 txt_draws(buf, x, y, s); \ 136 txt_draws(buf, x, y, s, c); \
137 } 137 }
138 138
139#endif // TEXT_H 139#endif // TEXT_H