X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Ftext.c;h=0c586f10d6ae251e4d600e644bb8a1c33b4303fa;hb=4ca952cbcd991a3e351b6292b37e47361b8f04d3;hp=c10583d3564ec2baea82324cb8cb9545627bad42;hpb=7bcc6aa833d64b21f78793dd00ed4c1356b98d05;p=rocksndiamonds.git diff --git a/src/libgame/text.c b/src/libgame/text.c index c10583d3..0c586f10 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -136,7 +136,7 @@ int maxWordLengthInRequestString(char *text) // simple text drawing functions // ============================================================================ -void DrawInitText(char *text, int ypos, int font_nr) +static void DrawInitTextExt(char *text, int ypos, int font_nr, boolean update) { LimitScreenUpdates(TRUE); @@ -155,10 +155,26 @@ void DrawInitText(char *text, int ypos, int font_nr) ClearRectangle(drawto, 0, y, width, height); DrawTextExt(drawto, x, y, text, font_nr, BLIT_OPAQUE); - BlitBitmap(drawto, window, 0, 0, video.width, video.height, 0, 0); + if (update) + BlitBitmap(drawto, window, 0, 0, video.width, video.height, 0, 0); } } +void DrawInitText(char *text, int ypos, int font_nr) +{ + DrawInitTextExt(text, ypos, font_nr, FALSE); +} + +void DrawInitTextHead(char *text) +{ + DrawInitTextExt(text, 120, FC_GREEN, FALSE); +} + +void DrawInitTextItem(char *text) +{ + DrawInitTextExt(text, 150, FC_YELLOW, TRUE); +} + void DrawTextF(int x, int y, int font_nr, char *format, ...) { char buffer[MAX_OUTPUT_LINESIZE + 1]; @@ -630,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,