diff options
author | Thanasis Antoniou | 2018-09-02 13:44:21 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-12-25 12:35:52 +0100 |
commit | efb0a0f3b79156c265471f2025b65146e7db4cfb (patch) | |
tree | c87491e5f6815b4a35ee036721fe00b145761211 | |
parent | 301acd2ea33579d8776ab6653c9426d10d8570b3 (diff) | |
download | scummvm-rg350-efb0a0f3b79156c265471f2025b65146e7db4cfb.tar.gz scummvm-rg350-efb0a0f3b79156c265471f2025b65146e7db4cfb.tar.bz2 scummvm-rg350-efb0a0f3b79156c265471f2025b65146e7db4cfb.zip |
BLADERUNNER: Override original FONT and TRE
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 17 | ||||
-rw-r--r-- | engines/bladerunner/font.cpp | 51 | ||||
-rw-r--r-- | engines/bladerunner/ui/kia_section_settings.cpp | 4 |
3 files changed, 38 insertions, 34 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index c5f8734806..7130ff7635 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -357,6 +357,16 @@ bool BladeRunnerEngine::startup(bool hasSavegames) { _time = new Time(this); + // Try to load the SUBTITLES.MIX first, before Startup.MIX + // allows overriding any identically named resources (such as the original font files and as a bonus also the TRE files for the UI and dialogue menu) + _subtitles = new Subtitles(this); + r = openArchive("SUBTITLES.MIX"); + if (!r) { + _subtitles->setSubtitlesSystemInactive(true); // no subtitles support + } + _subtitles->init(); + + r = openArchive("STARTUP.MIX"); if (!r) return false; @@ -504,13 +514,6 @@ bool BladeRunnerEngine::startup(bool hasSavegames) { _mainFont->open("KIA6PT.FON", 640, 480, -1, 0, 0x252D); _mainFont->setSpacing(1, 0); - _subtitles = new Subtitles(this); - r = openArchive("SUBTITLES.MIX"); - if (!r) { - _subtitles->setSubtitlesSystemInactive(true); // no subtitles support - } - _subtitles->init(); - for (int i = 0; i != 43; ++i) { Shape *shape = new Shape(this); shape->open("SHAPES.SHP", i); diff --git a/engines/bladerunner/font.cpp b/engines/bladerunner/font.cpp index da8928757d..8eec126fc9 100644 --- a/engines/bladerunner/font.cpp +++ b/engines/bladerunner/font.cpp @@ -68,31 +68,32 @@ bool Font::open(const Common::String &fileName, int screenWidth, int screenHeigh _characters[i].width = stream->readUint32LE(); _characters[i].height = stream->readUint32LE(); _characters[i].dataOffset = stream->readUint32LE(); - // special explicit alignment fixes for TAHOMA18 (INTERNAL) font - if (fileName == "TAHOMA18.FON") { - switch (i) { - case 46: // '-' - case 72: // G - case 74: // I - case 75: // J - _characters[i].x = 0; // original value was 1 - break; - case 81: // P (ascii code 80 + 1) - _characters[i].x = 0; // original value was 1 - _characters[i].y = 7; // original value was 6 -- bring them down for one (1) pixel - break; - case 83: // R - case 84: // S - case 86: // U - case 87: // V - case 88: // W - case 89: // X - case 90: // Y - case 91: // Z - _characters[i].y = 7; // original value was 6 -- bring them down for one (1) pixel - break; - } - } + // Commented out. Explicit fixes don't really make sense if we can override the TAHOMA18 font +// // special explicit alignment fixes for TAHOMA18 (INTERNAL) font +// if (fileName == "TAHOMA18.FON") { +// switch (i) { +// case 46: // '-' +// case 72: // G +// case 74: // I +// case 75: // J +// _characters[i].x -= 1; // original value was 1 +// break; +// case 81: // P (ascii code 80 + 1) +// _characters[i].x -= 1; // original value was 1 +// _characters[i].y += 1; // original value was 6 -- bring them down for one (1) pixel +// break; +// case 83: // R +// case 84: // S +// case 86: // U +// case 87: // V +// case 88: // W +// case 89: // X +// case 90: // Y +// case 91: // Z +// _characters[i].y += 1; // original value was 6 -- bring them down for one (1) pixel +// break; +// } +// } //debug("char::%d character x: %d, y: %d, w: %d, h:%d, do: %d", i, _characters[i].x, _characters[i].y, _characters[i].width, _characters[i].height, _characters[i].dataOffset); } for (int i = 0; i < _dataSize; i++) { diff --git a/engines/bladerunner/ui/kia_section_settings.cpp b/engines/bladerunner/ui/kia_section_settings.cpp index 4fd04a9b00..6353b991fd 100644 --- a/engines/bladerunner/ui/kia_section_settings.cpp +++ b/engines/bladerunner/ui/kia_section_settings.cpp @@ -122,8 +122,8 @@ void KIASectionSettings::draw(Graphics::Surface &surface) { const char *textDark = _vm->_textOptions->getText(14); const char *textLight = _vm->_textOptions->getText(15); const char *textDesignersCut = _vm->_textOptions->getText(18); - // TODO REPLACE THIS STRING LITERAL MAYBE WITH A TEXT RESOURCE ITEM? - const char *textSubtitles = "Subtitles"; + // Allow this to be loading as an extra text item in the resource for text options + const char *textSubtitles = strcmp(_vm->_textOptions->getText(42), "") == 0? "Subtitles" : _vm->_textOptions->getText(42); // +1 to the max of original index of textOptions which is 41 int posConversationChoices = 320 - _vm->_mainFont->getTextWidth(textConversationChoices) / 2; int posMusic = 320 - _vm->_mainFont->getTextWidth(textMusic) / 2; |