diff options
Diffstat (limited to 'src/renderer_m0.c')
-rw-r--r-- | src/renderer_m0.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/renderer_m0.c b/src/renderer_m0.c index 00874ea..bf15f56 100644 --- a/src/renderer_m0.c +++ b/src/renderer_m0.c | |||
@@ -837,6 +837,25 @@ txt_drawc(char c, size_t x, size_t y, u8 clr) { | |||
837 | draw_icn(x, y, tile + 8 * c, clr, 1, 0); | 837 | draw_icn(x, y, tile + 8 * c, clr, 1, 0); |
838 | } | 838 | } |
839 | 839 | ||
840 | void | ||
841 | txt_drawc_small(char c, size_t x, size_t y, u8 clr) { | ||
842 | u8 *tile = font_icn; | ||
843 | c = c < 'a' ? c + 16 * 6 : c + 16 * 4; | ||
844 | draw_icn(x, y, tile + 8 * c, clr, 1, 0); | ||
845 | } | ||
846 | |||
847 | #define txt_drawf_small(msg, x, y, clr, ...) \ | ||
848 | { \ | ||
849 | char buf[256] = {0}; \ | ||
850 | posprintf(buf, msg, ##__VA_ARGS__); \ | ||
851 | u8 tmp = text_engine.spacing;\ | ||
852 | txt_spacing(4);\ | ||
853 | text_engine.drawc = txt_drawc_small;\ | ||
854 | txt_draws(buf, x, y, clr); \ | ||
855 | txt_spacing(tmp);\ | ||
856 | text_engine.drawc = txt_drawc;\ | ||
857 | } | ||
858 | |||
840 | // | 859 | // |
841 | // Initialization. | 860 | // Initialization. |
842 | // | 861 | // |