ref_soft: Fill sky, enable turb code (not working correctly)

This commit is contained in:
mittorn 2019-03-28 03:42:28 +07:00
parent 7f8caf1634
commit 72d5dfed34
3 changed files with 12 additions and 7 deletions

View File

@ -920,10 +920,10 @@ void D_TurbulentSurf (surf_t *s)
//============ //============
//PGM //PGM
// textures that aren't warping are just flowing. Use NonTurbulent8 instead // textures that aren't warping are just flowing. Use NonTurbulent8 instead
#if 1 #if 0
NonTurbulent8 (s->spans); Turbulent8 (s->spans);
#else #else
if(!(pface->texinfo->flags & SURF_DRAWTURB)) if(!(pface->flags & SURF_DRAWTURB))
NonTurbulent8 (s->spans); NonTurbulent8 (s->spans);
else else
Turbulent8 (s->spans); Turbulent8 (s->spans);
@ -1123,7 +1123,12 @@ void D_DrawSurfaces (void)
r_drawnpolycount++; r_drawnpolycount++;
#if 1 #if 1
D_SolidSurf (s); if(s->flags & SURF_DRAWSKY)
D_BackgroundSurf (s);
else if (s->flags & SURF_DRAWTURB)
D_TurbulentSurf (s);
else
D_SolidSurf (s);
#else #else
if (! (s->flags & (SURF_DRAWSKYBOX|SURF_DRAWBACKGROUND|SURF_DRAWTURB) ) ) if (! (s->flags & (SURF_DRAWSKYBOX|SURF_DRAWBACKGROUND|SURF_DRAWTURB) ) )
D_SolidSurf (s); D_SolidSurf (s);

View File

@ -1912,7 +1912,7 @@ qboolean R_Init()
// sw_aliasstats = ri.Cvar_Get ("sw_polymodelstats", "0", 0); // sw_aliasstats = ri.Cvar_Get ("sw_polymodelstats", "0", 0);
// sw_allow_modex = ri.Cvar_Get( "sw_allow_modex", "1", CVAR_ARCHIVE ); // sw_allow_modex = ri.Cvar_Get( "sw_allow_modex", "1", CVAR_ARCHIVE );
sw_clearcolor = gEngfuncs.Cvar_Get ("sw_clearcolor", "2", 0, "screen clear color"); sw_clearcolor = gEngfuncs.Cvar_Get ("sw_clearcolor", "48999", 0, "screen clear color");
sw_drawflat = gEngfuncs.Cvar_Get ("sw_drawflat", "0", 0, ""); sw_drawflat = gEngfuncs.Cvar_Get ("sw_drawflat", "0", 0, "");
sw_draworder = gEngfuncs.Cvar_Get ("sw_draworder", "0", 0, ""); sw_draworder = gEngfuncs.Cvar_Get ("sw_draworder", "0", 0, "");
sw_maxedges = gEngfuncs.Cvar_Get ("sw_maxedges", "32", 0, ""); sw_maxedges = gEngfuncs.Cvar_Get ("sw_maxedges", "32", 0, "");

View File

@ -544,7 +544,7 @@ void R_RenderFace (msurface_t *fa, int clipflags)
{ {
//fa->nextalphasurface = r_alpha_surfaces; //fa->nextalphasurface = r_alpha_surfaces;
//r_alpha_surfaces = fa; //r_alpha_surfaces = fa;
return; //return;
} }
// sky surfaces encountered in the world will cause the // sky surfaces encountered in the world will cause the
@ -552,7 +552,7 @@ void R_RenderFace (msurface_t *fa, int clipflags)
if ( fa->flags & SURF_DRAWSKY ) if ( fa->flags & SURF_DRAWSKY )
{ {
//R_EmitSkyBox (); //R_EmitSkyBox ();
return; // return;
} }
// skip out if no more surfs // skip out if no more surfs