renderfloors

This commit is contained in:
GoldenTails 2020-12-15 12:52:39 -06:00
parent a1ce35b780
commit 35fbddffe4
5 changed files with 9 additions and 1 deletions

View file

@ -854,6 +854,7 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_fullscreen);
CV_RegisterVar(&cv_renderview);
CV_RegisterVar(&cv_renderwalls);
CV_RegisterVar(&cv_renderfloors);
CV_RegisterVar(&cv_renderer);
CV_RegisterVar(&cv_scr_depth);
CV_RegisterVar(&cv_scr_width);

View file

@ -585,6 +585,9 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
PolyFlags |= PF_ColorMapped;
}
if (!cv_renderfloors.value)
return;
HWR_ProcessPolygon(&Surf, planeVerts, nrPlaneVerts, PolyFlags, shader, false);
if (subsector)

View file

@ -576,6 +576,9 @@ 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;

View file

@ -69,6 +69,7 @@ consvar_t cv_scr_height = CVAR_INIT ("scr_height", "800", CV_SAVE, CV_Unsigned,
consvar_t cv_scr_depth = CVAR_INIT ("scr_depth", "16 bits", CV_SAVE, scr_depth_cons_t, NULL);
consvar_t cv_renderview = CVAR_INIT ("renderview", "On", 0, CV_OnOff, NULL);
consvar_t cv_renderwalls = CVAR_INIT ("renderwalls", "On", 0, CV_OnOff, NULL);
consvar_t cv_renderfloors = CVAR_INIT ("renderfloors", "On", 0, CV_OnOff, NULL);
CV_PossibleValue_t cv_renderer_t[] = {
{1, "Software"},

View file

@ -189,7 +189,7 @@ extern CV_PossibleValue_t cv_renderer_t[];
extern INT32 scr_bpp;
extern UINT8 *scr_borderpatch; // patch used to fill the view borders
extern consvar_t cv_scr_width, cv_scr_height, cv_scr_depth, cv_renderview, cv_renderwalls, cv_renderer, cv_fullscreen;
extern consvar_t cv_scr_width, cv_scr_height, cv_scr_depth, cv_renderview, cv_renderwalls, cv_renderfloors, cv_renderer, cv_fullscreen;
// wait for page flipping to end or not
extern consvar_t cv_vidwait;