diff options
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; |