From 9f5f2625619d6dbf6eea0d16c6e712939c418cde Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 26 Jun 2009 00:12:19 +0000 Subject: Implement difference in TIM's displayText code for PC98, this should fix the font color in the intro. svn-id: r41897 --- engines/kyra/script_tim.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'engines/kyra/script_tim.cpp') diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 1d270d7adb..b7fd3c3bd4 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -304,13 +304,14 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) { memcpy(filename, text+1, end-1-text); } - if (filename[0] && (_vm->speechEnabled() || _vm->gameFlags().platform == Common::kPlatformPC98)) + const bool isPC98 = (_vm->gameFlags().platform == Common::kPlatformPC98); + if (filename[0] && (_vm->speechEnabled() || isPC98)) _vm->sound()->voicePlay(filename); if (text[0] == '$') text = strchr(text + 1, '$') + 1; - if (_vm->gameFlags().platform != Common::kPlatformPC98) + if (!isPC98) setupTextPalette((flags < 0) ? 1 : flags, 0); if (flags < 0) { @@ -340,10 +341,16 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags) { int width = _screen->getTextWidth(str); - if (flags >= 0) - _screen->printText(str, (320 - width) >> 1, 160 + heightAdd, 0xF0, 0x00); - else + if (flags >= 0) { + if (isPC98) { + static const uint8 colorMap[] = { 0xE1, 0xE1, 0xC1, 0xA1, 0x81, 0x61 }; + _screen->printText(str, (320 - width) >> 1, 160 + heightAdd, colorMap[flags], 0x00); + } else { + _screen->printText(str, (320 - width) >> 1, 160 + heightAdd, 0xF0, 0x00); + } + } else { _screen->printText(str, (320 - width) >> 1, 188, 0xF0, 0x00); + } heightAdd += _screen->getFontHeight(); str += strlen(str); -- cgit v1.2.3