diff options
author | Johannes Schickel | 2009-08-10 01:33:36 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-10 01:33:36 +0000 |
commit | e265084bc37a2b7a867a5e85a6a644ff0bb16215 (patch) | |
tree | 22ade94b71a36b512ed5658f1963ac07a4637ac6 /engines/kyra/screen.cpp | |
parent | c85c5030dfd61b2d181b1cec071b9532e4acc8aa (diff) | |
download | scummvm-rg350-e265084bc37a2b7a867a5e85a6a644ff0bb16215.tar.gz scummvm-rg350-e265084bc37a2b7a867a5e85a6a644ff0bb16215.tar.bz2 scummvm-rg350-e265084bc37a2b7a867a5e85a6a644ff0bb16215.zip |
Fix interface text color.
svn-id: r43195
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r-- | engines/kyra/screen.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 7547643071..1185209746 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -646,16 +646,22 @@ void Screen::enableInterfacePalette(bool e) { updateScreen(); } -void Screen::setInterfacePalette(const Palette &pal) { +void Screen::setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b) { if (_vm->gameFlags().platform != Common::kPlatformAmiga) return; uint8 screenPal[256 * 4]; for (int i = 0; i < pal.getNumColors(); ++i) { - screenPal[4 * i + 0] = (pal[i * 3 + 0] * 0xFF) / 0x3F; - screenPal[4 * i + 1] = (pal[i * 3 + 1] * 0xFF) / 0x3F; - screenPal[4 * i + 2] = (pal[i * 3 + 2] * 0xFF) / 0x3F; + if (i != 0x10) { + screenPal[4 * i + 0] = (pal[i * 3 + 0] * 0xFF) / 0x3F; + screenPal[4 * i + 1] = (pal[i * 3 + 1] * 0xFF) / 0x3F; + screenPal[4 * i + 2] = (pal[i * 3 + 2] * 0xFF) / 0x3F; + } else { + screenPal[4 * i + 0] = (r * 0xFF) / 0x3F; + screenPal[4 * i + 1] = (g * 0xFF) / 0x3F; + screenPal[4 * i + 2] = (b * 0xFF) / 0x3F; + } screenPal[4 * i + 3] = 0; } |