Remove drawerargs from r_things

This commit is contained in:
Magnus Norddahl 2017-01-09 14:56:29 +01:00
parent 4eac238d26
commit 4c67a717f8
5 changed files with 7 additions and 10 deletions

View file

@ -77,7 +77,6 @@ CVAR(Bool, r_splitsprites, true, CVAR_ARCHIVE)
namespace swrenderer
{
using namespace drawerargs;
bool DrewAVoxel;
@ -144,7 +143,7 @@ static inline void R_CollectPortals()
}
}
bool R_ClipSpriteColumnWithPortals(vissprite_t* spr)
bool R_ClipSpriteColumnWithPortals(int x, vissprite_t* spr)
{
RenderPortal *renderportal = RenderPortal::Instance();
@ -165,7 +164,7 @@ bool R_ClipSpriteColumnWithPortals(vissprite_t* spr)
continue;
// now if current column is covered by this drawseg, we clip it away
if ((dc_x >= seg->x1) && (dc_x < seg->x2))
if ((x >= seg->x1) && (x < seg->x2))
return true;
}

View file

@ -38,7 +38,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
namespace swrenderer
{
bool R_ClipSpriteColumnWithPortals(vissprite_t* spr);
bool R_ClipSpriteColumnWithPortals(int x, vissprite_t* spr);
void R_CacheSprite (spritedef_t *sprite);

View file

@ -252,8 +252,7 @@ namespace swrenderer
{
for (int x = x1; x < (x1 + countbase); x++, fracposx += fracstepx)
{
dc_x = x;
if (R_ClipSpriteColumnWithPortals(vis))
if (R_ClipSpriteColumnWithPortals(x, vis))
continue;
uint32_t *dest = ylookup[yl] + x + (uint32_t*)dc_destorg;
DrawerCommandQueue::QueueCommand<DrawParticleColumnRGBACommand>(dest, yl, spacing, ycount, fg, alpha, fracposx);
@ -263,8 +262,7 @@ namespace swrenderer
{
for (int x = x1; x < (x1 + countbase); x++, fracposx += fracstepx)
{
dc_x = x;
if (R_ClipSpriteColumnWithPortals(vis))
if (R_ClipSpriteColumnWithPortals(x, vis))
continue;
uint8_t *dest = ylookup[yl] + x + dc_destorg;
DrawerCommandQueue::QueueCommand<DrawParticleColumnPalCommand>(dest, yl, spacing, ycount, fg, alpha, fracposx);

View file

@ -116,7 +116,7 @@ namespace swrenderer
{
while (x < x2)
{
if (ispsprite || !R_ClipSpriteColumnWithPortals(vis))
if (ispsprite || !R_ClipSpriteColumnWithPortals(x, vis))
R_DrawMaskedColumn(x, iscale, tex, frac, spryscale, sprtopscreen, sprflipvert, mfloorclip, mceilingclip, false);
x++;
frac += xiscale;

View file

@ -221,7 +221,7 @@ namespace swrenderer
{ // calculate lighting
R_SetColorMapLight(usecolormap, light, shade);
}
if (!R_ClipSpriteColumnWithPortals(spr))
if (!R_ClipSpriteColumnWithPortals(x, spr))
R_WallSpriteColumn(x, WallSpriteTile, maskedScaleY, sprflipvert, mfloorclip, mceilingclip);
light += lightstep;
x++;