aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-25 02:39:23 +0000
committerJohannes Schickel2009-06-25 02:39:23 +0000
commit86b63e0e4edb301d8f448b7bc71274e125de7a83 (patch)
treeaeea7fd61d447e5855a60d76939dfc175e719a52 /engines/kyra/screen.cpp
parentbd4b5d83368e7b9cd3ed2771923f6168db0d480d (diff)
downloadscummvm-rg350-86b63e0e4edb301d8f448b7bc71274e125de7a83.tar.gz
scummvm-rg350-86b63e0e4edb301d8f448b7bc71274e125de7a83.tar.bz2
scummvm-rg350-86b63e0e4edb301d8f448b7bc71274e125de7a83.zip
Implement proper AMIGA to VGA color conversion.
svn-id: r41852
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r--engines/kyra/screen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 036b8b9bc2..b742758391 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -3276,9 +3276,9 @@ void Palette::loadAmigaPalette(Common::ReadStream &stream, int colors) {
for (int i = 0; i < colors; ++i) {
uint16 col = stream.readUint16BE();
- _palData[i * 3 + 2] = (col & 0xF) << 2; col >>= 4;
- _palData[i * 3 + 1] = (col & 0xF) << 2; col >>= 4;
- _palData[i * 3 + 0] = (col & 0xF) << 2; col >>= 4;
+ _palData[i * 3 + 2] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
+ _palData[i * 3 + 1] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
+ _palData[i * 3 + 0] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
}
memset(_palData + colors * 3, 0, (_numColors - colors) * 3);