Skip to content

Commit

Permalink
Smaller code
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed Jun 21, 2024
1 parent 676d26b commit 8889c3f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions r_phase8.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@ static void R_DrawSortedSprites(int* sortedsprites, int sprscreenhalf)
int16_t walls[MAXWALLCMDS+1], *pwalls;
viswall_t *ds;

I_SetThreadLocalVar(DOOMTLS_COLORMAP, dc_colormaps);

#ifdef MARS
if (sprscreenhalf > 0)
{
Expand Down Expand Up @@ -455,25 +453,21 @@ static void R_DrawSortedSprites(int* sortedsprites, int sprscreenhalf)

static void R_DrawPSprites(int sprscreenhalf)
{
unsigned i;
unsigned short spropening[SCREENWIDTH];
viswall_t *spr;
unsigned vph = viewportHeight;

I_SetThreadLocalVar(DOOMTLS_COLORMAP, dc_colormaps);

// draw psprites
for (spr = vd->lastsprite_p; spr < vd->vissprite_p; spr++)
{
vissprite_t *vis = (vissprite_t *)spr;
unsigned stopx = vis->x2 + 1;
i = vis->x1;
unsigned i, stopx = vis->x2 + 1;

if (vis->patchnum < 0)
continue;

// clear out the clipping array across the range of the psprite
while (i < stopx)
for (i = vis->x1; i < stopx; i++)
{
spropening[i] = vph;
++i;
Expand Down

0 comments on commit 8889c3f

Please sign in to comment.