X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=671e2d89348b41c53c17935a534c29b757104735;hp=a5aeb218940df516e836c1f544abbd022d3d0d39;hb=dbdefdcdfa0fa58296160ffc6b72fea58bea5c75;hpb=a4bf969413cdda68ab8bb54a2a1181bdc09cf63a diff --git a/src/tools.c b/src/tools.c index a5aeb218..671e2d89 100644 --- a/src/tools.c +++ b/src/tools.c @@ -282,7 +282,7 @@ void ClearWindow() redraw_mask |= REDRAW_FIELD; } -void DrawTextCentered(int y, int font_type, char *format, ...) +void DrawTextFCentered(int y, int font_type, char *format, ...) { char buffer[FULL_SXSIZE / FONT3_XSIZE + 10]; int font_xsize; @@ -299,6 +299,18 @@ void DrawTextCentered(int y, int font_type, char *format, ...) buffer, FS_SMALL, font_type); } +void DrawTextF(int x, int y, int font_type, char *format, ...) +{ + char buffer[FULL_SXSIZE / FONT3_XSIZE + 10]; + va_list ap; + + va_start(ap, format); + vsprintf(buffer, format, ap); + va_end(ap); + + DrawText(SX + x, SY + y, buffer, FS_SMALL, font_type); +} + void DrawText(int x, int y, char *text, int font_size, int font_type) { DrawTextExt(drawto, gc, x, y, text, font_size, font_type);