From: Holger Schemel Date: Wed, 14 Dec 2022 22:53:21 +0000 (+0100) Subject: added forced line break support to auto-wrapped text output X-Git-Tag: 4.3.4.0~15 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=311a3f217666744c8ce72093c37c58acf952c115 added forced line break support to auto-wrapped text output To add a line break to auto-wrapped text output (like level set info text files), use two spaces at the end of a line (like it is used in Markdown formatted text). --- diff --git a/src/libgame/text.c b/src/libgame/text.c index ce855daf..4de7319a 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -404,6 +404,9 @@ static boolean RenderLineToBuffer(char **src_buffer_ptr, char *dst_buffer, char *word_ptr; int word_len; + if (strEqual(text_ptr, " ")) // special case: force line break + buffer_filled = TRUE; + // skip leading whitespaces while (*text_ptr == ' ' || *text_ptr == '\t') text_ptr++;