[Scummvm-git-logs] scummvm master -> 8fa1bf8cbdd516c8120d5861c20f729a07c0812e

antoniou79 antoniou at cti.gr
Thu Mar 21 09:12:08 CET 2019


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:
8fa1bf8cbd BLADERUNNER: Support of localizations that use E as languageCode


Commit: 8fa1bf8cbdd516c8120d5861c20f729a07c0812e
    https://github.com/scummvm/scummvm/commit/8fa1bf8cbdd516c8120d5861c20f729a07c0812e
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-03-21T10:10:23+02:00

Commit Message:
BLADERUNNER: Support of localizations that use E as languageCode

Improved alignment of subtitles option for Russian version

The text for the subtitles option probably won't make sense though in Russian, someone will have to correct it to what it should be.

Changed paths:
    engines/bladerunner/dialogue_menu.cpp
    engines/bladerunner/subtitles.h
    engines/bladerunner/ui/kia_section_settings.cpp


diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp
index c3aced0..6339fa1 100644
--- a/engines/bladerunner/dialogue_menu.cpp
+++ b/engines/bladerunner/dialogue_menu.cpp
@@ -119,7 +119,7 @@ bool DialogueMenu::addToList(int answer, bool done, int priorityPolite, int prio
 #else
 // fix spelling or entry id 1020 to DRAGONFLY JEWELRY in English version
 	const char *answerTextCP = _textResource->getText(answer);
-	if (_vm->_languageCode == "E" && answer == 1020 && strcmp(answerTextCP, "DRAGONFLY JEWERLY") == 0) {
+	if (_vm->_language == Common::EN_ANY && answer == 1020 && strcmp(answerTextCP, "DRAGONFLY JEWERLY") == 0) {
 		answerTextCP = "DRAGONFLY JEWELRY";
 	}
 	const Common::String &text = answerTextCP;
diff --git a/engines/bladerunner/subtitles.h b/engines/bladerunner/subtitles.h
index 0a3ec82..e52e19c 100644
--- a/engines/bladerunner/subtitles.h
+++ b/engines/bladerunner/subtitles.h
@@ -43,9 +43,8 @@ class Font;
 class Subtitles {
 	friend class Debugger;
 	//
-	// Subtitles could be in 6 possible languages are EN_ANY, DE_DEU, FR_FRA, IT_ITA, ES_ESP
-	//                   with corresponding _vm->_languageCode values: "E", "G", "F", "I", "R", "S"
-
+	// Subtitles could be in 6 possible languages are EN_ANY, DE_DEU, FR_FRA, IT_ITA, RU_RUS, ES_ESP
+	//                   with corresponding _vm->_languageCode values: "E", "G", "F", "I", "E", "S" (Russian version is built on top of English one)
 	static const int kMaxNumOfSubtitlesLines = 4;					// At least one quote in the game requires 4 lines to be displayed correctly
 	static const int kStartFromSubtitleLineFromTop = 2;				// Prefer drawing from this line (the top-most of available subtitle lines index is 0) by default
 	static const int kSubtitlesBottomYOffsetPx = 12;				// In pixels. This is the bottom margin beneath the subtitles space
diff --git a/engines/bladerunner/ui/kia_section_settings.cpp b/engines/bladerunner/ui/kia_section_settings.cpp
index 2d0ab1d..a2908ad 100644
--- a/engines/bladerunner/ui/kia_section_settings.cpp
+++ b/engines/bladerunner/ui/kia_section_settings.cpp
@@ -65,8 +65,13 @@ KIASectionSettings::KIASectionSettings(BladeRunnerEngine *vm)
 	_speechVolume         = new UISlider(_vm, sliderCallback, this, Common::Rect(180, 210, 460, 220), _vm->_mixer->kMaxMixerVolume, 0);
 #endif
 
-	_directorsCut         = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(180, 364, 270, 374), 0, false);
-	_subtitlesEnable      = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(311, 364, 380, 374), 0, false); // moved further to the right to avoid overlap with 'Designer's Cut' in some language versions (ESP)
+	if (_vm->_language == Common::RU_RUS) {
+		_directorsCut         = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(180, 364, 436, 374), 0, false); // expanded click-bounding box x-axis
+		_subtitlesEnable      = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(276, 376, 345, 386), 0, false); // moved to new line
+	} else {
+		_directorsCut         = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(180, 364, 270, 374), 0, false);
+		_subtitlesEnable      = new UICheckBox(_vm, checkBoxCallback, this, Common::Rect(311, 364, 380, 374), 0, false); // moved further to the right to avoid overlap with 'Designer's Cut' in some language versions (ESP)
+	}
 	_playerAgendaSelector = new UIImagePicker(_vm, 5);
 
 	_uiContainer->add(_musicVolume);
@@ -195,28 +200,27 @@ void KIASectionSettings::draw(Graphics::Surface &surface) {
 	if (_vm->_subtitles->isSystemActive()) {
 		// Allow this to be loading as an extra text item in the resource for text options
 		const char *subtitlesTranslation = "Subtitles";
-		if (_vm->_languageCode == "E") {
-			subtitlesTranslation = "Subtitles"; // EN_ANY
-		}
-		else if (_vm->_languageCode == "G") {
-			subtitlesTranslation = "Untertitel"; // DE_DEU
-		}
-		else if (_vm->_languageCode == "F") {
-			subtitlesTranslation = "Sous-titres"; // FR_FRA
-		}
-		else if (_vm->_languageCode == "I") {
-			subtitlesTranslation = "Sottotitoli"; // IT_ITA
-		}
-		else if (_vm->_languageCode == "R") {
-			subtitlesTranslation = "Subtitry";  // RU_RUS
-		}
-		else if (_vm->_languageCode == "S") {
-			subtitlesTranslation = "Subtitulos"; // ES_ESP
+		if (_vm->_language == Common::EN_ANY) {
+			subtitlesTranslation = "Subtitles";        // EN_ANY
+		} else if (_vm->_language == Common::DE_DEU) {
+			subtitlesTranslation = "Untertitel";       // DE_DEU
+		} else if (_vm->_language == Common::FR_FRA) {
+			subtitlesTranslation = "Sous-titres";      // FR_FRA
+		} else if (_vm->_language == Common::IT_ITA) {
+			subtitlesTranslation = "Sottotitoli";      // IT_ITA
+		} else if (_vm->_language == Common::RU_RUS) {
+			subtitlesTranslation = "Subtitry";         // RU_RUS
+		} else if (_vm->_language == Common::ES_ESP) {
+			subtitlesTranslation = "Subtitulos";       // ES_ESP
 		}
 
 		const char *textSubtitles  = strcmp(_vm->_textOptions->getText(42), "") == 0? subtitlesTranslation : _vm->_textOptions->getText(42); // +1 to the max of original index of textOptions which is 41
 
-		_vm->_mainFont->drawColor(textSubtitles, surface, 323, 365, 0x7751); // moved further to the right to avoid overlap with 'Designer's Cut' in some language versions (ESP)
+		if (_vm->_language == Common::RU_RUS) {
+			_vm->_mainFont->drawColor(textSubtitles, surface, 288, 376, 0x7751); // special case for Russian version, put the option in a new line to avoid overlap
+		} else {
+			_vm->_mainFont->drawColor(textSubtitles, surface, 323, 365, 0x7751); // moved further to the right to avoid overlap with 'Designer's Cut' in some language versions (ESP)
+		}
 	}
 
 	_playerAgendaSelector->drawTooltip(surface, _mouseX, _mouseY);





More information about the Scummvm-git-logs mailing list