[Scummvm-cvs-logs] SF.net SVN: scummvm:[41897] scummvm/trunk/engines/kyra/script_tim.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Fri Jun 26 02:12:19 CEST 2009
Revision: 41897
http://scummvm.svn.sourceforge.net/scummvm/?rev=41897&view=rev
Author: lordhoto
Date: 2009-06-26 00:12:19 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Implement difference in TIM's displayText code for PC98, this should fix the font color in the intro.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/script_tim.cpp
Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp 2009-06-26 00:12:08 UTC (rev 41896)
+++ scummvm/trunk/engines/kyra/script_tim.cpp 2009-06-26 00:12:19 UTC (rev 41897)
@@ -304,13 +304,14 @@
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 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list