[Scummvm-git-logs] scummvm master -> 53db2cde0cd8c42f5e78ced4c50242a321818018

bluegr bluegr at gmail.com
Wed Mar 24 12:34:36 UTC 2021


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

Summary:
b3101c9923 GRIM: add RTL support for hebrew
53db2cde0c GRIM: Adjust comment


Commit: b3101c992379f43f559b37e63827af7d5d6f914e
    https://github.com/scummvm/scummvm/commit/b3101c992379f43f559b37e63827af7d5d6f914e
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2021-03-24T14:34:32+02:00

Commit Message:
GRIM: add RTL support for hebrew

Changed paths:
    engines/grim/textobject.cpp


diff --git a/engines/grim/textobject.cpp b/engines/grim/textobject.cpp
index 2f17d479cb..1495c59cac 100644
--- a/engines/grim/textobject.cpp
+++ b/engines/grim/textobject.cpp
@@ -278,7 +278,17 @@ void TextObject::setupText() {
 			nextLinePos = message.size();
 			cutLen = nextLinePos;
 		}
-		Common::String currentLine(message.c_str(), message.c_str() + nextLinePos);
+		Common::String currentLine;
+
+		const char *start = message.c_str();
+		// support for hebrew translation - reverse line
+		if (g_grim->getGameLanguage() == Common::HE_ISR) {
+			for (const char *ch = start + nextLinePos - 1; ch > start; --ch)
+				currentLine += *ch;
+		} else {
+			currentLine = Common::String(start, start + nextLinePos);
+		}
+
 		_lines[j] = currentLine;
 		int width = _font->getKernedStringLength(currentLine);
 		if (width > _maxLineWidth)


Commit: 53db2cde0cd8c42f5e78ced4c50242a321818018
    https://github.com/scummvm/scummvm/commit/53db2cde0cd8c42f5e78ced4c50242a321818018
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-03-24T14:34:32+02:00

Commit Message:
GRIM: Adjust comment

Changed paths:
    engines/grim/textobject.cpp


diff --git a/engines/grim/textobject.cpp b/engines/grim/textobject.cpp
index 1495c59cac..eb12615187 100644
--- a/engines/grim/textobject.cpp
+++ b/engines/grim/textobject.cpp
@@ -281,7 +281,7 @@ void TextObject::setupText() {
 		Common::String currentLine;
 
 		const char *start = message.c_str();
-		// support for hebrew translation - reverse line
+		// Reverse the line for the Hebrew translation
 		if (g_grim->getGameLanguage() == Common::HE_ISR) {
 			for (const char *ch = start + nextLinePos - 1; ch > start; --ch)
 				currentLine += *ch;




More information about the Scummvm-git-logs mailing list