Navigation Menu

Skip to content

Commit

Permalink
BLADERUNNER: All versions have ENG for BRLOGO and WSTLGO
Browse files Browse the repository at this point in the history
All game language versions have the English VQA for the logo videos

Do not append the localization suffix to those two, but use the '_E' suffix instead.
  • Loading branch information
antoniou79 authored and sev- committed Jan 6, 2019
1 parent 729d8a2 commit 9be700c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions engines/bladerunner/subtitles.cpp
Expand Up @@ -59,13 +59,13 @@ const Common::String Subtitles::SUBTITLES_FONT_FILENAME_EXTERNAL = "SUBTLS_E.FON

/*
* All entries need to have the language code appended (after a '_').
* And all entries should get the suffix extension ".TRE" (or FUTURE: the last letter in extension "TR*" should also be the language code)
* If/When adding new TRE resources here --> Update kMaxTextResourceEntries and also update method getIdxForSubsTreName()
* And all entries should get the suffix extension ".TRx"; the last letter in extension "TR*" should also be the language code
* If/When adding new Text Resources here --> Update kMaxTextResourceEntries and also update method getIdxForSubsTreName()
*/
const Common::String Subtitles::SUBTITLES_FILENAME_PREFIXES[kMaxTextResourceEntries] = {
"INGQUO", // 0 // (in-game subtitles, not VQA subtitles)
"WSTLGO", // 1
"BRLOGO", // 2
"WSTLGO", // 1 // all game (language) versions have the English ('E') version of WSTLGO
"BRLOGO", // 2 // all game (language) versions have the English ('E') version of BRLOGO
"INTRO", // 3
"MW_A", // 4
"MW_B01", // 5
Expand Down Expand Up @@ -137,8 +137,13 @@ void Subtitles::init(void) {
for (int i = 0; i < kMaxTextResourceEntries; i++) {
_vqaSubsTextResourceEntries[i] = new TextResource(_vm);
Common::String tmpConstructedFileName = "";
tmpConstructedFileName = SUBTITLES_FILENAME_PREFIXES[i] + "_" + _vm->_languageCode;
//tmpConstructedFileName += ".TRE"; // = Common::String::format("%s.TR%s", tmpConstructedFileName.c_str(), _vm->_languageCode.c_str());
if (SUBTITLES_FILENAME_PREFIXES[i] == "WSTLGO" || SUBTITLES_FILENAME_PREFIXES[i] == "BRLOGO") {
tmpConstructedFileName = SUBTITLES_FILENAME_PREFIXES[i] + "_E"; // Only English versions of these exist
}
else {
tmpConstructedFileName = SUBTITLES_FILENAME_PREFIXES[i] + "_" + _vm->_languageCode;
}

if ( _vqaSubsTextResourceEntries[i]->open(tmpConstructedFileName)) {
_gameSubsResourceEntriesFound[i] = true;
}
Expand Down Expand Up @@ -174,12 +179,17 @@ void Subtitles::setSubtitlesSystemInactive(bool flag) {

/**
*
* Returns the index of the specified .TRE filename in the SUBTITLES_FILENAME_PREFIXES table
* Returns the index of the specified Text Resource filename in the SUBTITLES_FILENAME_PREFIXES table
*/
int Subtitles::getIdxForSubsTreName(const Common::String &treName) const {
Common::String tmpConstructedFileName = "";
for (int i = 0; i < kMaxTextResourceEntries; ++i) {
tmpConstructedFileName = SUBTITLES_FILENAME_PREFIXES[i] + "_" + _vm->_languageCode;
if (SUBTITLES_FILENAME_PREFIXES[i] == "WSTLGO" || SUBTITLES_FILENAME_PREFIXES[i] == "BRLOGO") {
tmpConstructedFileName = SUBTITLES_FILENAME_PREFIXES[i] + "_E"; // Only English versions of these exist
}
else {
tmpConstructedFileName = SUBTITLES_FILENAME_PREFIXES[i] + "_" + _vm->_languageCode;
}
if (tmpConstructedFileName == treName) {
return i;
}
Expand Down
2 changes: 1 addition & 1 deletion engines/bladerunner/subtitles.h
Expand Up @@ -48,7 +48,7 @@ class Subtitles {
// TODO Or just support the current _vm->_languageCode ? [current implementation]
static const int kMaxNumOfSubtitlesLines = 3;
static const int kMaxWidthPerLineToAutoSplitThresholdPx = 610;
static const int kMaxTextResourceEntries = 1 + 25; // Support in-game subs (1) and all possible VQAs (25) with spoken dialogue!
static const int kMaxTextResourceEntries = 1 + 25; // Support in-game subs (1) and all possible VQAs (25) with spoken dialogue or translatable text!
static const Common::String SUBTITLES_FILENAME_PREFIXES[kMaxTextResourceEntries];
static const Common::String SUBTITLES_FONT_FILENAME_EXTERNAL;

Expand Down

0 comments on commit 9be700c

Please sign in to comment.