diff options
author | Johannes Schickel | 2009-06-26 00:12:19 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-26 00:12:19 +0000 |
commit | 9f5f2625619d6dbf6eea0d16c6e712939c418cde (patch) | |
tree | bd5180149a84d173f0a62ee08882badeafcd91ea | |
parent | e212c068452fa959e560c251f332da1fb38f2821 (diff) | |
download | scummvm-rg350-9f5f2625619d6dbf6eea0d16c6e712939c418cde.tar.gz scummvm-rg350-9f5f2625619d6dbf6eea0d16c6e712939c418cde.tar.bz2 scummvm-rg350-9f5f2625619d6dbf6eea0d16c6e712939c418cde.zip |
Implement difference in TIM's displayText code for PC98, this should fix the font color in the intro.
svn-id: r41897
-rw-r--r-- | engines/kyra/script_tim.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
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); |