From 8889c3f93f24c69dde96a106b61c939c24af7919 Mon Sep 17 00:00:00 2001 From: viciious Date: Fri, 21 Jun 2024 22:11:24 +0300 Subject: [PATCH] Smaller code --- r_phase8.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/r_phase8.c b/r_phase8.c index d5cb18f89..8a6716164 100644 --- a/r_phase8.c +++ b/r_phase8.c @@ -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) { @@ -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;