mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
BLADERUNNER: Override original FONT and TRE
This commit is contained in:
parent
301acd2ea3
commit
efb0a0f3b7
@ -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);
|
||||
|
@ -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++) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user