[Scummvm-git-logs] scummvm master -> 23b52232ace65b2e16b94038f5878dea64b85c71

bluegr noreply at scummvm.org
Sat May 23 11:05:49 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:
23b52232ac PRINCE: Support hebrew translation


Commit: 23b52232ace65b2e16b94038f5878dea64b85c71
    https://github.com/scummvm/scummvm/commit/23b52232ace65b2e16b94038f5878dea64b85c71
Author: BLooperZ (blooperz at users.noreply.github.com)
Date: 2026-05-23T14:05:45+03:00

Commit Message:
PRINCE: Support hebrew translation

Changed paths:
    engines/prince/detection.cpp
    engines/prince/inventory.cpp
    engines/prince/mob.cpp
    engines/prince/option_text.h
    engines/prince/prince.cpp


diff --git a/engines/prince/detection.cpp b/engines/prince/detection.cpp
index 6748c594b4b..a83f97ed8b1 100644
--- a/engines/prince/detection.cpp
+++ b/engines/prince/detection.cpp
@@ -151,6 +151,20 @@ static const PrinceGameDescription gameDescriptions[] = {
 		},
 		kPrinceDataPL
 	},
+	{
+		{
+			"prince",
+			"w/translation",
+			AD_ENTRY3s("databank.ptc", "48ec9806bda9d152acbea8ce31c93c49", 3435298,
+					   "FONT1.RAW", "2d9c697eda8de12fefbac449521d4edd", 33904,
+					   "prince_translation.dat", nullptr, AD_NO_SIZE),
+			Common::HE_ISR,
+			Common::kPlatformWindows,
+			GF_TRANSLATED | ADGF_DROPPLATFORM,
+			GUIO2(GAMEOPTION_TTS_OBJECTS, GAMEOPTION_TTS_SPEECH)
+		},
+		kPrinceDataPL
+	},
 	{ AD_TABLE_END_MARKER, kPrinceDataUNK }
 };
 
diff --git a/engines/prince/inventory.cpp b/engines/prince/inventory.cpp
index 84e81548288..6080dc047f8 100644
--- a/engines/prince/inventory.cpp
+++ b/engines/prince/inventory.cpp
@@ -19,6 +19,8 @@
  *
  */
 
+#include "common/unicode-bidi.h"
+
 #include "prince/prince.h"
 
 #include "prince/graphics.h"
@@ -536,6 +538,9 @@ void PrinceEngine::checkOptions() {
 					optText = optionsTextRU[i];
 				}
 				break;
+			case Common::HE_ISR:
+				optText = optionsTextHE[i];
+				break;
 			default:
 				break;
 			};
@@ -552,6 +557,8 @@ void PrinceEngine::checkOptions() {
 			}
 			
 			uint16 textW = getTextWidth(optText.c_str());
+			if (getLanguage() == Common::HE_ISR)
+				optText = Common::convertBiDiString(optText, Common::kWindows1255);
 			uint16 textX = _optionsX + _optionsWidth / 2 - textW / 2;
 			_font->drawString(_graph->_frontScreen, optText, textX, textY, textW, optionsColor);
 			textY += _optionsStep;
@@ -603,6 +610,9 @@ void PrinceEngine::checkInvOptions() {
 					invText = invOptionsTextRU[i];
 				}
 				break;
+			case Common::HE_ISR:
+				invText = invOptionsTextHE[i];
+				break;
 			default:
 				error("Unknown game language %d", getLanguage());
 				break;
@@ -620,6 +630,8 @@ void PrinceEngine::checkInvOptions() {
 			}
 
 			uint16 textW = getTextWidth(invText.c_str());
+			if (getLanguage() == Common::HE_ISR)
+				invText = Common::convertBiDiString(invText, Common::kWindows1255);
 			uint16 textX = _optionsX + _invOptionsWidth / 2 - textW / 2;
 			_font->drawString(_graph->_screenForInventory, invText, textX, textY, _graph->_screenForInventory->w, optionsColor);
 			textY += _invOptionsStep;
diff --git a/engines/prince/mob.cpp b/engines/prince/mob.cpp
index d7d3c586d39..0b26c4d9314 100644
--- a/engines/prince/mob.cpp
+++ b/engines/prince/mob.cpp
@@ -19,6 +19,9 @@
  *
  */
 
+
+#include "common/unicode-bidi.h"
+
 #include "prince/prince.h"
 
 #include "prince/mob.h"
@@ -265,6 +268,8 @@ int PrinceEngine::checkMob(Graphics::Surface *screen, Common::Array<Mob> &mobLis
 			y = _font->getFontHeight() - 2;
 		}
 
+		if (getLanguage() == Common::HE_ISR)
+			mobName = Common::convertBiDiString(mobName, Common::kWindows1255);
 		_font->drawString(screen, mobName, x, y, screen->w, 216);
 	}
 
diff --git a/engines/prince/option_text.h b/engines/prince/option_text.h
index 940807ae63e..0da71bad06c 100644
--- a/engines/prince/option_text.h
+++ b/engines/prince/option_text.h
@@ -138,4 +138,23 @@ const char *optionsTextRU2[] = {
 	"c""\x8e""\x82""\x8e""\x90""\x88""\x92""\x9c"
 };
 
+// HE
+const char *invOptionsTextHE[] = {
+	"\xe1\xe7\xef",
+	"\xe4\xf9\xfa\xee\xf9",
+	"\xf4\xfa\xe7/\xe3\xe7\xe5\xf3",
+	"\xf1\xe2\xe5\xf8/\xee\xf9\xe5\xea",
+	"\xfa\xef"
+};
+
+const char *optionsTextHE[] = {
+	"\xec\xea \xe0\xec",
+	"\xe1\xe7\xef",
+	"\xf7\xe7",
+	"\xe4\xf9\xfa\xee\xf9",
+	"\xf4\xfa\xe7/\xe3\xe7\xe5\xf3",
+	"\xf1\xe2\xe5\xf8/\xee\xf9\xe5\xea",
+	"\xf9\xe5\xe7\xe7 \xf2\xed"
+};
+
 } // End of namespace Prince
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 078393180a4..64a1ece6a39 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -30,6 +30,7 @@
 #include "common/keyboard.h"
 #include "common/substream.h"
 #include "common/str.h"
+#include "common/unicode-bidi.h"
 
 #include "graphics/surface.h"
 #include "graphics/pixelformat.h"
@@ -825,7 +826,10 @@ void PrinceEngine::showTexts(Graphics::Surface *screen) {
 				if (drawY < 0) {
 					drawY = 0;
 				}
-				_font->drawString(screen, lines[i], drawX, drawY, screen->w, text._color);
+				Common::String line = lines[i];
+				if (getLanguage() == Common::HE_ISR)
+					line = Common::convertBiDiString(line, Common::kWindows1255);
+				_font->drawString(screen, line, drawX, drawY, screen->w, text._color);
 			}
 		}
 
@@ -1198,8 +1202,17 @@ void PrinceEngine::dialogRun() {
 					}
 				}
 
+				Graphics::TextAlign textAlign = Graphics::kTextAlignLeft;
+				int width = _graph->_frontScreen->w;
+				if (getLanguage() == Common::HE_ISR) {
+					textAlign = Graphics::kTextAlignRight;
+					width -= 2 * dialogTextX;
+				}
 				for (uint j = 0; j < lines.size(); j++) {
-					_font->drawString(_graph->_frontScreen, lines[j], dialogTextX, dialogTextY, _graph->_frontScreen->w, actualColor);
+					Common::String line = lines[j];
+					if (getLanguage() == Common::HE_ISR)
+						line = Common::convertBiDiString(line, Common::kWindows1255);
+					_font->drawString(_graph->_frontScreen, line, dialogTextX, dialogTextY, width, actualColor, textAlign);
 					dialogTextY += _font->getFontHeight();
 				}
 				dialogTextY += _dialogLineSpace;
@@ -1415,6 +1428,8 @@ void PrinceEngine::scrollCredits() {
 				}
 				if (!line.empty()) {
 					int drawX = (kNormalWidth - getTextWidth(line.c_str())) / 2;
+					if (getLanguage() == Common::HE_ISR)
+						line = Common::convertBiDiString(line, Common::kWindows1255);
 					_font->drawString(_graph->_frontScreen, line, drawX, drawY, _graph->_frontScreen->w, 217);
 				}
 




More information about the Scummvm-git-logs mailing list