From f17c76c4007563389188c147d4e1c766039fb686 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 26 Jun 2022 17:51:04 +0200 Subject: font: add font_puts --- src/font/inc/font.h | 1 + src/font/src/font.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/font/inc/font.h b/src/font/inc/font.h index 2d8bd2f..4e160c0 100644 --- a/src/font/inc/font.h +++ b/src/font/inc/font.h @@ -12,6 +12,7 @@ enum font }; int font_printf(enum font f, short x, short y, const char *fmt, ...); +int font_puts(enum font, short x, short y, const char *s); extern struct sprite font_sprite; diff --git a/src/font/src/font.c b/src/font/src/font.c index 990a7b2..2e1b22c 100644 --- a/src/font/src/font.c +++ b/src/font/src/font.c @@ -82,3 +82,9 @@ int font_printf(const enum font f, const short x, const short y, return sz; } + +int font_puts(const enum font f, const short x, const short y, + const char *const str) +{ + return renderstr(f, x, y, str) ? EOF : 0; +} -- cgit v1.2.3