aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-07 02:02:06 +0000
committerTorbjörn Andersson2006-04-07 02:02:06 +0000
commit26587faff789412721786c6276933624dda92557 (patch)
tree0a94bf259e91593b39b9a3370bdf01a03a4340ba /engines/cine
parentc6c86ff172d45130ec618d00e505a894cb2b0fd6 (diff)
downloadscummvm-rg350-26587faff789412721786c6276933624dda92557.tar.gz
scummvm-rg350-26587faff789412721786c6276933624dda92557.tar.bz2
scummvm-rg350-26587faff789412721786c6276933624dda92557.zip
This may look like a less good way of transforming three bits of colour into
eight bits. Perhaps it is. But it seems to match the output from DOSbox when running Future Wars, and I tend to trust DOSbox in such matters. svn-id: r21658
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/gfx.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 240158fcec..8bfc000da0 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -307,9 +307,10 @@ void gfxFlipRawPage(byte *frontBuffer) {
g_system->setPalette(pal, 0, 256);
} else {
for (i = 0; i < 16; i++) {
- pal[i * 4 + 2] = ((c_palette[i] & 0x00f) >> 0) * 255 / 7;
- pal[i * 4 + 1] = ((c_palette[i] & 0x0f0) >> 4) * 255 / 7;
- pal[i * 4 + 0] = ((c_palette[i] & 0xf00) >> 8) * 255 / 7;
+ // This seems to match the output from DOSbox.
+ pal[i * 4 + 2] = ((c_palette[i] & 0x00f) >> 0) * 32;
+ pal[i * 4 + 1] = ((c_palette[i] & 0x0f0) >> 4) * 32;
+ pal[i * 4 + 0] = ((c_palette[i] & 0xf00) >> 8) * 32;
pal[i * 4 + 3] = 0;
}
g_system->setPalette(pal, 0, 16);