From de1b801bdaec9e6cfde830e7807f08dde7b58498 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 20 Oct 2024 15:59:31 +0200 Subject: [PATCH] try to take some registers for span drawers too --- src/r_draw8.c | 57 ++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/src/r_draw8.c b/src/r_draw8.c index bf3b9740d..3c7562beb 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -681,14 +681,14 @@ void R_DrawSpan_8 (void) fixed_t xposition; fixed_t yposition; fixed_t xstep, ystep; - UINT32 bit; + register UINT32 bit; UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height; - size_t count = (ds_x2 - ds_x1 + 1); + register size_t count = (ds_x2 - ds_x1 + 1); size_t i; xposition = ds_xfrac; yposition = ds_yfrac; @@ -776,13 +776,13 @@ void R_DrawTiltedSpan_8(void) UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; double startz, startu, startv; double izstep, uzstep, vzstep; double endz, endu, endv; UINT32 stepu, stepv; - UINT32 bit; + register UINT32 bit; iz = ds_szp->z + ds_szp->y*(centery-ds_y) + ds_szp->x*(ds_x1-centerx); @@ -917,13 +917,13 @@ void R_DrawTiltedTranslucentSpan_8(void) UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; double startz, startu, startv; double izstep, uzstep, vzstep; double endz, endu, endv; UINT32 stepu, stepv; - UINT32 bit; + register UINT32 bit; iz = ds_szp->z + ds_szp->y*(centery-ds_y) + ds_szp->x*(ds_x1-centerx); @@ -1059,14 +1059,14 @@ void R_DrawTiltedTranslucentWaterSpan_8(void) UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; UINT8 *dsrc; double startz, startu, startv; double izstep, uzstep, vzstep; double endz, endu, endv; UINT32 stepu, stepv; - UINT32 bit; + register UINT32 bit; iz = ds_szp->z + ds_szp->y*(centery-ds_y) + ds_szp->x*(ds_x1-centerx); @@ -1200,7 +1200,7 @@ void R_DrawTiltedSplat_8(void) UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; UINT8 val; @@ -1208,7 +1208,7 @@ void R_DrawTiltedSplat_8(void) double izstep, uzstep, vzstep; double endz, endu, endv; UINT32 stepu, stepv; - UINT32 bit; + register UINT32 bit; iz = ds_szp->z + ds_szp->y*(centery-ds_y) + ds_szp->x*(ds_x1-centerx); @@ -1352,13 +1352,13 @@ void R_DrawSplat_8 (void) UINT32 xposition; UINT32 yposition; UINT32 xstep, ystep; - UINT32 bit; + register UINT32 bit; UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; - size_t count; + register size_t count; size_t i; UINT32 val; @@ -1422,13 +1422,13 @@ void R_DrawTranslucentSplat_8 (void) UINT32 xposition; UINT32 yposition; UINT32 xstep, ystep; - UINT32 bit; + register UINT32 bit; UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; - size_t count; + register size_t count; size_t i; UINT8 val; @@ -1487,14 +1487,14 @@ void R_DrawTranslucentSpan_8 (void) fixed_t xposition; fixed_t yposition; fixed_t xstep, ystep; - UINT32 bit; + register UINT32 bit; UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height; - size_t count = (ds_x2 - ds_x1 + 1); + register size_t count = (ds_x2 - ds_x1 + 1); size_t i; xposition = ds_xfrac; yposition = ds_yfrac; @@ -1546,14 +1546,14 @@ void R_DrawTranslucentWaterSpan_8(void) UINT32 xposition; UINT32 yposition; UINT32 xstep, ystep; - UINT32 bit; + register UINT32 bit; UINT8 *source; UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; UINT8 *dsrc; - size_t count; + register size_t count; size_t i; // SoM: we only need 6 bits for the integer part (0 thru 63) so the rest @@ -1605,9 +1605,9 @@ void R_DrawTranslucentWaterSpan_8(void) void R_DrawFogSpan_8(void) { UINT8 *colormap; - UINT8 *dest; + register UINT8 *dest; - size_t count; + register size_t count; colormap = ds_colormap; //dest = ylookup[ds_y] + columnofs[ds_x1]; @@ -1638,8 +1638,8 @@ void R_DrawFogSpan_8(void) */ void R_DrawFogColumn_8(void) { - INT32 count; - UINT8 *dest; + register INT32 count; + register UINT8 *dest; count = dc_yh - dc_yl; @@ -1674,7 +1674,8 @@ void R_DrawFogColumn_8(void) */ void R_DrawColumnShadowed_8(void) { - INT32 count, realyh, i, height, bheight = 0, solid = 0; + register INT32 count; + INT32 realyh, i, height, bheight = 0, solid = 0; realyh = dc_yh;