Changed column drawers to use true color textures

This commit is contained in:
Magnus Norddahl 2016-10-07 12:45:21 +02:00
commit aae4571c95
11 changed files with 214 additions and 175 deletions

View file

@ -305,7 +305,11 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
{
while ((dc_x < stop4) && (dc_x & 3))
{
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
if (r_swtruecolor && !drawer_needs_pal_input)
pixels = (const BYTE *)img->GetColumnBgra(frac >> FRACBITS, spanptr);
else
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
R_DrawMaskedColumn(pixels, spans);
dc_x++;
frac += xiscale_i;
@ -316,7 +320,11 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
rt_initcols(nullptr);
for (int zz = 4; zz; --zz)
{
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
if (r_swtruecolor && !drawer_needs_pal_input)
pixels = (const BYTE *)img->GetColumnBgra(frac >> FRACBITS, spanptr);
else
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
R_DrawMaskedColumnHoriz(pixels, spans);
dc_x++;
frac += xiscale_i;
@ -326,7 +334,11 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
while (dc_x < x2_i)
{
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
if (r_swtruecolor && !drawer_needs_pal_input)
pixels = (const BYTE *)img->GetColumnBgra(frac >> FRACBITS, spanptr);
else
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
R_DrawMaskedColumn(pixels, spans);
dc_x++;
frac += xiscale_i;