[Scummvm-git-logs] scummvm master -> 91fb2294700dd932bb114ea5422e815521c33b54

mduggan noreply at scummvm.org
Mon Apr 17 11:36:19 UTC 2023


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:
e8e4556f37 TETRAEDGE: Support Hebrew fan translation
91fb229470 TETRAEDGE: Select language based on main file only


Commit: e8e4556f378a47c0539ac5d441dfdd4766086db0
    https://github.com/scummvm/scummvm/commit/e8e4556f378a47c0539ac5d441dfdd4766086db0
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2023-04-17T20:36:14+09:00

Commit Message:
TETRAEDGE: Support Hebrew fan translation

Changed paths:
    engines/tetraedge/detection.cpp
    engines/tetraedge/game/application.cpp
    engines/tetraedge/te/te_font3.cpp


diff --git a/engines/tetraedge/detection.cpp b/engines/tetraedge/detection.cpp
index 1e33c369493..d7094038435 100644
--- a/engines/tetraedge/detection.cpp
+++ b/engines/tetraedge/detection.cpp
@@ -45,6 +45,7 @@ static const Common::Language *getGameLanguages() {
 		Common::IT_ITA,
 		Common::ES_ESP,
 		Common::RU_RUS,
+		Common::HE_ISR,  // This is a Fan-translation, which requires additional patch
 		Common::UNK_LANG
 	};
 	return languages;
diff --git a/engines/tetraedge/game/application.cpp b/engines/tetraedge/game/application.cpp
index c44ce88802e..db54e638f03 100644
--- a/engines/tetraedge/game/application.cpp
+++ b/engines/tetraedge/game/application.cpp
@@ -151,7 +151,7 @@ void Application::create() {
 	textBase.build();
 	 */
 
-	static const char allLangs[][3] = {"en", "fr", "de", "es", "it", "ru"};
+	static const char allLangs[][3] = {"en", "fr", "de", "es", "it", "ru", "he"};
 	const Common::Path textsPath("texts");
 
 	// Try alternate langs..
diff --git a/engines/tetraedge/te/te_font3.cpp b/engines/tetraedge/te/te_font3.cpp
index a42abbf783f..0a390c0d81d 100644
--- a/engines/tetraedge/te/te_font3.cpp
+++ b/engines/tetraedge/te/te_font3.cpp
@@ -28,6 +28,7 @@
 #include "tetraedge/te/te_core.h"
 #include "graphics/font.h"
 #include "graphics/fonts/ttf.h"
+#include "common/unicode-bidi.h"
 
 namespace Tetraedge {
 
@@ -144,7 +145,10 @@ void TeFont3::draw(TeImage &destImage, const Common::String &str, int fontSize,
 
 	uint32 uintcol = ((uint32)col.a() << fmt.aShift) | ((uint32)(col.r()) << fmt.rShift)
 						| ((uint32)(col.g()) << fmt.gShift) | ((uint32)(col.b()) << fmt.bShift);
-	font->drawString(&destImage, str, 0, yoff, destImage.w, uintcol, talign);
+	Common::String line(str);
+	if (g_engine->getCore()->language() == "he")
+		line = Common::convertBiDiString(str, Common::kWindows1255);
+	font->drawString(&destImage, line, 0, yoff, destImage.w, uintcol, talign);
 }
 
 bool TeFont3::load(const Common::String &path) {


Commit: 91fb2294700dd932bb114ea5422e815521c33b54
    https://github.com/scummvm/scummvm/commit/91fb2294700dd932bb114ea5422e815521c33b54
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2023-04-17T20:36:14+09:00

Commit Message:
TETRAEDGE: Select language based on main file only

Changed paths:
    engines/tetraedge/game/application.cpp


diff --git a/engines/tetraedge/game/application.cpp b/engines/tetraedge/game/application.cpp
index db54e638f03..0ba25825c9f 100644
--- a/engines/tetraedge/game/application.cpp
+++ b/engines/tetraedge/game/application.cpp
@@ -174,12 +174,13 @@ void Application::create() {
 	if (!g_engine->gameIsAmerzone()) {
 		const Common::Path helpMenuPath("menus/help/help_");
 		Common::Path helpMenuFilePath;
+		Common::String lang(core->language());
 		i = 0;
 		while (i < ARRAYSIZE(allLangs)) {
-			helpMenuFilePath = helpMenuPath.append(core->language() + ".xml");
+			helpMenuFilePath = helpMenuPath.append(lang + ".xml");
 			if (Common::File::exists(helpMenuFilePath))
 				break;
-			core->language(allLangs[i]);
+			lang = allLangs[i];
 			i++;
 		}
 		if (i == ARRAYSIZE(allLangs)) {




More information about the Scummvm-git-logs mailing list