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 namespace swrenderer
{ {
using namespace drawerargs;
bool DrewAVoxel; 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(); RenderPortal *renderportal = RenderPortal::Instance();
@ -165,7 +164,7 @@ bool R_ClipSpriteColumnWithPortals(vissprite_t* spr)
continue; continue;
// now if current column is covered by this drawseg, we clip it away // 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; return true;
} }

View file

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

View file

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

View file

@ -116,7 +116,7 @@ namespace swrenderer
{ {
while (x < x2) 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); R_DrawMaskedColumn(x, iscale, tex, frac, spryscale, sprtopscreen, sprflipvert, mfloorclip, mceilingclip, false);
x++; x++;
frac += xiscale; frac += xiscale;

View file

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