Move wall drawer args into functions

This commit is contained in:
Magnus Norddahl 2017-02-02 11:16:18 +01:00
commit f3d968cf41
17 changed files with 112 additions and 90 deletions

View file

@ -1371,9 +1371,9 @@ void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
SpanDrawerArgs drawerargs;
drawerargs.SetTexture(tex);
if (colormap)
drawerargs.SetColorMapLight(colormap, 0, clamp(shade >> FRACBITS, 0, NUMCOLORMAPS - 1));
drawerargs.SetLight(colormap, 0, clamp(shade >> FRACBITS, 0, NUMCOLORMAPS - 1));
else
drawerargs.SetColorMapLight(&identitycolormap, 0, 0);
drawerargs.SetLight(&identitycolormap, 0, 0);
if (drawerargs.TextureWidthBits() != 0)
{
scalex = double(1u << (32 - drawerargs.TextureWidthBits())) / scalex;