- fixed: Opening automap without 2D acceleration and rgb666 blending crashed due to bad color calculations. (Attempted to pass rgb888 values into rgb666 array)

This commit is contained in:
Rachael Alexanderson 2017-02-27 12:15:17 -05:00
parent 4a9845a6c0
commit 869de7554f

View file

@ -645,9 +645,9 @@ void SWCanvas::PUTTRANSDOT(DCanvas *canvas, int xx, int yy, int basecolor, int l
{
BYTE *spot = canvas->GetBuffer() + oldyyshifted + xx;
uint32_t r = (GPalette.BaseColors[*spot].r * (64 - level) + GPalette.BaseColors[basecolor].r * level) / 64;
uint32_t g = (GPalette.BaseColors[*spot].g * (64 - level) + GPalette.BaseColors[basecolor].g * level) / 64;
uint32_t b = (GPalette.BaseColors[*spot].b * (64 - level) + GPalette.BaseColors[basecolor].b * level) / 64;
uint32_t r = (GPalette.BaseColors[*spot].r * (64 - level) + GPalette.BaseColors[basecolor].r * level) / 256;
uint32_t g = (GPalette.BaseColors[*spot].g * (64 - level) + GPalette.BaseColors[basecolor].g * level) / 256;
uint32_t b = (GPalette.BaseColors[*spot].b * (64 - level) + GPalette.BaseColors[basecolor].b * level) / 256;
*spot = (BYTE)RGB256k.RGB[r][g][b];
}