mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- 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:
parent
4a9845a6c0
commit
869de7554f
1 changed files with 3 additions and 3 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue