[Scummvm-git-logs] scummvm master -> 82be4ec7c079da028b51f44d5ce40a3c598b3f68

sluicebox 22204938+sluicebox at users.noreply.github.com
Wed Aug 5 20:04:29 UTC 2020


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:
82be4ec7c0 SCI: Make menus BiDi


Commit: 82be4ec7c079da028b51f44d5ce40a3c598b3f68
    https://github.com/scummvm/scummvm/commit/82be4ec7c079da028b51f44d5ce40a3c598b3f68
Author: Zvika Haramaty (haramaty.zvika at gmail.com)
Date: 2020-08-05T13:04:25-07:00

Commit Message:
SCI: Make menus BiDi

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


diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 1e88588be1..323c8829f6 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -597,7 +597,7 @@ void GfxText16::Box(const char *text, uint16 languageSplitter, bool show, const
 		if (g_sci->isLanguageRTL()) {
 			const char *curTextLineOrig = curTextLine;
 			Common::String textLogical = Common::String(curTextLineOrig, (uint32)charCount);
-			textString = Common::convertBiDiString(textLogical, g_sci->getLanguage());		//TODO: maybe move to Draw()?
+			textString = Common::convertBiDiString(textLogical, g_sci->getLanguage());
 			curTextLine = textString.c_str();
 		}
 
@@ -633,10 +633,16 @@ void GfxText16::Box(const char *text, uint16 languageSplitter, bool show, const
 	}
 }
 
-void GfxText16::DrawString(const Common::String &text) {
+void GfxText16::DrawString(const Common::String &textOrig) {
 	GuiResourceId previousFontId = GetFontId();
 	int16 previousPenColor = _ports->_curPort->penClr;
 
+	Common::String text;
+	if (!g_sci->isLanguageRTL())
+		text = textOrig;
+	else
+		text = Common::convertBiDiString(textOrig, g_sci->getLanguage());
+
 	Draw(text.c_str(), 0, text.size(), previousFontId, previousPenColor);
 	SetFont(previousFontId);
 	_ports->penColor(previousPenColor);




More information about the Scummvm-git-logs mailing list