Merge branch 'invertplanes-bruh' into 'next'
Standardize the behavior of FF_INVERTSIDES and FF_INVERTPLANES See merge request STJr/SRB2!863
This commit is contained in:
commit
e471134746
|
@ -9648,11 +9648,11 @@ struct {
|
||||||
{"FF_CUTEXTRA",FF_CUTEXTRA}, ///< Cuts out hidden translucent pixels.
|
{"FF_CUTEXTRA",FF_CUTEXTRA}, ///< Cuts out hidden translucent pixels.
|
||||||
{"FF_CUTLEVEL",FF_CUTLEVEL}, ///< Cuts out all hidden pixels.
|
{"FF_CUTLEVEL",FF_CUTLEVEL}, ///< Cuts out all hidden pixels.
|
||||||
{"FF_CUTSPRITES",FF_CUTSPRITES}, ///< Final step in making 3D water.
|
{"FF_CUTSPRITES",FF_CUTSPRITES}, ///< Final step in making 3D water.
|
||||||
{"FF_BOTHPLANES",FF_BOTHPLANES}, ///< Renders both planes all the time.
|
{"FF_BOTHPLANES",FF_BOTHPLANES}, ///< Render inside and outside planes.
|
||||||
{"FF_EXTRA",FF_EXTRA}, ///< Gets cut by ::FF_CUTEXTRA.
|
{"FF_EXTRA",FF_EXTRA}, ///< Gets cut by ::FF_CUTEXTRA.
|
||||||
{"FF_TRANSLUCENT",FF_TRANSLUCENT}, ///< See through!
|
{"FF_TRANSLUCENT",FF_TRANSLUCENT}, ///< See through!
|
||||||
{"FF_FOG",FF_FOG}, ///< Fog "brush."
|
{"FF_FOG",FF_FOG}, ///< Fog "brush."
|
||||||
{"FF_INVERTPLANES",FF_INVERTPLANES}, ///< Reverse the plane visibility rules.
|
{"FF_INVERTPLANES",FF_INVERTPLANES}, ///< Only render inside planes.
|
||||||
{"FF_ALLSIDES",FF_ALLSIDES}, ///< Render inside and outside sides.
|
{"FF_ALLSIDES",FF_ALLSIDES}, ///< Render inside and outside sides.
|
||||||
{"FF_INVERTSIDES",FF_INVERTSIDES}, ///< Only render inside sides.
|
{"FF_INVERTSIDES",FF_INVERTSIDES}, ///< Only render inside sides.
|
||||||
{"FF_DOUBLESHADOW",FF_DOUBLESHADOW}, ///< Make two lightlist entries to reset light?
|
{"FF_DOUBLESHADOW",FF_DOUBLESHADOW}, ///< Make two lightlist entries to reset light?
|
||||||
|
|
|
@ -1902,7 +1902,9 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
{
|
{
|
||||||
for (rover = gr_backsector->ffloors; rover; rover = rover->next)
|
for (rover = gr_backsector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES) || (rover->flags & FF_INVERTSIDES))
|
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES))
|
||||||
|
continue;
|
||||||
|
if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES)
|
||||||
continue;
|
continue;
|
||||||
if (*rover->topheight < lowcut || *rover->bottomheight > highcut)
|
if (*rover->topheight < lowcut || *rover->bottomheight > highcut)
|
||||||
continue;
|
continue;
|
||||||
|
@ -2042,7 +2044,9 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
{
|
{
|
||||||
for (rover = gr_frontsector->ffloors; rover; rover = rover->next)
|
for (rover = gr_frontsector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_ALLSIDES))
|
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES))
|
||||||
|
continue;
|
||||||
|
if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES))
|
||||||
continue;
|
continue;
|
||||||
if (*rover->topheight < lowcut || *rover->bottomheight > highcut)
|
if (*rover->topheight < lowcut || *rover->bottomheight > highcut)
|
||||||
continue;
|
continue;
|
||||||
|
@ -3427,7 +3431,7 @@ static void HWR_Subsector(size_t num)
|
||||||
|
|
||||||
if (centerHeight <= locCeilingHeight &&
|
if (centerHeight <= locCeilingHeight &&
|
||||||
centerHeight >= locFloorHeight &&
|
centerHeight >= locFloorHeight &&
|
||||||
((dup_viewz < cullHeight && !(rover->flags & FF_INVERTPLANES)) ||
|
((dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||||
(dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
(dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
if (rover->flags & FF_FOG)
|
if (rover->flags & FF_FOG)
|
||||||
|
@ -3488,7 +3492,7 @@ static void HWR_Subsector(size_t num)
|
||||||
|
|
||||||
if (centerHeight >= locFloorHeight &&
|
if (centerHeight >= locFloorHeight &&
|
||||||
centerHeight <= locCeilingHeight &&
|
centerHeight <= locCeilingHeight &&
|
||||||
((dup_viewz > cullHeight && !(rover->flags & FF_INVERTPLANES)) ||
|
((dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||||
(dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
(dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
if (rover->flags & FF_FOG)
|
if (rover->flags & FF_FOG)
|
||||||
|
|
|
@ -495,7 +495,7 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2)
|
||||||
if (rover->flags & FF_SOLID)
|
if (rover->flags & FF_SOLID)
|
||||||
continue; // shortcut since neither mobj can be inside the 3dfloor
|
continue; // shortcut since neither mobj can be inside the 3dfloor
|
||||||
|
|
||||||
if (!(rover->flags & FF_INVERTPLANES))
|
if (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))
|
||||||
{
|
{
|
||||||
if (los.sightzstart >= topz1 && t2->z + t2->height < topz2)
|
if (los.sightzstart >= topz1 && t2->z + t2->height < topz2)
|
||||||
return false; // blocked by upper outside plane
|
return false; // blocked by upper outside plane
|
||||||
|
@ -504,7 +504,7 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2)
|
||||||
return false; // blocked by lower outside plane
|
return false; // blocked by lower outside plane
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rover->flags & FF_INVERTPLANES || rover->flags & FF_BOTHPLANES)
|
if (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)
|
||||||
{
|
{
|
||||||
if (los.sightzstart < topz1 && t2->z >= topz2)
|
if (los.sightzstart < topz1 && t2->z >= topz2)
|
||||||
return false; // blocked by upper inside plane
|
return false; // blocked by upper inside plane
|
||||||
|
|
|
@ -7069,7 +7069,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 202: // Fog
|
case 202: // Fog
|
||||||
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_FOG|FF_BOTHPLANES|FF_INVERTPLANES|FF_ALLSIDES|FF_INVERTSIDES|FF_CUTEXTRA|FF_EXTRA|FF_DOUBLESHADOW|FF_CUTSPRITES;
|
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_FOG|FF_INVERTPLANES|FF_INVERTSIDES|FF_CUTEXTRA|FF_EXTRA|FF_DOUBLESHADOW|FF_CUTSPRITES;
|
||||||
sec = sides[*lines[i].sidenum].sector - sectors;
|
sec = sides[*lines[i].sidenum].sector - sectors;
|
||||||
// SoM: Because it's fog, check for an extra colormap and set the fog flag...
|
// SoM: Because it's fog, check for an extra colormap and set the fog flag...
|
||||||
if (sectors[sec].extra_colormap)
|
if (sectors[sec].extra_colormap)
|
||||||
|
|
|
@ -955,8 +955,8 @@ static void R_Subsector(size_t num)
|
||||||
*rover->bottomheight;
|
*rover->bottomheight;
|
||||||
if (planecenterz <= ceilingcenterz
|
if (planecenterz <= ceilingcenterz
|
||||||
&& planecenterz >= floorcenterz
|
&& planecenterz >= floorcenterz
|
||||||
&& ((viewz < heightcheck && !(rover->flags & FF_INVERTPLANES))
|
&& ((viewz < heightcheck && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES)))
|
||||||
|| (viewz > heightcheck && (rover->flags & FF_BOTHPLANES))))
|
|| (viewz > heightcheck && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
light = R_GetPlaneLight(frontsector, planecenterz,
|
light = R_GetPlaneLight(frontsector, planecenterz,
|
||||||
viewz < heightcheck);
|
viewz < heightcheck);
|
||||||
|
@ -993,8 +993,8 @@ static void R_Subsector(size_t num)
|
||||||
*rover->topheight;
|
*rover->topheight;
|
||||||
if (planecenterz >= floorcenterz
|
if (planecenterz >= floorcenterz
|
||||||
&& planecenterz <= ceilingcenterz
|
&& planecenterz <= ceilingcenterz
|
||||||
&& ((viewz > heightcheck && !(rover->flags & FF_INVERTPLANES))
|
&& ((viewz > heightcheck && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES)))
|
||||||
|| (viewz < heightcheck && (rover->flags & FF_BOTHPLANES))))
|
|| (viewz < heightcheck && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
light = R_GetPlaneLight(frontsector, planecenterz, viewz < heightcheck);
|
light = R_GetPlaneLight(frontsector, planecenterz, viewz < heightcheck);
|
||||||
|
|
||||||
|
|
|
@ -130,11 +130,11 @@ typedef enum
|
||||||
FF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels.
|
FF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels.
|
||||||
FF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels.
|
FF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels.
|
||||||
FF_CUTSPRITES = 0x200, ///< Final step in making 3D water.
|
FF_CUTSPRITES = 0x200, ///< Final step in making 3D water.
|
||||||
FF_BOTHPLANES = 0x400, ///< Renders both planes all the time.
|
FF_BOTHPLANES = 0x400, ///< Render inside and outside planes.
|
||||||
FF_EXTRA = 0x800, ///< Gets cut by ::FF_CUTEXTRA.
|
FF_EXTRA = 0x800, ///< Gets cut by ::FF_CUTEXTRA.
|
||||||
FF_TRANSLUCENT = 0x1000, ///< See through!
|
FF_TRANSLUCENT = 0x1000, ///< See through!
|
||||||
FF_FOG = 0x2000, ///< Fog "brush."
|
FF_FOG = 0x2000, ///< Fog "brush."
|
||||||
FF_INVERTPLANES = 0x4000, ///< Reverse the plane visibility rules.
|
FF_INVERTPLANES = 0x4000, ///< Only render inside planes.
|
||||||
FF_ALLSIDES = 0x8000, ///< Render inside and outside sides.
|
FF_ALLSIDES = 0x8000, ///< Render inside and outside sides.
|
||||||
FF_INVERTSIDES = 0x10000, ///< Only render inside sides.
|
FF_INVERTSIDES = 0x10000, ///< Only render inside sides.
|
||||||
FF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light?
|
FF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light?
|
||||||
|
|
28
src/r_segs.c
28
src/r_segs.c
|
@ -2165,7 +2165,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
{
|
{
|
||||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||||
continue;
|
continue;
|
||||||
if (rover->flags & FF_INVERTSIDES)
|
if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (rover->norender == leveltime)
|
if (rover->norender == leveltime)
|
||||||
|
@ -2220,7 +2220,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
{
|
{
|
||||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||||
continue;
|
continue;
|
||||||
if (!(rover->flags & FF_ALLSIDES))
|
if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (rover->norender == leveltime)
|
if (rover->norender == leveltime)
|
||||||
|
@ -2275,7 +2275,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
{
|
{
|
||||||
for (rover = backsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next)
|
for (rover = backsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next)
|
||||||
{
|
{
|
||||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS) || rover->flags & FF_INVERTSIDES)
|
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||||
|
continue;
|
||||||
|
if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES)
|
||||||
continue;
|
continue;
|
||||||
if (rover->norender == leveltime)
|
if (rover->norender == leveltime)
|
||||||
continue;
|
continue;
|
||||||
|
@ -2295,7 +2297,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
{
|
{
|
||||||
for (rover = frontsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next)
|
for (rover = frontsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next)
|
||||||
{
|
{
|
||||||
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS) || !(rover->flags & FF_ALLSIDES))
|
if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS))
|
||||||
|
continue;
|
||||||
|
if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES))
|
||||||
continue;
|
continue;
|
||||||
if (rover->norender == leveltime)
|
if (rover->norender == leveltime)
|
||||||
continue;
|
continue;
|
||||||
|
@ -2620,8 +2624,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
|
|
||||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||||
((viewz < planevistest && !(rover->flags & FF_INVERTPLANES)) ||
|
((viewz < planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||||
(viewz > planevistest && (rover->flags & FF_BOTHPLANES))))
|
(viewz > planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
//ffloor[i].slope = *rover->b_slope;
|
//ffloor[i].slope = *rover->b_slope;
|
||||||
ffloor[i].b_pos = roverleft;
|
ffloor[i].b_pos = roverleft;
|
||||||
|
@ -2643,8 +2647,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
|
|
||||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||||
((viewz > planevistest && !(rover->flags & FF_INVERTPLANES)) ||
|
((viewz > planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||||
(viewz < planevistest && (rover->flags & FF_BOTHPLANES))))
|
(viewz < planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
//ffloor[i].slope = *rover->t_slope;
|
//ffloor[i].slope = *rover->t_slope;
|
||||||
ffloor[i].b_pos = roverleft;
|
ffloor[i].b_pos = roverleft;
|
||||||
|
@ -2677,8 +2681,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
|
|
||||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||||
((viewz < planevistest && !(rover->flags & FF_INVERTPLANES)) ||
|
((viewz < planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||||
(viewz > planevistest && (rover->flags & FF_BOTHPLANES))))
|
(viewz > planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
//ffloor[i].slope = *rover->b_slope;
|
//ffloor[i].slope = *rover->b_slope;
|
||||||
ffloor[i].b_pos = roverleft;
|
ffloor[i].b_pos = roverleft;
|
||||||
|
@ -2700,8 +2704,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
|
|
||||||
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) &&
|
||||||
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
(roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) &&
|
||||||
((viewz > planevistest && !(rover->flags & FF_INVERTPLANES)) ||
|
((viewz > planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) ||
|
||||||
(viewz < planevistest && (rover->flags & FF_BOTHPLANES))))
|
(viewz < planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES))))
|
||||||
{
|
{
|
||||||
//ffloor[i].slope = *rover->t_slope;
|
//ffloor[i].slope = *rover->t_slope;
|
||||||
ffloor[i].b_pos = roverleft;
|
ffloor[i].b_pos = roverleft;
|
||||||
|
|
Loading…
Reference in New Issue