aboutsummaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorTorbjörn Andersson2014-01-01 19:55:04 +0100
committerTorbjörn Andersson2014-01-01 19:55:04 +0100
commit84d4e97d08f78ee282ba3275fe0c8a0a1d24daae (patch)
tree26942d26afec096ff3ea15b828fcdd68b48ff4c1 /video
parent75806cd73c45278105ac4a3326ba7c80e86618ba (diff)
downloadscummvm-rg350-84d4e97d08f78ee282ba3275fe0c8a0a1d24daae.tar.gz
scummvm-rg350-84d4e97d08f78ee282ba3275fe0c8a0a1d24daae.tar.bz2
scummvm-rg350-84d4e97d08f78ee282ba3275fe0c8a0a1d24daae.zip
VIDEO: Rename variables and remove pointless assertion
It's RGB, not BGR apparently. This seems to contradict the Multimedia Wiki, but not reality.
Diffstat (limited to 'video')
-rw-r--r--video/smk_decoder.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 868050e988..0247fe5dc9 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -726,17 +726,15 @@ void SmackerDecoder::SmackerVideoTrack::unpackPalette(Common::SeekableReadStream
} else { // top 2 bits are 00
sz++;
// get the lower 6 bits for each component (0x3f = 00111111)
- byte b = b0 & 0x3f;
+ byte r = b0 & 0x3f;
byte g = (*p++) & 0x3f;
- byte r = (*p++) & 0x3f;
-
- assert(g < 0xc0 && b < 0xc0);
+ byte b = (*p++) & 0x3f;
// upscale to full 8-bit color values. The Multimedia Wiki suggests
// a lookup table for this, but this should produce the same result.
- *pal++ = (b * 4 + b / 16);
- *pal++ = (g * 4 + g / 16);
*pal++ = (r * 4 + r / 16);
+ *pal++ = (g * 4 + g / 16);
+ *pal++ = (b * 4 + b / 16);
}
}