diff --git a/src/r_plane.c b/src/r_plane.c index 135282b83381698b36b7336d0905a8e16848af67..63c6c03b7bfa4791b5774fa736699f1e5ab0a6a3 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -576,9 +576,6 @@ void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop) // void R_MakeSpans(INT32 x, INT32 t1, INT32 b1, INT32 t2, INT32 b2) { - if (!cv_renderfloors.value) - return; - // Alam: from r_splats's R_RasterizeFloorSplat if (t1 >= vid.height) t1 = vid.height-1; if (b1 >= vid.height) b1 = vid.height-1; @@ -791,6 +788,9 @@ void R_DrawSinglePlane(visplane_t *pl) if (!(pl->minx <= pl->maxx)) return; + if (!cv_renderfloors.value) + return; + // sky flat if (pl->picnum == skyflatnum) { diff --git a/src/r_segs.c b/src/r_segs.c index be24be88625b8fd224af80ca746c85d5c7e0d9c9..a087206304014510db13a0ed6e97a2158a634cf6 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -143,6 +143,9 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) INT64 overflow_test; INT32 range; + if (!cv_renderwalls.value) + return; + // Calculate light table. // Use different light tables // for horizontal / vertical / diagonal. Diagonal? @@ -318,9 +321,6 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) else repeats = 1; - if (!cv_renderwalls.value) - return; - for (times = 0; times < repeats; times++) { if (times > 0) @@ -582,6 +582,9 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) void (*colfunc_2s) (column_t *); + if (!cv_renderwalls.value) + return; + // Calculate light table. // Use different light tables // for horizontal / vertical / diagonal. Diagonal? @@ -864,9 +867,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) bottom_frac += bottom_step * (x1 - ds->x1); } - if (!cv_renderwalls.value) - return; - // draw the columns for (dc_x = x1; dc_x <= x2; dc_x++) { @@ -1346,27 +1346,29 @@ static void R_RenderSegLoop (void) // single sided line if (yl <= yh && yh >= 0 && yl < viewheight) { - dc_yl = yl; - dc_yh = yh; - dc_texturemid = rw_midtexturemid; - dc_source = R_GetColumn(midtexture,texturecolumn); - dc_texheight = textureheight[midtexture]>>FRACBITS; + if (cv_renderwalls.value) + { + dc_yl = yl; + dc_yh = yh; + dc_texturemid = rw_midtexturemid; + dc_source = R_GetColumn(midtexture,texturecolumn); + dc_texheight = textureheight[midtexture]>>FRACBITS; - //profile stuff --------------------------------------------------------- + //profile stuff --------------------------------------------------------- #ifdef TIMING - ProfZeroTimer(); + ProfZeroTimer(); #endif - if (cv_renderwalls.value) colfunc(); #ifdef TIMING - RDMSR(0x10,&mycount); - mytotal += mycount; //64bit add + RDMSR(0x10,&mycount); + mytotal += mycount; //64bit add - if (nombre--==0) - I_Error("R_DrawColumn CPU Spy reports: 0x%d %d\n", *((INT32 *)&mytotal+1), - (INT32)mytotal); + if (nombre--==0) + I_Error("R_DrawColumn CPU Spy reports: 0x%d %d\n", *((INT32 *)&mytotal+1), + (INT32)mytotal); #endif - //profile stuff --------------------------------------------------------- + //profile stuff --------------------------------------------------------- + } // dont draw anything more for this column, since // a midtexture blocks the view @@ -1408,13 +1410,15 @@ static void R_RenderSegLoop (void) } else if (mid >= 0) // safe to draw top texture { - dc_yl = yl; - dc_yh = mid; - dc_texturemid = rw_toptexturemid; - dc_source = R_GetColumn(toptexture,texturecolumn); - dc_texheight = textureheight[toptexture]>>FRACBITS; if (cv_renderwalls.value) + { + dc_yl = yl; + dc_yh = mid; + dc_texturemid = rw_toptexturemid; + dc_source = R_GetColumn(toptexture,texturecolumn); + dc_texheight = textureheight[toptexture]>>FRACBITS; colfunc(); + } ceilingclip[rw_x] = (INT16)mid; } else if (!rw_ceilingmarked) // entirely off top of screen @@ -1445,14 +1449,16 @@ static void R_RenderSegLoop (void) } else if (mid < viewheight) // safe to draw bottom texture { - dc_yl = mid; - dc_yh = yh; - dc_texturemid = rw_bottomtexturemid; - dc_source = R_GetColumn(bottomtexture, - texturecolumn); - dc_texheight = textureheight[bottomtexture]>>FRACBITS; if (cv_renderwalls.value) + { + dc_yl = mid; + dc_yh = yh; + dc_texturemid = rw_bottomtexturemid; + dc_source = R_GetColumn(bottomtexture, + texturecolumn); + dc_texheight = textureheight[bottomtexture]>>FRACBITS; colfunc(); + } floorclip[rw_x] = (INT16)mid; } else if (!rw_floormarked) // entirely off bottom of screen