mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 16:41:09 +00:00
Add more ways to prevent GZDoom from drawing skybox walls
Add noskywalls flag to sectors and linedefs
This commit is contained in:
parent
f9fa07dca5
commit
9b598017f9
6 changed files with 17 additions and 4 deletions
|
@ -140,6 +140,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
// 12: Unexplored secret wall.
|
// 12: Unexplored secret wall.
|
||||||
// 13: Portal line.
|
// 13: Portal line.
|
||||||
revealed = <bool>; // true = line is initially visible on automap.
|
revealed = <bool>; // true = line is initially visible on automap.
|
||||||
|
noskywalls = <bool>; // true = skies are not drawn above or below this line
|
||||||
|
|
||||||
health = <int>; // Amount of hitpoints for this line.
|
health = <int>; // Amount of hitpoints for this line.
|
||||||
healthgroup = <int>; // ID of destructible object to synchronize hitpoints (optional, default is 0)
|
healthgroup = <int>; // ID of destructible object to synchronize hitpoints (optional, default is 0)
|
||||||
|
@ -294,6 +295,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
colorization_floor = <int>; // Sets a colorization record for the floor texture. Colorization records must be defined in TEXTURES.
|
colorization_floor = <int>; // Sets a colorization record for the floor texture. Colorization records must be defined in TEXTURES.
|
||||||
colorization_ceiling = <int>; // Sets a colorization record for the ceiling texture. Colorization records must be defined in TEXTURES.
|
colorization_ceiling = <int>; // Sets a colorization record for the ceiling texture. Colorization records must be defined in TEXTURES.
|
||||||
|
|
||||||
|
noskywalls = <bool>; // If true, do not draw skybox walls above/below this sector
|
||||||
|
|
||||||
portal_ceil_blocksound = <bool>; // ceiling portal blocks sound.
|
portal_ceil_blocksound = <bool>; // ceiling portal blocks sound.
|
||||||
portal_ceil_disabled = <bool>; // ceiling portal disabled.
|
portal_ceil_disabled = <bool>; // ceiling portal disabled.
|
||||||
portal_ceil_nopass = <bool>; // ceiling portal blocks movement if true.
|
portal_ceil_nopass = <bool>; // ceiling portal blocks movement if true.
|
||||||
|
|
|
@ -173,7 +173,7 @@ enum ELineFlags : unsigned
|
||||||
ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks
|
ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks
|
||||||
ML_3DMIDTEX_IMPASS = 0x10000000, // [TP] if 3D midtex, behaves like a height-restricted ML_BLOCKING
|
ML_3DMIDTEX_IMPASS = 0x10000000, // [TP] if 3D midtex, behaves like a height-restricted ML_BLOCKING
|
||||||
ML_REVEALED = 0x20000000, // set if revealed in automap
|
ML_REVEALED = 0x20000000, // set if revealed in automap
|
||||||
|
ML_NOSKYWALLS = 0x40000000, // Don't draw sky above or below walls
|
||||||
ML_PORTALCONNECT = 0x80000000, // for internal use only: This line connects to a sector with a linked portal (used to speed up sight checks.)
|
ML_PORTALCONNECT = 0x80000000, // for internal use only: This line connects to a sector with a linked portal (used to speed up sight checks.)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -485,6 +485,7 @@ enum
|
||||||
SECMF_DRAWN = 128, // sector has been drawn at least once
|
SECMF_DRAWN = 128, // sector has been drawn at least once
|
||||||
SECMF_HIDDEN = 256, // Do not draw on textured automap
|
SECMF_HIDDEN = 256, // Do not draw on textured automap
|
||||||
SECMF_OVERLAPPING = 512, // floor and ceiling overlap and require special renderer action.
|
SECMF_OVERLAPPING = 512, // floor and ceiling overlap and require special renderer action.
|
||||||
|
SECMF_NOSKYWALLS = 1024, // Do not draw "sky walls"
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -1074,6 +1074,10 @@ public:
|
||||||
ld->automapstyle = AutomapLineStyle(CheckInt(key));
|
ld->automapstyle = AutomapLineStyle(CheckInt(key));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
case NAME_NoSkyWalls:
|
||||||
|
Flag(ld->flags, ML_NOSKYWALLS, key);
|
||||||
|
continue;
|
||||||
|
|
||||||
case NAME_MoreIds:
|
case NAME_MoreIds:
|
||||||
// delay parsing of the tag string until parsing of the sector is complete
|
// delay parsing of the tag string until parsing of the sector is complete
|
||||||
// This ensures that the ID is always the first tag in the list.
|
// This ensures that the ID is always the first tag in the list.
|
||||||
|
@ -1662,6 +1666,10 @@ public:
|
||||||
sec->AdditiveColors[sector_t::sprites] = CheckInt(key) | 0xff000000;
|
sec->AdditiveColors[sector_t::sprites] = CheckInt(key) | 0xff000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_NoSkyWalls:
|
||||||
|
Flag(sec->MoreFlags, SECMF_NOSKYWALLS, key);
|
||||||
|
break;
|
||||||
|
|
||||||
case NAME_colorization_floor:
|
case NAME_colorization_floor:
|
||||||
sec->SetTextureFx(sector_t::floor, TexMan.GetTextureManipulation(CheckString(key)));
|
sec->SetTextureFx(sector_t::floor, TexMan.GetTextureManipulation(CheckString(key)));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -230,8 +230,8 @@ void HWWall::SkyTop(HWDrawInfo *di, seg_t * seg,sector_t * fs,sector_t * bs,vert
|
||||||
{
|
{
|
||||||
if (fs->GetTexture(sector_t::ceiling)==skyflatnum)
|
if (fs->GetTexture(sector_t::ceiling)==skyflatnum)
|
||||||
{
|
{
|
||||||
if (bs->special == GLSector_NoSkyDraw) return;
|
if (bs->special == GLSector_NoSkyDraw || bs->MoreFlags & SECMF_NOSKYWALLS || seg->linedef->flags & ML_NOSKYWALLS) return;
|
||||||
if (bs->GetTexture(sector_t::ceiling)==skyflatnum)
|
if (bs->GetTexture(sector_t::ceiling)==skyflatnum)
|
||||||
{
|
{
|
||||||
// if the back sector is closed the sky must be drawn!
|
// if the back sector is closed the sky must be drawn!
|
||||||
if (bs->ceilingplane.ZatPoint(v1) > bs->floorplane.ZatPoint(v1) ||
|
if (bs->ceilingplane.ZatPoint(v1) > bs->floorplane.ZatPoint(v1) ||
|
||||||
|
@ -324,7 +324,7 @@ void HWWall::SkyBottom(HWDrawInfo *di, seg_t * seg,sector_t * fs,sector_t * bs,v
|
||||||
{
|
{
|
||||||
if (fs->GetTexture(sector_t::floor)==skyflatnum)
|
if (fs->GetTexture(sector_t::floor)==skyflatnum)
|
||||||
{
|
{
|
||||||
if (bs->special == GLSector_NoSkyDraw) return;
|
if (bs->special == GLSector_NoSkyDraw || bs->MoreFlags & SECMF_NOSKYWALLS || seg->linedef->flags & ML_NOSKYWALLS) return;
|
||||||
FTexture * tex = TexMan.GetTexture(seg->sidedef->GetTexture(side_t::bottom), true);
|
FTexture * tex = TexMan.GetTexture(seg->sidedef->GetTexture(side_t::bottom), true);
|
||||||
|
|
||||||
// For lower skies the normal logic only applies to walls with no lower texture.
|
// For lower skies the normal logic only applies to walls with no lower texture.
|
||||||
|
|
|
@ -594,6 +594,7 @@ xx(ColorAdd_Floor)
|
||||||
xx(ColorAdd_Ceiling)
|
xx(ColorAdd_Ceiling)
|
||||||
xx(ColorAdd_Sprites)
|
xx(ColorAdd_Sprites)
|
||||||
xx(ColorAdd_Walls)
|
xx(ColorAdd_Walls)
|
||||||
|
xx(NoSkyWalls)
|
||||||
xx(Desaturation)
|
xx(Desaturation)
|
||||||
xx(SoundSequence)
|
xx(SoundSequence)
|
||||||
xx(Silent)
|
xx(Silent)
|
||||||
|
|
Loading…
Reference in a new issue