X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=e6b8d9a9cb5f81de40340ab318b64ce60935f2f1;hb=19e168a132d1c0543a13cbf9495f579c137dea94;hp=a5aeb218940df516e836c1f544abbd022d3d0d39;hpb=a4bf969413cdda68ab8bb54a2a1181bdc09cf63a;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index a5aeb218..e6b8d9a9 100644 --- a/src/tools.c +++ b/src/tools.c @@ -11,7 +11,6 @@ * tools.c * ***********************************************************/ -#include #include #ifdef __FreeBSD__ @@ -282,7 +281,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 +298,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);