aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-10 19:08:00 +0000
committerJohannes Schickel2009-08-10 19:08:00 +0000
commitcb8b2d7799391cb65167be5bf0f22afe57178a24 (patch)
tree1696cb84dcf53072c6c0ee88917863a0544f8361 /engines/kyra/screen.cpp
parent7dfa30d3fe285590232b48214e296681371234f5 (diff)
downloadscummvm-rg350-cb8b2d7799391cb65167be5bf0f22afe57178a24.tar.gz
scummvm-rg350-cb8b2d7799391cb65167be5bf0f22afe57178a24.tar.bz2
scummvm-rg350-cb8b2d7799391cb65167be5bf0f22afe57178a24.zip
- Fix AMIGA to DOS palette conversion
- Amiga version uses 13 instead of 12 palette buffers svn-id: r43220
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r--engines/kyra/screen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 6f93db1ad9..97ecbcfb28 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -110,7 +110,7 @@ bool Screen::init() {
memset(_shapePages, 0, sizeof(_shapePages));
- const int paletteCount = (_vm->gameFlags().platform == Common::kPlatformAmiga) ? 12 : 4;
+ const int paletteCount = (_vm->gameFlags().platform == Common::kPlatformAmiga) ? 13 : 4;
const int numColors = _use16ColorMode ? 16 : ((_vm->gameFlags().platform == Common::kPlatformAmiga) ? 32 : 256);
_interfacePaletteEnabled = false;
@@ -3247,9 +3247,9 @@ void Palette::loadAmigaPalette(Common::ReadStream &stream, int startIndex, int c
for (int i = 0; i < colors; ++i) {
uint16 col = stream.readUint16BE();
- _palData[(i + startIndex) * 3 + 2] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
- _palData[(i + startIndex) * 3 + 1] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
- _palData[(i + startIndex) * 3 + 0] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
+ _palData[(i + startIndex) * 3 + 2] = ((col & 0xF) * 0x3F) / 0xF; col >>= 4;
+ _palData[(i + startIndex) * 3 + 1] = ((col & 0xF) * 0x3F) / 0xF; col >>= 4;
+ _palData[(i + startIndex) * 3 + 0] = ((col & 0xF) * 0x3F) / 0xF; col >>= 4;
}
}
@@ -3259,9 +3259,9 @@ void Palette::loadPC98Palette(Common::ReadStream &stream, int startIndex, int co
for (int i = 0; i < colors; ++i) {
const byte g = stream.readByte(), r = stream.readByte(), b = stream.readByte();
- _palData[(i + startIndex) * 3 + 0] = ((r & 0x0F) * 0x3F) / 0x0F;
- _palData[(i + startIndex) * 3 + 1] = ((g & 0x0F) * 0x3F) / 0x0F;
- _palData[(i + startIndex) * 3 + 2] = ((b & 0x0F) * 0x3F) / 0x0F;
+ _palData[(i + startIndex) * 3 + 0] = ((r & 0xF) * 0x3F) / 0xF;
+ _palData[(i + startIndex) * 3 + 1] = ((g & 0xF) * 0x3F) / 0xF;
+ _palData[(i + startIndex) * 3 + 2] = ((b & 0xF) * 0x3F) / 0xF;
}
}