[Scummvm-git-logs] scummvm master -> 89498a4c04088e358a696a3e83ebb9896e57bbc0

bluegr noreply at scummvm.org
Sun Aug 2 23:35:53 UTC 2026


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

Summary:
89498a4c04 SCI32: Fix right-to-left alignment of scrolled text lines


Commit: 89498a4c04088e358a696a3e83ebb9896e57bbc0
    https://github.com/scummvm/scummvm/commit/89498a4c04088e358a696a3e83ebb9896e57bbc0
Author: Zvika Haramaty (haramaty.zvika at gmail.com)
Date: 2026-08-03T02:35:49+03:00

Commit Message:
SCI32: Fix right-to-left alignment of scrolled text lines

`drawTextBox()` mirrors the horizontal alignments for right-to-left
languages, so that `kTextAlignLeft` pushes a line to the far edge of
the text rect. `scrollLine()` was missing that, leaving scrolled lines
at the left edge while every other line was drawn at the right.

Noticed in the Hebrew fan translation of SQ6, where the message window
is aligned correctly until it scrolls.

Assisted-by: Claude:claude-opus-5

Changed paths:
    engines/sci/graphics/text32.cpp


diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index fdc0cc8cf2e..c1d56002893 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -863,9 +863,10 @@ void GfxText32::scrollLine(const Common::String &lineText, int numLines, uint8 c
 	_text = lineText;
 	int16 textWidth = getTextWidth(0, lineText.size());
 
+	const TextAlign farEdge = !g_sci->isLanguageRTL() ? kTextAlignRight : kTextAlignLeft;
 	if (_alignment == kTextAlignCenter) {
 		_drawPosition.x += (_textRect.width() - textWidth) / 2;
-	} else if (_alignment == kTextAlignRight) {
+	} else if (_alignment == farEdge) {
 		_drawPosition.x += _textRect.width() - textWidth;
 	}
 




More information about the Scummvm-git-logs mailing list