Fix dancing sprites due to texture coordinate calculations not taking pixel centers into account

Merge R_DrawMaskedColumn and R_DrawMaskedColumnHoriz into one function to remove code duplication
This commit is contained in:
Magnus Norddahl 2016-10-29 05:35:41 +02:00
commit 837ed7bd80
6 changed files with 61 additions and 181 deletions

View file

@ -299,7 +299,7 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
while ((dc_x < stop4) && (dc_x & 3))
{
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
R_DrawMaskedColumn(pixels, spans);
R_DrawMaskedColumn(pixels, spans, false);
dc_x++;
frac += xiscale_i;
}
@ -310,7 +310,7 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
for (int zz = 4; zz; --zz)
{
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
R_DrawMaskedColumnHoriz(pixels, spans);
R_DrawMaskedColumn(pixels, spans, true);
dc_x++;
frac += xiscale_i;
}
@ -320,7 +320,7 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
while (dc_x < x2_i)
{
pixels = img->GetColumn(frac >> FRACBITS, spanptr);
R_DrawMaskedColumn(pixels, spans);
R_DrawMaskedColumn(pixels, spans, false);
dc_x++;
frac += xiscale_i;
}