Merge branch 'zdoom-rgb666-take3' of https://github.com/raa-eruanna/qzdoom into qzdoom-rgb666
# Conflicts: # src/r_draw.cpp # src/r_plane.cpp # src/r_things.h # src/v_draw.cpp # src/v_video.cpp
This commit is contained in:
commit
564bfe482c
13 changed files with 1605 additions and 715 deletions
|
|
@ -988,27 +988,6 @@ void DCanvas::PUTTRANSDOT (int xx, int yy, int basecolor, int level)
|
|||
static int oldyy;
|
||||
static int oldyyshifted;
|
||||
|
||||
#if 0
|
||||
if(xx < 32)
|
||||
cc += 7-(xx>>2);
|
||||
else if(xx > (finit_width - 32))
|
||||
cc += 7-((finit_width-xx) >> 2);
|
||||
// if(cc==oldcc) //make sure that we don't double fade the corners.
|
||||
// {
|
||||
if(yy < 32)
|
||||
cc += 7-(yy>>2);
|
||||
else if(yy > (finit_height - 32))
|
||||
cc += 7-((finit_height-yy) >> 2);
|
||||
// }
|
||||
if(cc > cm && cm != NULL)
|
||||
{
|
||||
cc = cm;
|
||||
}
|
||||
else if(cc > oldcc+6) // don't let the color escape from the fade table...
|
||||
{
|
||||
cc=oldcc+6;
|
||||
}
|
||||
#endif
|
||||
if (yy == oldyy+1)
|
||||
{
|
||||
oldyy++;
|
||||
|
|
@ -1044,7 +1023,7 @@ void DCanvas::PUTTRANSDOT (int xx, int yy, int basecolor, int level)
|
|||
|
||||
*spot = 0xff000000 | (red << 16) | (green << 8) | blue;
|
||||
}
|
||||
else
|
||||
else if (!r_blendmethod)
|
||||
{
|
||||
BYTE *spot = GetBuffer() + oldyyshifted + xx;
|
||||
DWORD *bg2rgb = Col2RGB8[1+level];
|
||||
|
|
@ -1054,6 +1033,16 @@ void DCanvas::PUTTRANSDOT (int xx, int yy, int basecolor, int level)
|
|||
bg = (fg+bg) | 0x1f07c1f;
|
||||
*spot = RGB32k.All[bg&(bg>>15)];
|
||||
}
|
||||
else
|
||||
{
|
||||
BYTE *spot = 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;
|
||||
|
||||
*spot = (BYTE)RGB256k.RGB[r][g][b];
|
||||
}
|
||||
}
|
||||
|
||||
void DCanvas::DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32 realcolor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue