From 10e268ebc0a50281644d047063848c099846e9d3 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 23 Feb 2017 06:32:53 -0500 Subject: [PATCH] - Change "clipmidtex" compatflag to be accessible in compatibility.txt only. --- src/compatibility.cpp | 2 +- src/d_main.cpp | 1 - src/doomdef.h | 2 +- src/g_mapinfo.cpp | 1 - src/p_setup.cpp | 6 ++---- src/p_udmf.cpp | 3 +-- src/swrenderer/line/r_line.cpp | 3 ++- src/swrenderer/line/r_renderdrawsegment.cpp | 6 ++++-- 8 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index a1fb2701a..6bc7e18cc 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -113,6 +113,7 @@ static FCompatOption Options[] = { "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT }, { "floatbob", BCOMPATF_FLOATBOB, SLOT_BCOMPAT }, { "noslopeid", BCOMPATF_NOSLOPEID, SLOT_BCOMPAT }, + { "clipmidtex", BCOMPATF_CLIPMIDTEX, SLOT_BCOMPAT }, // list copied from g_mapinfo.cpp { "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT }, @@ -151,7 +152,6 @@ static FCompatOption Options[] = { "multiexit", COMPATF2_MULTIEXIT, SLOT_COMPAT2 }, { "teleport", COMPATF2_TELEPORT, SLOT_COMPAT2 }, { "disablepushwindowcheck", COMPATF2_PUSHWINDOW, SLOT_COMPAT2 }, - { "clipmidtex", COMPATF2_CLIPMIDTEX, SLOT_COMPAT2 }, { NULL, 0, 0 } }; diff --git a/src/d_main.cpp b/src/d_main.cpp index 1ecc62fd0..a30641d60 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -641,7 +641,6 @@ CVAR (Flag, compat_pointonline, compatflags2, COMPATF2_POINTONLINE); CVAR (Flag, compat_multiexit, compatflags2, COMPATF2_MULTIEXIT); CVAR (Flag, compat_teleport, compatflags2, COMPATF2_TELEPORT); CVAR (Flag, compat_pushwindow, compatflags2, COMPATF2_PUSHWINDOW); -CVAR (Flag, compat_clipmidtex, compatflags2, COMPATF2_CLIPMIDTEX); //========================================================================== // diff --git a/src/doomdef.h b/src/doomdef.h index d8116fb02..48d8f479e 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -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_TELEPORT = 1 << 5, // Don't let indirect teleports trigger sector actions 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 @@ -360,6 +359,7 @@ enum 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_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: diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 19eb692c7..f83e18ece 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -1330,7 +1330,6 @@ MapFlagHandlers[] = { "compat_multiexit", MITYPE_COMPATFLAG, 0, COMPATF2_MULTIEXIT }, { "compat_teleport", MITYPE_COMPATFLAG, 0, COMPATF2_TELEPORT }, { "compat_pushwindow", MITYPE_COMPATFLAG, 0, COMPATF2_PUSHWINDOW }, - { "compat_clipmidtex", MITYPE_COMPATFLAG, 0, COMPATF2_CLIPMIDTEX }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 59cbfdf36..ac7faea76 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -2176,8 +2176,7 @@ void P_LoadLineDefs (MapData * map) P_AdjustLine (ld); P_SaveLineSpecial (ld); - if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) - ld->flags |= ML_CLIP_MIDTEX; + if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; } @@ -2263,8 +2262,7 @@ void P_LoadLineDefs2 (MapData * map) P_AdjustLine (ld); P_SetLineID(i, ld); P_SaveLineSpecial (ld); - if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) - ld->flags |= ML_CLIP_MIDTEX; + if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 4ae40d565..fc71160ae 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -838,8 +838,7 @@ public: ld->portalindex = UINT_MAX; ld->portaltransferred = UINT_MAX; ld->sidedef[0] = ld->sidedef[1] = NULL; - if ((level.flags2 & LEVEL2_CLIPMIDTEX) || (ii_compatflags2 & COMPATF2_CLIPMIDTEX)) - ld->flags |= ML_CLIP_MIDTEX; + if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX; if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX; if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE; diff --git a/src/swrenderer/line/r_line.cpp b/src/swrenderer/line/r_line.cpp index 544055b2c..2b2417ec2 100644 --- a/src/swrenderer/line/r_line.cpp +++ b/src/swrenderer/line/r_line.cpp @@ -607,7 +607,7 @@ namespace swrenderer if (mFrontSector->e && mFrontSector->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; } @@ -669,6 +669,7 @@ namespace swrenderer 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 (sidedef->Flags & (WALLF_CLIP_MIDTEX | WALLF_WRAP_MIDTEX)) return true; } diff --git a/src/swrenderer/line/r_renderdrawsegment.cpp b/src/swrenderer/line/r_renderdrawsegment.cpp index f4b6f97de..bb7823beb 100644 --- a/src/swrenderer/line/r_renderdrawsegment.cpp +++ b/src/swrenderer/line/r_renderdrawsegment.cpp @@ -277,7 +277,8 @@ namespace swrenderer // or above the ceiling, so the appropriate end won't be clipped automatically when adding // this drawseg. 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); } @@ -335,7 +336,8 @@ namespace swrenderer // or above the ceiling, so the appropriate end won't be clipped automatically when adding // this drawseg. 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); }