diff options
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -10,3 +10,13 @@ int font_init(const char *path) return 1; return 0; } + +void font_draw(int x, int y, const char *s) +{ + for (; *s != '\0'; s++) { + const int ix = *s % 16 * 8; + const int iy = *s / 16 * 16; + TZR_DrawImage(___font_spr, x*8, y*16, ix, iy, 8, 16); + x += 1; + } +} |