aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorThanasis Antoniou2019-03-21 10:07:59 +0200
committerThanasis Antoniou2019-03-21 10:10:23 +0200
commit8fa1bf8cbdd516c8120d5861c20f729a07c0812e (patch)
tree231497e5f83495fc91107700b657dabd1165e225 /engines
parent9b47d340b955c2bea7f033c88e69403ce4a82cca (diff)
downloadscummvm-rg350-8fa1bf8cbdd516c8120d5861c20f729a07c0812e.tar.gz
scummvm-rg350-8fa1bf8cbdd516c8120d5861c20f729a07c0812e.tar.bz2
scummvm-rg350-8fa1bf8cbdd516c8120d5861c20f729a07c0812e.zip
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.
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/dialogue_menu.cpp2
-rw-r--r--engines/bladerunner/subtitles.h5
-rw-r--r--engines/bladerunner/ui/kia_section_settings.cpp44
3 files changed, 27 insertions, 24 deletions
diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp
index c3aced0c73..6339fa1ef6 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 0a3ec820c8..e52e19c825 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 2d0ab1db85..a2908ad581 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);