X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Ftext.c;h=eb36ab2285a47c42e0f8394e49a4d7850d419cf2;hb=c20136c10315df9e66a56f97db11023306032604;hp=0c586f10d6ae251e4d600e644bb8a1c33b4303fa;hpb=516e119d29f14799bd352b05baa783ed4b56f07f;p=rocksndiamonds.git diff --git a/src/libgame/text.c b/src/libgame/text.c index 0c586f10..eb36ab22 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -152,8 +152,8 @@ static void DrawInitTextExt(char *text, int ypos, int font_nr, boolean update) int width = video.width; int height = getFontHeight(font_nr); - ClearRectangle(drawto, 0, y, width, height); - DrawTextExt(drawto, x, y, text, font_nr, BLIT_OPAQUE); + ClearRectangleOnBackground(drawto, 0, y, width, height); + DrawTextExt(drawto, x, y, text, font_nr, BLIT_MASKED); if (update) BlitBitmap(drawto, window, 0, 0, video.width, video.height, 0, 0); @@ -371,6 +371,15 @@ char *GetTextBufferFromFile(char *filename, int max_lines) closeFile(file); + if (getTextEncoding(buffer) == TEXT_ENCODING_UTF_8) + { + char *body_latin1 = getLatin1FromUTF8(buffer); + + checked_free(buffer); + + buffer = body_latin1; + } + return buffer; }