font: deprecate font_printf
This function is no longer needed since `gui` was revamped.
This commit is contained in:
parent
7c75118429
commit
ad1d6b1f66
|
@ -11,7 +11,6 @@ enum font
|
|||
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;
|
||||
|
|
|
@ -64,25 +64,6 @@ static int renderstr(const enum font f, const short x, short y, const char *str)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int font_printf(const enum font f, const short x, const short y,
|
||||
const char *const fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
char defstr[1024];
|
||||
const int sz = vsnprintf(defstr, sizeof defstr, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
if (sz < 0 || sz >= sizeof defstr
|
||||
|| renderstr(f, x, y, defstr))
|
||||
return -1;
|
||||
|
||||
return sz;
|
||||
}
|
||||
|
||||
int font_puts(const enum font f, const short x, const short y,
|
||||
const char *const str)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue