[Scummvm-git-logs] scummvm master -> 08ebcf62e3163a365f5a8b096d509e688bcf7f79

AndywinXp noreply at scummvm.org
Thu Jun 13 08:15:38 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
08ebcf62e3 SCUMM: v7: Fix string rendering for VERY tall characters


Commit: 08ebcf62e3163a365f5a8b096d509e688bcf7f79
    https://github.com/scummvm/scummvm/commit/08ebcf62e3163a365f5a8b096d509e688bcf7f79
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-06-13T10:15:33+02:00

Commit Message:
SCUMM: v7: Fix string rendering for VERY tall characters

We already had a fix in place taken from FT disasm:
2fa3484f5e957a184466842b7c2cccb7e09de2b5

> SCUMM: FT: Fix string rendering for tall characters
> The disasm shows that the rendering rect for a printed
> blastText should be 4 pixel taller in total:
> 2 on top, and 2 on the bottom.
> This fixes issues in which taller characters
> (like accented letters)
> triggered almost invisible graphical glitches.

It seems DIG needs just a little bit more pixels on top
and on bottom... Reported by mgerhardy on Discord,
DIG German left a trail of upper pixels when using the
ß character.

Changed paths:
    engines/scumm/string_v7.cpp


diff --git a/engines/scumm/string_v7.cpp b/engines/scumm/string_v7.cpp
index 1eb3274b91d..ccd7b132f28 100644
--- a/engines/scumm/string_v7.cpp
+++ b/engines/scumm/string_v7.cpp
@@ -229,8 +229,8 @@ void TextRenderer_v7::drawString(const char *str, byte *buffer, Common::Rect &cl
 
 	clipRect.left = MAX<int>(0, ((flags & kStyleAlignCenter) ? x - maxWidth / 2 : ((flags & kStyleAlignRight) ? x - maxWidth : x)) - xAdj);
 	clipRect.right = MIN<int>(clipRect.right, clipRect.left + xAdj + maxWidth);
-	clipRect.top = y2 - (_newStyle ? 0 : 2);
-	clipRect.bottom = y + (_newStyle ? 0 : 2);
+	clipRect.top = y2 - (_newStyle ? 0 : 4);
+	clipRect.bottom = y + (_newStyle ? 0 : 4);
 }
 
 void TextRenderer_v7::drawStringWrap(const char *str, byte *buffer, Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags) {
@@ -386,8 +386,8 @@ void TextRenderer_v7::drawStringWrap(const char *str, byte *buffer, Common::Rect
 
 	clipRect.left = MAX<int>(0, ((flags & kStyleAlignCenter) ? x - maxWidth / 2 : ((flags & kStyleAlignRight) ? x - maxWidth : x)) - xAdj);
 	clipRect.right = MIN<int>(clipRect.right, clipRect.left + xAdj + maxWidth);
-	clipRect.top = y2 - (_newStyle ? 0 : 2);
-	clipRect.bottom = y + (_newStyle ? 0 : 2);
+	clipRect.top = y2 - (_newStyle ? 0 : 4);
+	clipRect.bottom = y + (_newStyle ? 0 : 4);
 }
 
 Common::Rect TextRenderer_v7::calcStringDimensions(const char *str, int x, int y, TextStyleFlags flags) {




More information about the Scummvm-git-logs mailing list