mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- changed skybox code to use the alpha from the sector plane.
- removed alpha from skybox viewpoints. SVN r2993 (trunk)
This commit is contained in:
parent
492bead360
commit
ef133dc682
5 changed files with 13 additions and 5 deletions
|
@ -97,7 +97,6 @@ public:
|
||||||
bool bInSkybox;
|
bool bInSkybox;
|
||||||
bool bAlways;
|
bool bAlways;
|
||||||
TObjPtr<ASkyViewpoint> Mate;
|
TObjPtr<ASkyViewpoint> Mate;
|
||||||
fixed_t PlaneAlpha;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AStackPoint : public ASkyViewpoint
|
class AStackPoint : public ASkyViewpoint
|
||||||
|
|
|
@ -69,7 +69,12 @@ void ASkyViewpoint::BeginPlay ()
|
||||||
void ASkyViewpoint::Serialize (FArchive &arc)
|
void ASkyViewpoint::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
Super::Serialize (arc);
|
Super::Serialize (arc);
|
||||||
arc << bInSkybox << bAlways << Mate << PlaneAlpha;
|
arc << bInSkybox << bAlways << Mate;
|
||||||
|
if (SaveVersion < 2992)
|
||||||
|
{
|
||||||
|
fixed_t eatme;
|
||||||
|
arc << eatme;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASkyViewpoint::Destroy ()
|
void ASkyViewpoint::Destroy ()
|
||||||
|
|
|
@ -870,7 +870,7 @@ static void SetupFloorPortal (AStackPoint *point)
|
||||||
if (Sector->FloorSkyBox != NULL)
|
if (Sector->FloorSkyBox != NULL)
|
||||||
{
|
{
|
||||||
Sector->FloorSkyBox->Mate = point;
|
Sector->FloorSkyBox->Mate = point;
|
||||||
Sector->FloorSkyBox->PlaneAlpha = Scale (point->args[0], OPAQUE, 255);
|
Sector->SetAlpha(sector_t::floor, Scale (point->args[0], OPAQUE, 255));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -882,7 +882,7 @@ static void SetupCeilingPortal (AStackPoint *point)
|
||||||
if (Sector->CeilingSkyBox != NULL)
|
if (Sector->CeilingSkyBox != NULL)
|
||||||
{
|
{
|
||||||
Sector->CeilingSkyBox->Mate = point;
|
Sector->CeilingSkyBox->Mate = point;
|
||||||
Sector->CeilingSkyBox->PlaneAlpha = Scale (point->args[0], OPAQUE, 255);
|
Sector->SetAlpha(sector_t::ceiling, Scale (point->args[0], OPAQUE, 255));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -919,6 +919,7 @@ void P_SetupPortals()
|
||||||
fixed_t deltay1 = points[i]->Mate->y - points[i]->y;
|
fixed_t deltay1 = points[i]->Mate->y - points[i]->y;
|
||||||
fixed_t deltax2 = points[j]->Mate->x - points[j]->x;
|
fixed_t deltax2 = points[j]->Mate->x - points[j]->x;
|
||||||
fixed_t deltay2 = points[j]->Mate->y - points[j]->y;
|
fixed_t deltay2 = points[j]->Mate->y - points[j]->y;
|
||||||
|
|
||||||
if (deltax1 == deltax2 && deltay1 == deltay2)
|
if (deltax1 == deltax2 && deltay1 == deltay2)
|
||||||
{
|
{
|
||||||
if (points[j]->Sector->FloorSkyBox == points[j]->Mate)
|
if (points[j]->Sector->FloorSkyBox == points[j]->Mate)
|
||||||
|
|
|
@ -561,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
|
||||||
|
skybox = NULL;
|
||||||
alpha = FRACUNIT;
|
alpha = FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -728,6 +729,7 @@ visplane_t *R_CheckPlane (visplane_t *pl, int start, int stop)
|
||||||
new_pl->viewz = pl->viewz;
|
new_pl->viewz = pl->viewz;
|
||||||
new_pl->viewangle = pl->viewangle;
|
new_pl->viewangle = pl->viewangle;
|
||||||
new_pl->sky = pl->sky;
|
new_pl->sky = pl->sky;
|
||||||
|
new_pl->alpha = pl->alpha;
|
||||||
pl = new_pl;
|
pl = new_pl;
|
||||||
pl->minx = start;
|
pl->minx = start;
|
||||||
pl->maxx = stop;
|
pl->maxx = stop;
|
||||||
|
@ -1178,7 +1180,6 @@ void R_DrawSkyBoxes ()
|
||||||
viewxStack.Push (viewx);
|
viewxStack.Push (viewx);
|
||||||
viewyStack.Push (viewy);
|
viewyStack.Push (viewy);
|
||||||
viewzStack.Push (viewz);
|
viewzStack.Push (viewz);
|
||||||
pl->alpha = sky->PlaneAlpha;
|
|
||||||
visplaneStack.Push (pl);
|
visplaneStack.Push (pl);
|
||||||
|
|
||||||
R_RenderBSPNode (nodes + numnodes - 1);
|
R_RenderBSPNode (nodes + numnodes - 1);
|
||||||
|
|
|
@ -1295,6 +1295,7 @@ void R_NewWall (bool needlights)
|
||||||
// killough 3/7/98: Add checks for (x,y) offsets
|
// killough 3/7/98: Add checks for (x,y) offsets
|
||||||
|| backsector->GetXOffset(sector_t::floor) != frontsector->GetXOffset(sector_t::floor)
|
|| backsector->GetXOffset(sector_t::floor) != frontsector->GetXOffset(sector_t::floor)
|
||||||
|| backsector->GetYOffset(sector_t::floor) != frontsector->GetYOffset(sector_t::floor)
|
|| backsector->GetYOffset(sector_t::floor) != frontsector->GetYOffset(sector_t::floor)
|
||||||
|
|| backsector->GetAlpha(sector_t::floor) != frontsector->GetAlpha(sector_t::floor)
|
||||||
|
|
||||||
// killough 4/15/98: prevent 2s normals
|
// killough 4/15/98: prevent 2s normals
|
||||||
// from bleeding through deep water
|
// from bleeding through deep water
|
||||||
|
@ -1326,6 +1327,7 @@ void R_NewWall (bool needlights)
|
||||||
// killough 3/7/98: Add checks for (x,y) offsets
|
// killough 3/7/98: Add checks for (x,y) offsets
|
||||||
|| backsector->GetXOffset(sector_t::ceiling) != frontsector->GetXOffset(sector_t::ceiling)
|
|| backsector->GetXOffset(sector_t::ceiling) != frontsector->GetXOffset(sector_t::ceiling)
|
||||||
|| backsector->GetYOffset(sector_t::ceiling) != frontsector->GetYOffset(sector_t::ceiling)
|
|| backsector->GetYOffset(sector_t::ceiling) != frontsector->GetYOffset(sector_t::ceiling)
|
||||||
|
|| backsector->GetAlpha(sector_t::ceiling) != frontsector->GetAlpha(sector_t::ceiling)
|
||||||
|
|
||||||
// killough 4/15/98: prevent 2s normals
|
// killough 4/15/98: prevent 2s normals
|
||||||
// from bleeding through fake ceilings
|
// from bleeding through fake ceilings
|
||||||
|
|
Loading…
Reference in a new issue