cache the fofflags too
This commit is contained in:
1 parent
b14b01d5c9
commit
ae7553ba30
1 file changed
+16
-12
+16
-12
@@ -1945,7 +1945,9 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
{
|
||||
for (rover = gl_backsector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES) || (rover->flags & FF_INVERTSIDES))
|
||||
const ffloortype_e roverflags = rover->flags;
|
||||
|
||||
if (!(roverflags & FF_EXISTS) || !(roverflags & FF_RENDERSIDES) || (roverflags & FF_INVERTSIDES))
|
||||
continue;
|
||||
|
||||
SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight)
|
||||
@@ -1989,7 +1991,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
wallVerts[0].y = FIXED_TO_FLOAT(l);
|
||||
wallVerts[1].y = FIXED_TO_FLOAT(lS);
|
||||
|
||||
if (rover->flags & FF_FOG)
|
||||
if (roverflags & FF_FOG)
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = 0;
|
||||
wallVerts[0].t = wallVerts[1].t = 0;
|
||||
@@ -2050,7 +2052,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
}
|
||||
FBITFIELD blendmode;
|
||||
|
||||
if (rover->flags & FF_FOG)
|
||||
if (roverflags & FF_FOG)
|
||||
{
|
||||
blendmode = PF_Fog|PF_NoTexture;
|
||||
|
||||
@@ -2062,7 +2064,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline);
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, 0, false, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, 0, false, &Surf, roverflags, rover, blendmode);
|
||||
else
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, 0, false, blendmode, true, lightnum, colormap);
|
||||
}
|
||||
@@ -2070,14 +2072,14 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
{
|
||||
blendmode = PF_Masked;
|
||||
|
||||
if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
if ((roverflags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
{
|
||||
blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent;
|
||||
Surf.PolyColor.s.alpha = CLAMP(rover->alpha, 0, 255);
|
||||
}
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, texnum, noencore, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_frontsector, wallVerts, texnum, noencore, &Surf, roverflags, rover, blendmode);
|
||||
else
|
||||
{
|
||||
if (blendmode != PF_Masked)
|
||||
@@ -2093,7 +2095,9 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
{
|
||||
for (rover = gl_frontsector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_ALLSIDES))
|
||||
const ffloortype_e roverflags = rover->flags;
|
||||
|
||||
if (!(roverflags & FF_EXISTS) || !(roverflags & FF_RENDERSIDES) || !(roverflags & FF_ALLSIDES))
|
||||
continue;
|
||||
|
||||
SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight)
|
||||
@@ -2137,7 +2141,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
wallVerts[0].y = FIXED_TO_FLOAT(l);
|
||||
wallVerts[1].y = FIXED_TO_FLOAT(lS);
|
||||
|
||||
if (rover->flags & FF_FOG)
|
||||
if (roverflags & FF_FOG)
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = 0;
|
||||
wallVerts[0].t = wallVerts[1].t = 0;
|
||||
@@ -2165,7 +2169,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
|
||||
FBITFIELD blendmode;
|
||||
|
||||
if (rover->flags & FF_FOG)
|
||||
if (roverflags & FF_FOG)
|
||||
{
|
||||
blendmode = PF_Fog|PF_NoTexture;
|
||||
|
||||
@@ -2177,7 +2181,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
lightnum = (HWR_ShouldUsePaletteRendering() && colormap) ? lightnum : HWR_CalcWallLight(lightnum, gl_curline);
|
||||
|
||||
if (gl_backsector->numlights)
|
||||
HWR_SplitWall(gl_backsector, wallVerts, 0, false, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_backsector, wallVerts, 0, false, &Surf, roverflags, rover, blendmode);
|
||||
else
|
||||
HWR_AddTransparentWall(wallVerts, &Surf, 0, false, blendmode, true, lightnum, colormap);
|
||||
}
|
||||
@@ -2185,14 +2189,14 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
{
|
||||
blendmode = PF_Masked;
|
||||
|
||||
if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
if ((roverflags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend)
|
||||
{
|
||||
blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent;
|
||||
Surf.PolyColor.s.alpha = CLAMP(rover->alpha, 0, 255);
|
||||
}
|
||||
|
||||
if (gl_backsector->numlights)
|
||||
HWR_SplitWall(gl_backsector, wallVerts, texnum, noencore, &Surf, rover->flags, rover, blendmode);
|
||||
HWR_SplitWall(gl_backsector, wallVerts, texnum, noencore, &Surf, roverflags, rover, blendmode);
|
||||
else
|
||||
{
|
||||
if (blendmode != PF_Masked)
|
||||
|
||||
Reference in new issue
Block a user