Clean up the SpanDrawerArgs interface a bit
This commit is contained in:
parent
c574b0ad3f
commit
98fa2976fa
7 changed files with 130 additions and 104 deletions
|
|
@ -70,17 +70,17 @@ namespace swrenderer
|
|||
return;
|
||||
}
|
||||
|
||||
drawerargs.ds_color = 3;
|
||||
drawerargs.SetSpanTexture(texture);
|
||||
drawerargs.SetSolidColor(3);
|
||||
drawerargs.SetTexture(texture);
|
||||
|
||||
lxscale = _xscale * ifloatpow2[drawerargs.ds_xbits];
|
||||
lyscale = _yscale * ifloatpow2[drawerargs.ds_ybits];
|
||||
lxscale = _xscale * ifloatpow2[drawerargs.TextureWidthBits()];
|
||||
lyscale = _yscale * ifloatpow2[drawerargs.TextureHeightBits()];
|
||||
xscale = 64.f / lxscale;
|
||||
yscale = 64.f / lyscale;
|
||||
zeroheight = pl->height.ZatPoint(ViewPos);
|
||||
|
||||
pviewx = xs_ToFixed(32 - drawerargs.ds_xbits, pl->xform.xOffs * pl->xform.xScale);
|
||||
pviewy = xs_ToFixed(32 - drawerargs.ds_ybits, pl->xform.yOffs * pl->xform.yScale);
|
||||
pviewx = xs_ToFixed(32 - drawerargs.TextureWidthBits(), pl->xform.xOffs * pl->xform.xScale);
|
||||
pviewy = xs_ToFixed(32 - drawerargs.TextureHeightBits(), pl->xform.yOffs * pl->xform.yScale);
|
||||
planeang = (pl->xform.Angle + pl->xform.baseAngle).Radians();
|
||||
|
||||
// p is the texture origin in view space
|
||||
|
|
@ -170,11 +170,11 @@ namespace swrenderer
|
|||
}
|
||||
|
||||
// Hack in support for 1 x Z and Z x 1 texture sizes
|
||||
if (drawerargs.ds_ybits == 0)
|
||||
if (drawerargs.TextureHeightBits() == 0)
|
||||
{
|
||||
plane_sv[2] = plane_sv[1] = plane_sv[0] = 0;
|
||||
}
|
||||
if (drawerargs.ds_xbits == 0)
|
||||
if (drawerargs.TextureWidthBits() == 0)
|
||||
{
|
||||
plane_su[2] = plane_su[1] = plane_su[0] = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue