aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/palette.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-11-22 08:36:14 +0000
committerTravis Howell2009-11-22 08:36:14 +0000
commit94e75b8b6d24f3ad0e0dc9f4e6e789948e31f48e (patch)
treecffd8027ddbb0ae8b71d939ea93f2d3294ecb855 /engines/scumm/palette.cpp
parent4b3e3d5601d32f2323634612124d2bf16aa7a4db (diff)
downloadscummvm-rg350-94e75b8b6d24f3ad0e0dc9f4e6e789948e31f48e.tar.gz
scummvm-rg350-94e75b8b6d24f3ad0e0dc9f4e6e789948e31f48e.tar.bz2
scummvm-rg350-94e75b8b6d24f3ad0e0dc9f4e6e789948e31f48e.zip
Fix charset palette in PCE version of Loom, based on information from Tobias.
svn-id: r46064
Diffstat (limited to 'engines/scumm/palette.cpp')
-rw-r--r--engines/scumm/palette.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index 1b0edd743d..467ed9617c 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -209,6 +209,17 @@ void colorPCEToRGB(uint16 color, byte *r, byte *g, byte *b) {
*g = ((color >> 6) & 0x7) << 5;
}
+void ScummEngine::setPCETextPalette(uint8 color) {
+ const uint16 CHARSET_COLORS[16] = {
+ 0x0000, 0x0096, 0x0140, 0x0145, 0x0059, 0x002D, 0x00A8, 0x016D,
+ 0x0092, 0x016F, 0x01CD, 0x01DF, 0x00F7, 0x00B6, 0x01B0, 0x01B6
+ };
+
+ byte r, g, b;
+ colorPCEToRGB(CHARSET_COLORS[color], &r, &g, &b);
+ setPalColor(15, r, g, b);
+}
+
void ScummEngine::readPCEPalette(const byte **ptr, byte **dest, int numEntries) {
byte r, g, b;
byte msbs = 0;