From: Holger Schemel Date: Sun, 6 Mar 2022 23:49:31 +0000 (+0100) Subject: added wrapper function to draw text buffer at default field position X-Git-Tag: 4.3.2.0~95 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=516e119d29f14799bd352b05baa783ed4b56f07f;p=rocksndiamonds.git added wrapper function to draw text buffer at default field position --- diff --git a/src/libgame/text.c b/src/libgame/text.c index 17475e8c..0c586f10 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -646,6 +646,17 @@ int DrawTextBuffer(int x, int y, char *text_buffer, int font_nr, return current_line; } +int DrawTextBufferS(int x, int y, char *text_buffer, int font_nr, + int line_length, int cut_length, int max_lines, + int line_spacing, int mask_mode, boolean autowrap, + boolean centered, boolean parse_comments) +{ + return DrawTextBuffer(gfx.sx + x, gfx.sy + y, text_buffer, font_nr, + line_length, cut_length, max_lines, + line_spacing, mask_mode, autowrap, + centered, parse_comments); +} + int DrawTextBufferVA(int x, int y, char *format, va_list ap, int font_nr, int line_length, int cut_length, int max_lines, int line_spacing, int mask_mode, boolean autowrap, diff --git a/src/libgame/text.h b/src/libgame/text.h index 407cb31a..ff73c714 100644 --- a/src/libgame/text.h +++ b/src/libgame/text.h @@ -107,6 +107,8 @@ void DrawTextExt(DrawBuffer *, int, int, char *, int, int); char *GetTextBufferFromFile(char *, int); int DrawTextBuffer(int, int, char *, int, int, int, int, int, int, boolean, boolean, boolean); +int DrawTextBufferS(int, int, char *, int, int, int, int, int, int, + boolean, boolean, boolean); int DrawTextBufferVA(int, int, char *, va_list, int, int, int, int, int, int, boolean, boolean, boolean); int DrawTextFile(int, int, char *, int, int, int, int, int, int,