aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorJoost Peters2005-04-06 19:18:08 +0000
committerJoost Peters2005-04-06 19:18:08 +0000
commit60a64494d13f2266bf30c0c17633e23316cadb97 (patch)
treefccb0678fdecb6e68eb8aa8ac9ab6cb504e3bb19 /sky
parentfd6b2050abf3ef97fbd090dfdeb6e49b16f67746 (diff)
downloadscummvm-rg350-60a64494d13f2266bf30c0c17633e23316cadb97.tar.gz
scummvm-rg350-60a64494d13f2266bf30c0c17633e23316cadb97.tar.bz2
scummvm-rg350-60a64494d13f2266bf30c0c17633e23316cadb97.zip
use upper bits instead of lower bits when upscaling palette
svn-id: r17423
Diffstat (limited to 'sky')
-rw-r--r--sky/screen.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/sky/screen.cpp b/sky/screen.cpp
index ab7bbbc815..c16c8a215c 100644
--- a/sky/screen.cpp
+++ b/sky/screen.cpp
@@ -71,9 +71,9 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) {
//set the remaining colors
for (i = 0; i < (VGA_COLOURS-GAME_COLOURS); i++) {
- tmpPal[4 * GAME_COLOURS + i * 4] = (_top16Colours[i * 3] << 2) + (_top16Colours[i * 3] & 3);
- tmpPal[4 * GAME_COLOURS + i * 4 + 1] = (_top16Colours[i * 3 + 1] << 2) + (_top16Colours[i * 3 + 1] & 3);
- tmpPal[4 * GAME_COLOURS + i * 4 + 2] = (_top16Colours[i * 3 + 2] << 2) + (_top16Colours[i * 3 + 2] & 3);
+ tmpPal[4 * GAME_COLOURS + i * 4] = (_top16Colours[i * 3] << 2) + (_top16Colours[i * 3] >> 4);
+ tmpPal[4 * GAME_COLOURS + i * 4 + 1] = (_top16Colours[i * 3 + 1] << 2) + (_top16Colours[i * 3 + 1] >> 4);
+ tmpPal[4 * GAME_COLOURS + i * 4 + 2] = (_top16Colours[i * 3 + 2] << 2) + (_top16Colours[i * 3 + 2] >> 4);
tmpPal[4 * GAME_COLOURS + i * 4 + 3] = 0x00;
}
@@ -167,9 +167,9 @@ void Screen::convertPalette(uint8 *inPal, uint8* outPal) { //convert 3 byte 0..6
int i;
for (i = 0; i < VGA_COLOURS; i++) {
- outPal[4 * i] = (inPal[3 * i] << 2) + (inPal[3 * i] & 3);
- outPal[4 * i + 1] = (inPal[3 * i + 1] << 2) + (inPal[3 * i + 1] & 3);
- outPal[4 * i + 2] = (inPal[3 * i + 2] << 2) + (inPal[3 * i + 2] & 3);
+ outPal[4 * i] = (inPal[3 * i] << 2) + (inPal[3 * i] >> 4);
+ outPal[4 * i + 1] = (inPal[3 * i + 1] << 2) + (inPal[3 * i + 1] >> 4);
+ outPal[4 * i + 2] = (inPal[3 * i + 2] << 2) + (inPal[3 * i + 2] >> 4);
outPal[4 * i + 3] = 0x00;
}
}