diff options
author | Johannes Schickel | 2009-08-10 01:33:56 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-10 01:33:56 +0000 |
commit | d68706d8edcdf8e605c2e2ddbf7dd05d96785fe9 (patch) | |
tree | c0fe2cdcb14b7924383b55a46e693b4b2a930a20 /engines/kyra | |
parent | e265084bc37a2b7a867a5e85a6a644ff0bb16215 (diff) | |
download | scummvm-rg350-d68706d8edcdf8e605c2e2ddbf7dd05d96785fe9.tar.gz scummvm-rg350-d68706d8edcdf8e605c2e2ddbf7dd05d96785fe9.tar.bz2 scummvm-rg350-d68706d8edcdf8e605c2e2ddbf7dd05d96785fe9.zip |
Enable interface text fading in Kyra1 amiga again.
svn-id: r43196
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/screen.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/text_lok.cpp | 30 |
2 files changed, 23 insertions, 11 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 1185209746..8d212917a8 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -650,7 +650,9 @@ void Screen::setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b) if (_vm->gameFlags().platform != Common::kPlatformAmiga) return; - uint8 screenPal[256 * 4]; + uint8 screenPal[32 * 4]; + + assert(32 <= pal.getNumColors()); for (int i = 0; i < pal.getNumColors(); ++i) { if (i != 0x10) { diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp index d8a6a1ae91..f880bf3886 100644 --- a/engines/kyra/text_lok.cpp +++ b/engines/kyra/text_lok.cpp @@ -324,20 +324,25 @@ void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) { _screen->hideMouse(); _screen->fillRect(8, 143, 311, 152, _flags.platform == Common::kPlatformAmiga ? 19 : 12); - // TODO: Amiga support - if ((_startSentencePalIndex != color || _fadeText != false) && _flags.platform != Common::kPlatformAmiga) { - _currSentenceColor[0] = _screen->getPalette(0)[765] = _screen->getPalette(0)[color*3]; + if (_flags.platform == Common::kPlatformAmiga) { + if (color != 19) { + memset(_currSentenceColor, 0x3F, sizeof(_currSentenceColor)); + + _screen->setInterfacePalette(_screen->getPalette(1), + _currSentenceColor[0], _currSentenceColor[1], _currSentenceColor[2]); + } + } else if (_startSentencePalIndex != color || _fadeText != false) { + _currSentenceColor[0] = _screen->getPalette(0)[765] = _screen->getPalette(0)[color*3+0]; _currSentenceColor[1] = _screen->getPalette(0)[766] = _screen->getPalette(0)[color*3+1]; _currSentenceColor[2] = _screen->getPalette(0)[767] = _screen->getPalette(0)[color*3+2]; _screen->setScreenPalette(_screen->getPalette(0)); - _startSentencePalIndex = 0; + _startSentencePalIndex = color; } _text->printText(sentence, 8, 143, 0xFF, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0); _screen->showMouse(); - if (_flags.platform != Common::kPlatformAmiga) - setTextFadeTimerCountdown(15); + setTextFadeTimerCountdown(15); _fadeText = false; } @@ -366,10 +371,15 @@ void KyraEngine_LoK::updateTextFade() { } } - _screen->getPalette(0)[765] = _currSentenceColor[0]; - _screen->getPalette(0)[766] = _currSentenceColor[1]; - _screen->getPalette(0)[767] = _currSentenceColor[2]; - _screen->setScreenPalette(_screen->getPalette(0)); + if (_flags.platform == Common::kPlatformAmiga) { + _screen->setInterfacePalette(_screen->getPalette(1), + _currSentenceColor[0], _currSentenceColor[1], _currSentenceColor[2]); + } else { + _screen->getPalette(0)[765] = _currSentenceColor[0]; + _screen->getPalette(0)[766] = _currSentenceColor[1]; + _screen->getPalette(0)[767] = _currSentenceColor[2]; + _screen->setScreenPalette(_screen->getPalette(0)); + } if (finished) { _fadeText = false; |