aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-10 01:33:36 +0000
committerJohannes Schickel2009-08-10 01:33:36 +0000
commite265084bc37a2b7a867a5e85a6a644ff0bb16215 (patch)
tree22ade94b71a36b512ed5658f1963ac07a4637ac6
parentc85c5030dfd61b2d181b1cec071b9532e4acc8aa (diff)
downloadscummvm-rg350-e265084bc37a2b7a867a5e85a6a644ff0bb16215.tar.gz
scummvm-rg350-e265084bc37a2b7a867a5e85a6a644ff0bb16215.tar.bz2
scummvm-rg350-e265084bc37a2b7a867a5e85a6a644ff0bb16215.zip
Fix interface text color.
svn-id: r43195
-rw-r--r--engines/kyra/screen.cpp14
-rw-r--r--engines/kyra/screen.h2
-rw-r--r--engines/kyra/staticres.cpp2
3 files changed, 12 insertions, 6 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;
}
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index 07b4562ffa..41837c90e3 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -357,7 +357,7 @@ public:
// AMIGA version only
void enableInterfacePalette(bool e);
- void setInterfacePalette(const Palette &pal);
+ void setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b);
void getRealPalette(int num, uint8 *dst);
Palette &getPalette(int num);
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index a65c99434b..b36b77d7a3 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1602,7 +1602,7 @@ void KyraEngine_LoK::loadMainScreen(int page) {
if (_flags.platform == Common::kPlatformAmiga) {
_screen->copyPalette(1, 0);
- _screen->setInterfacePalette(_screen->getPalette(1));
+ _screen->setInterfacePalette(_screen->getPalette(1), 0x3F, 0x3F, 0x3F);
// TODO: Move this to a better place
_screen->enableInterfacePalette(true);