- Change "clipmidtex" compatflag to be accessible in compatibility.txt only.

This commit is contained in:
Rachael Alexanderson 2017-02-23 06:32:53 -05:00
parent d94150f316
commit 10e268ebc0
8 changed files with 11 additions and 13 deletions

View file

@ -113,6 +113,7 @@ static FCompatOption Options[] =
{ "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT }, { "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT },
{ "floatbob", BCOMPATF_FLOATBOB, SLOT_BCOMPAT }, { "floatbob", BCOMPATF_FLOATBOB, SLOT_BCOMPAT },
{ "noslopeid", BCOMPATF_NOSLOPEID, SLOT_BCOMPAT }, { "noslopeid", BCOMPATF_NOSLOPEID, SLOT_BCOMPAT },
{ "clipmidtex", BCOMPATF_CLIPMIDTEX, SLOT_BCOMPAT },
// list copied from g_mapinfo.cpp // list copied from g_mapinfo.cpp
{ "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT }, { "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT },
@ -151,7 +152,6 @@ static FCompatOption Options[] =
{ "multiexit", COMPATF2_MULTIEXIT, SLOT_COMPAT2 }, { "multiexit", COMPATF2_MULTIEXIT, SLOT_COMPAT2 },
{ "teleport", COMPATF2_TELEPORT, SLOT_COMPAT2 }, { "teleport", COMPATF2_TELEPORT, SLOT_COMPAT2 },
{ "disablepushwindowcheck", COMPATF2_PUSHWINDOW, SLOT_COMPAT2 }, { "disablepushwindowcheck", COMPATF2_PUSHWINDOW, SLOT_COMPAT2 },
{ "clipmidtex", COMPATF2_CLIPMIDTEX, SLOT_COMPAT2 },
{ NULL, 0, 0 } { NULL, 0, 0 }
}; };

View file

@ -641,7 +641,6 @@ CVAR (Flag, compat_pointonline, compatflags2, COMPATF2_POINTONLINE);
CVAR (Flag, compat_multiexit, compatflags2, COMPATF2_MULTIEXIT); CVAR (Flag, compat_multiexit, compatflags2, COMPATF2_MULTIEXIT);
CVAR (Flag, compat_teleport, compatflags2, COMPATF2_TELEPORT); CVAR (Flag, compat_teleport, compatflags2, COMPATF2_TELEPORT);
CVAR (Flag, compat_pushwindow, compatflags2, COMPATF2_PUSHWINDOW); CVAR (Flag, compat_pushwindow, compatflags2, COMPATF2_PUSHWINDOW);
CVAR (Flag, compat_clipmidtex, compatflags2, COMPATF2_CLIPMIDTEX);
//========================================================================== //==========================================================================
// //

View file

@ -344,7 +344,6 @@ enum : unsigned int
COMPATF2_MULTIEXIT = 1 << 4, // Level exit can be triggered multiple times (required by Daedalus's travel tubes, thanks to a faulty script) COMPATF2_MULTIEXIT = 1 << 4, // Level exit can be triggered multiple times (required by Daedalus's travel tubes, thanks to a faulty script)
COMPATF2_TELEPORT = 1 << 5, // Don't let indirect teleports trigger sector actions COMPATF2_TELEPORT = 1 << 5, // Don't let indirect teleports trigger sector actions
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial() COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
COMPATF2_CLIPMIDTEX = 1 << 7, // Always Clip midtex's in the software renderer (required to run certain GZDoom maps)
}; };
// Emulate old bugs for select maps. These are not exposed by a cvar // Emulate old bugs for select maps. These are not exposed by a cvar
@ -360,6 +359,7 @@ enum
BCOMPATF_LINKFROZENPROPS = 1 << 6, // Clearing PROP_TOTALLYFROZEN or PROP_FROZEN also clears the other BCOMPATF_LINKFROZENPROPS = 1 << 6, // Clearing PROP_TOTALLYFROZEN or PROP_FROZEN also clears the other
BCOMPATF_FLOATBOB = 1 << 8, // Use Hexen's original method of preventing floatbobbing items from falling down BCOMPATF_FLOATBOB = 1 << 8, // Use Hexen's original method of preventing floatbobbing items from falling down
BCOMPATF_NOSLOPEID = 1 << 9, // disable line IDs on slopes. BCOMPATF_NOSLOPEID = 1 << 9, // disable line IDs on slopes.
BCOMPATF_CLIPMIDTEX = 1 << 10, // Always Clip midtex's in the software renderer (required to run certain GZDoom maps)
}; };
// phares 3/20/98: // phares 3/20/98:

View file

@ -1330,7 +1330,6 @@ MapFlagHandlers[] =
{ "compat_multiexit", MITYPE_COMPATFLAG, 0, COMPATF2_MULTIEXIT }, { "compat_multiexit", MITYPE_COMPATFLAG, 0, COMPATF2_MULTIEXIT },
{ "compat_teleport", MITYPE_COMPATFLAG, 0, COMPATF2_TELEPORT }, { "compat_teleport", MITYPE_COMPATFLAG, 0, COMPATF2_TELEPORT },
{ "compat_pushwindow", MITYPE_COMPATFLAG, 0, COMPATF2_PUSHWINDOW }, { "compat_pushwindow", MITYPE_COMPATFLAG, 0, COMPATF2_PUSHWINDOW },
{ "compat_clipmidtex", MITYPE_COMPATFLAG, 0, COMPATF2_CLIPMIDTEX },
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 },

View file

@ -2176,8 +2176,7 @@ void P_LoadLineDefs (MapData * map)
P_AdjustLine (ld); P_AdjustLine (ld);
P_SaveLineSpecial (ld); P_SaveLineSpecial (ld);
if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
ld->flags |= ML_CLIP_MIDTEX;
if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;
} }
@ -2263,8 +2262,7 @@ void P_LoadLineDefs2 (MapData * map)
P_AdjustLine (ld); P_AdjustLine (ld);
P_SetLineID(i, ld); P_SetLineID(i, ld);
P_SaveLineSpecial (ld); P_SaveLineSpecial (ld);
if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
ld->flags |= ML_CLIP_MIDTEX;
if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;

View file

@ -838,8 +838,7 @@ public:
ld->portalindex = UINT_MAX; ld->portalindex = UINT_MAX;
ld->portaltransferred = UINT_MAX; ld->portaltransferred = UINT_MAX;
ld->sidedef[0] = ld->sidedef[1] = NULL; ld->sidedef[0] = ld->sidedef[1] = NULL;
if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
ld->flags |= ML_CLIP_MIDTEX;
if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;

View file

@ -607,7 +607,7 @@ namespace swrenderer
if (mFrontSector->e && mFrontSector->e->XFloor.lightlist.Size()) return true; if (mFrontSector->e && mFrontSector->e->XFloor.lightlist.Size()) return true;
if (mBackSector->e && mBackSector->e->XFloor.lightlist.Size()) return true; if (mBackSector->e && mBackSector->e->XFloor.lightlist.Size()) return true;
if (sidedef->GetTexture(side_t::mid).isValid() && ((linedef->flags & (ML_CLIP_MIDTEX | ML_WRAP_MIDTEX)) || sidedef->Flags & (WALLF_CLIP_MIDTEX | WALLF_WRAP_MIDTEX))) return true; if (sidedef->GetTexture(side_t::mid).isValid() && ((ib_compatflags & BCOMPATF_CLIPMIDTEX) || (linedef->flags & (ML_CLIP_MIDTEX | ML_WRAP_MIDTEX)) || sidedef->Flags & (WALLF_CLIP_MIDTEX | WALLF_WRAP_MIDTEX))) return true;
return false; return false;
} }
@ -669,6 +669,7 @@ namespace swrenderer
if (sidedef->GetTexture(side_t::mid).isValid()) if (sidedef->GetTexture(side_t::mid).isValid())
{ {
if (ib_compatflags & BCOMPATF_CLIPMIDTEX) return true;
if (linedef->flags & (ML_CLIP_MIDTEX | ML_WRAP_MIDTEX)) return true; if (linedef->flags & (ML_CLIP_MIDTEX | ML_WRAP_MIDTEX)) return true;
if (sidedef->Flags & (WALLF_CLIP_MIDTEX | WALLF_WRAP_MIDTEX)) return true; if (sidedef->Flags & (WALLF_CLIP_MIDTEX | WALLF_WRAP_MIDTEX)) return true;
} }

View file

@ -277,7 +277,8 @@ namespace swrenderer
// or above the ceiling, so the appropriate end won't be clipped automatically when adding // or above the ceiling, so the appropriate end won't be clipped automatically when adding
// this drawseg. // this drawseg.
if ((curline->linedef->flags & ML_CLIP_MIDTEX) || if ((curline->linedef->flags & ML_CLIP_MIDTEX) ||
(curline->sidedef->Flags & WALLF_CLIP_MIDTEX)) (curline->sidedef->Flags & WALLF_CLIP_MIDTEX) ||
(ib_compatflags & BCOMPATF_CLIPMIDTEX))
{ {
ClipMidtex(x1, x2); ClipMidtex(x1, x2);
} }
@ -335,7 +336,8 @@ namespace swrenderer
// or above the ceiling, so the appropriate end won't be clipped automatically when adding // or above the ceiling, so the appropriate end won't be clipped automatically when adding
// this drawseg. // this drawseg.
if ((curline->linedef->flags & ML_CLIP_MIDTEX) || if ((curline->linedef->flags & ML_CLIP_MIDTEX) ||
(curline->sidedef->Flags & WALLF_CLIP_MIDTEX)) (curline->sidedef->Flags & WALLF_CLIP_MIDTEX) ||
(ib_compatflags & BCOMPATF_CLIPMIDTEX))
{ {
ClipMidtex(x1, x2); ClipMidtex(x1, x2);
} }