diff options
Diffstat (limited to 'src/i_video.c')
-rw-r--r-- | src/i_video.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/i_video.c b/src/i_video.c index 3bc15823..14a78279 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1121,11 +1121,14 @@ void I_SetPalette (byte *doompalette) { int i; - for (i=0; i<256; ++i) + for (i=0; i<256; ++i) { - palette[i].r = gammatable[usegamma][*doompalette++]; - palette[i].g = gammatable[usegamma][*doompalette++]; - palette[i].b = gammatable[usegamma][*doompalette++]; + // Zero out the bottom two bits of each channel - the PC VGA + // controller only supports 6 bits of accuracy. + + palette[i].r = gammatable[usegamma][*doompalette++] & ~3; + palette[i].g = gammatable[usegamma][*doompalette++] & ~3; + palette[i].b = gammatable[usegamma][*doompalette++] & ~3; } palette_to_set = true; |