[Scummvm-git-logs] scummvm master -> 34873d127ffd47ae520ead59234462d90f063f56

bluegr noreply at scummvm.org
Mon Sep 5 17:24:12 UTC 2022


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:
34873d127f SCI32: Make RTL BiDi conversion direction hard coded


Commit: 34873d127ffd47ae520ead59234462d90f063f56
    https://github.com/scummvm/scummvm/commit/34873d127ffd47ae520ead59234462d90f063f56
Author: Zvika Haramaty (haramaty.zvika at gmail.com)
Date: 2022-09-05T20:24:07+03:00

Commit Message:
SCI32: Make RTL BiDi conversion direction hard coded

The default behaviour for `Common::convertBiDiString` is to use
BIDI_PAR_ON for direction, which means that it tries to guess to
paragraph language, and choose the direction according to it.

However, in SQ6 many (all?) texts begin with control characters,
which make that function to think that these are English texts,
and therefore it chooses LTR direction, and punctuations are wrongly
placed.

Since the call to the function is under `if` clause for RTL,
it's safe to hard code that direction.

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


diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index ca7177f1da0..fdc0cc8cf2e 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -392,7 +392,7 @@ void GfxText32::drawText(const uint index, uint length) {
 	} else {
 		const char *textOrig = _text.c_str() + index;
 		Common::String textLogical = Common::String(textOrig, (uint32)length);
-		textString = Common::convertBiDiString(textLogical, g_sci->getLanguage());
+		textString = Common::convertBiDiString(textLogical, g_sci->getLanguage(), Common::BiDiParagraph::BIDI_PAR_RTL);
 		text = textString.c_str();
 	}
 




More information about the Scummvm-git-logs mailing list