mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- add an alpha parameter to R_FindPlane.
- fixed: R_FindPlane must do a full visplane comparison for stacked sectors with a non-0 alpha for the sector plane. SVN r2991 (trunk)
This commit is contained in:
parent
669ce73272
commit
c31c4755fa
3 changed files with 20 additions and 1 deletions
|
@ -1197,6 +1197,7 @@ void R_Subsector (subsector_t *sub)
|
||||||
R_FindPlane(frontsector->ceilingplane, // killough 3/8/98
|
R_FindPlane(frontsector->ceilingplane, // killough 3/8/98
|
||||||
frontsector->GetTexture(sector_t::ceiling),
|
frontsector->GetTexture(sector_t::ceiling),
|
||||||
ceilinglightlevel + r_actualextralight, // killough 4/11/98
|
ceilinglightlevel + r_actualextralight, // killough 4/11/98
|
||||||
|
FRACUNIT,
|
||||||
frontsector->GetXOffset(sector_t::ceiling), // killough 3/7/98
|
frontsector->GetXOffset(sector_t::ceiling), // killough 3/7/98
|
||||||
frontsector->GetYOffset(sector_t::ceiling), // killough 3/7/98
|
frontsector->GetYOffset(sector_t::ceiling), // killough 3/7/98
|
||||||
frontsector->GetXScale(sector_t::ceiling),
|
frontsector->GetXScale(sector_t::ceiling),
|
||||||
|
@ -1221,6 +1222,7 @@ void R_Subsector (subsector_t *sub)
|
||||||
R_FindPlane(frontsector->floorplane,
|
R_FindPlane(frontsector->floorplane,
|
||||||
frontsector->GetTexture(sector_t::floor),
|
frontsector->GetTexture(sector_t::floor),
|
||||||
floorlightlevel + r_actualextralight, // killough 3/16/98
|
floorlightlevel + r_actualextralight, // killough 3/16/98
|
||||||
|
FRACUNIT,
|
||||||
frontsector->GetXOffset(sector_t::floor), // killough 3/7/98
|
frontsector->GetXOffset(sector_t::floor), // killough 3/7/98
|
||||||
frontsector->GetYOffset(sector_t::floor), // killough 3/7/98
|
frontsector->GetYOffset(sector_t::floor), // killough 3/7/98
|
||||||
frontsector->GetXScale(sector_t::floor),
|
frontsector->GetXScale(sector_t::floor),
|
||||||
|
|
|
@ -522,7 +522,7 @@ static visplane_t *new_visplane (unsigned hash)
|
||||||
// killough 2/28/98: Add offsets
|
// killough 2/28/98: Add offsets
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightlevel,
|
visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightlevel, fixed_t alpha,
|
||||||
fixed_t xoffs, fixed_t yoffs,
|
fixed_t xoffs, fixed_t yoffs,
|
||||||
fixed_t xscale, fixed_t yscale, angle_t angle,
|
fixed_t xscale, fixed_t yscale, angle_t angle,
|
||||||
int sky, ASkyViewpoint *skybox)
|
int sky, ASkyViewpoint *skybox)
|
||||||
|
@ -540,6 +540,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
|
||||||
xscale = 0;
|
xscale = 0;
|
||||||
yscale = 0;
|
yscale = 0;
|
||||||
angle = 0;
|
angle = 0;
|
||||||
|
alpha = 0;
|
||||||
plane.a = plane.b = plane.d = 0;
|
plane.a = plane.b = plane.d = 0;
|
||||||
// [RH] Map floor skies and ceiling skies to separate visplanes. This isn't
|
// [RH] Map floor skies and ceiling skies to separate visplanes. This isn't
|
||||||
// always necessary, but it is needed if a floor and ceiling sky are in the
|
// always necessary, but it is needed if a floor and ceiling sky are in the
|
||||||
|
@ -560,6 +561,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
|
||||||
plane = height;
|
plane = height;
|
||||||
isskybox = false;
|
isskybox = false;
|
||||||
sky = 0; // not skyflatnum so it can't be a sky
|
sky = 0; // not skyflatnum so it can't be a sky
|
||||||
|
alpha = FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// New visplane algorithm uses hash table -- killough
|
// New visplane algorithm uses hash table -- killough
|
||||||
|
@ -579,6 +581,19 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
|
||||||
check->viewx == stacked_viewx &&
|
check->viewx == stacked_viewx &&
|
||||||
check->viewy == stacked_viewy &&
|
check->viewy == stacked_viewy &&
|
||||||
check->viewz == stacked_viewz &&
|
check->viewz == stacked_viewz &&
|
||||||
|
check->alpha == alpha &&
|
||||||
|
(alpha == 0 || // if alpha is > 0 everything needs to be checked
|
||||||
|
(plane == check->height &&
|
||||||
|
picnum == check->picnum &&
|
||||||
|
lightlevel == check->lightlevel &&
|
||||||
|
xoffs == check->xoffs && // killough 2/28/98: Add offset checks
|
||||||
|
yoffs == check->yoffs &&
|
||||||
|
basecolormap == check->colormap && // [RH] Add more checks
|
||||||
|
xscale == check->xscale &&
|
||||||
|
yscale == check->yscale &&
|
||||||
|
angle == check->angle
|
||||||
|
)
|
||||||
|
) &&
|
||||||
check->viewangle == stacked_angle)
|
check->viewangle == stacked_angle)
|
||||||
{
|
{
|
||||||
return check;
|
return check;
|
||||||
|
@ -628,6 +643,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
|
||||||
check->viewy = stacked_viewy;
|
check->viewy = stacked_viewy;
|
||||||
check->viewz = stacked_viewz;
|
check->viewz = stacked_viewz;
|
||||||
check->viewangle = stacked_angle;
|
check->viewangle = stacked_angle;
|
||||||
|
check->alpha = alpha;
|
||||||
|
|
||||||
clearbufshort (check->top, viewwidth, 0x7fff);
|
clearbufshort (check->top, viewwidth, 0x7fff);
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,7 @@ visplane_t *R_FindPlane
|
||||||
( const secplane_t &height,
|
( const secplane_t &height,
|
||||||
FTextureID picnum,
|
FTextureID picnum,
|
||||||
int lightlevel,
|
int lightlevel,
|
||||||
|
fixed_t alpha,
|
||||||
fixed_t xoffs, // killough 2/28/98: add x-y offsets
|
fixed_t xoffs, // killough 2/28/98: add x-y offsets
|
||||||
fixed_t yoffs,
|
fixed_t yoffs,
|
||||||
fixed_t xscale,
|
fixed_t xscale,
|
||||||
|
|
Loading…
Reference in a new issue