mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 13:50:48 +00:00
- add alpha property to sector_t::splane. Not used yet.
SVN r2992 (trunk)
This commit is contained in:
parent
c31c4755fa
commit
492bead360
4 changed files with 23 additions and 3 deletions
|
@ -445,6 +445,14 @@ FArchive &operator<< (FArchive &arc, sector_t::splane &p)
|
||||||
arc << p.xform.xoffs << p.xform.yoffs << p.xform.xscale << p.xform.yscale
|
arc << p.xform.xoffs << p.xform.yoffs << p.xform.xscale << p.xform.yscale
|
||||||
<< p.xform.angle << p.xform.base_yoffs << p.xform.base_angle
|
<< p.xform.angle << p.xform.base_yoffs << p.xform.base_angle
|
||||||
<< p.Flags << p.Light << p.Texture << p.TexZ;
|
<< p.Flags << p.Light << p.Texture << p.TexZ;
|
||||||
|
if (SaveVersion >= 2992)
|
||||||
|
{
|
||||||
|
arc << p.alpha;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p.alpha = FRACUNIT;
|
||||||
|
}
|
||||||
return arc;
|
return arc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1420,7 +1420,8 @@ void P_LoadSectors (MapData * map)
|
||||||
ss->nextsec = -1; //jff 2/26/98 add fields to support locking out
|
ss->nextsec = -1; //jff 2/26/98 add fields to support locking out
|
||||||
ss->prevsec = -1; // stair retriggering until build completes
|
ss->prevsec = -1; // stair retriggering until build completes
|
||||||
|
|
||||||
// killough 3/7/98:
|
ss->SetAlpha(sector_t::ceiling, FRACUNIT);
|
||||||
|
ss->SetAlpha(sector_t::ceiling, FRACUNIT);
|
||||||
ss->SetXScale(sector_t::floor, FRACUNIT); // [RH] floor and ceiling scaling
|
ss->SetXScale(sector_t::floor, FRACUNIT); // [RH] floor and ceiling scaling
|
||||||
ss->SetYScale(sector_t::floor, FRACUNIT);
|
ss->SetYScale(sector_t::floor, FRACUNIT);
|
||||||
ss->SetXScale(sector_t::ceiling, FRACUNIT);
|
ss->SetXScale(sector_t::ceiling, FRACUNIT);
|
||||||
|
|
|
@ -1197,7 +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->GetAlpha(sector_t::ceiling),
|
||||||
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),
|
||||||
|
@ -1222,7 +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->GetAlpha(sector_t::floor),
|
||||||
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),
|
||||||
|
|
11
src/r_defs.h
11
src/r_defs.h
|
@ -457,6 +457,7 @@ struct sector_t
|
||||||
FTransform xform;
|
FTransform xform;
|
||||||
int Flags;
|
int Flags;
|
||||||
int Light;
|
int Light;
|
||||||
|
fixed_t alpha;
|
||||||
FTextureID Texture;
|
FTextureID Texture;
|
||||||
fixed_t TexZ;
|
fixed_t TexZ;
|
||||||
};
|
};
|
||||||
|
@ -544,6 +545,16 @@ struct sector_t
|
||||||
planes[pos].xform.base_angle = o;
|
planes[pos].xform.base_angle = o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetAlpha(int pos, fixed_t o)
|
||||||
|
{
|
||||||
|
planes[pos].alpha = o;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed_t GetAlpha(int pos) const
|
||||||
|
{
|
||||||
|
return planes[pos].alpha;
|
||||||
|
}
|
||||||
|
|
||||||
int GetFlags(int pos) const
|
int GetFlags(int pos) const
|
||||||
{
|
{
|
||||||
return planes[pos].Flags;
|
return planes[pos].Flags;
|
||||||
|
|
Loading…
Reference in a new issue