From fcb69b9c2f10e9d0c3af6208a00381f36a122c4d Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Wed, 5 Jan 2022 19:43:40 +0100 Subject: [PATCH] Rename more linedef flags --- src/hardware/hw_main.c | 28 ++++++++++++++-------------- src/p_ceilng.c | 2 +- src/p_spec.c | 6 +++--- src/r_segs.c | 20 ++++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index dece1deda..bafe8ce7a 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1146,7 +1146,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom // PEGGING if (gl_linedef->flags & ML_DONTPEGTOP) texturevpegtop = 0; - else if (gl_linedef->flags & ML_EFFECT1) + else if (gl_linedef->flags & ML_SKEWTD) texturevpegtop = worldhigh + textureheight[gl_sidedef->toptexture] - worldtop; else texturevpegtop = gl_backsector->ceilingheight + textureheight[gl_sidedef->toptexture] - gl_frontsector->ceilingheight; @@ -1162,7 +1162,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX; // Adjust t value for sloped walls - if (!(gl_linedef->flags & ML_EFFECT1)) + if (!(gl_linedef->flags & ML_SKEWTD)) { // Unskewed wallVerts[3].t -= (worldtop - gl_frontsector->ceilingheight) * grTex->scaleY; @@ -1212,7 +1212,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom // PEGGING if (!(gl_linedef->flags & ML_DONTPEGBOTTOM)) texturevpegbottom = 0; - else if (gl_linedef->flags & ML_EFFECT1) + else if (gl_linedef->flags & ML_SKEWTD) texturevpegbottom = worldbottom - worldlow; else texturevpegbottom = gl_frontsector->floorheight - gl_backsector->floorheight; @@ -1228,7 +1228,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX; // Adjust t value for sloped walls - if (!(gl_linedef->flags & ML_EFFECT1)) + if (!(gl_linedef->flags & ML_SKEWTD)) { // Unskewed wallVerts[0].t -= (worldbottom - gl_frontsector->floorheight) * grTex->scaleY; @@ -1286,7 +1286,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if (gl_sidedef->repeatcnt) repeats = 1 + gl_sidedef->repeatcnt; - else if (gl_linedef->flags & ML_EFFECT5) + else if (gl_linedef->flags & ML_WRAPMIDTEX) { fixed_t high, low; @@ -1328,9 +1328,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom popenbottom = max(worldbottom, worldlow); } - if (gl_linedef->flags & ML_EFFECT2) + if (gl_linedef->flags & ML_NOSKEW) { - if (gl_linedef->flags & ML_EFFECT3) + if (gl_linedef->flags & ML_MIDPEG) { polybottom = max(front->floorheight, back->floorheight) + gl_sidedef->rowoffset; polytop = polybottom + textureheight[gl_midtexture]*repeats; @@ -1341,7 +1341,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom polybottom = polytop - textureheight[gl_midtexture]*repeats; } } - else if (gl_linedef->flags & ML_EFFECT3) + else if (gl_linedef->flags & ML_MIDPEG) { polybottom = popenbottom + gl_sidedef->rowoffset; polytop = polybottom + textureheight[gl_midtexture]*repeats; @@ -1371,7 +1371,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { // PEGGING - if (gl_linedef->flags & ML_EFFECT3) + if (gl_linedef->flags & ML_MIDPEG) texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom; else texturevpeg = polytop - h; @@ -1394,9 +1394,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { fixed_t midtextureslant; - if (gl_linedef->flags & ML_EFFECT2) + if (gl_linedef->flags & ML_NOSKEW) midtextureslant = 0; - else if (gl_linedef->flags & ML_EFFECT3) + else if (gl_linedef->flags & ML_MIDPEG) midtextureslant = worldlow < worldbottom ? worldbottomslope-worldbottom : worldlowslope-worldlow; @@ -1421,7 +1421,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { // PEGGING - if (gl_linedef->flags & ML_EFFECT3) + if (gl_linedef->flags & ML_MIDPEG) texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom; else texturevpeg = polytop - h; @@ -1538,7 +1538,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { fixed_t texturevpeg; // PEGGING - if ((gl_linedef->flags & (ML_DONTPEGBOTTOM|ML_EFFECT2)) == (ML_DONTPEGBOTTOM|ML_EFFECT2)) + if ((gl_linedef->flags & (ML_DONTPEGBOTTOM|ML_NOSKEW)) == (ML_DONTPEGBOTTOM|ML_NOSKEW)) texturevpeg = gl_frontsector->floorheight + textureheight[gl_sidedef->midtexture] - gl_frontsector->ceilingheight + gl_sidedef->rowoffset; else if (gl_linedef->flags & ML_DONTPEGBOTTOM) texturevpeg = worldbottom + textureheight[gl_sidedef->midtexture] - worldtop + gl_sidedef->rowoffset; @@ -1554,7 +1554,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX; // Texture correction for slopes - if (gl_linedef->flags & ML_EFFECT2) { + if (gl_linedef->flags & ML_NOSKEW) { wallVerts[3].t += (gl_frontsector->ceilingheight - worldtop) * grTex->scaleY; wallVerts[2].t += (gl_frontsector->ceilingheight - worldtopslope) * grTex->scaleY; wallVerts[0].t += (gl_frontsector->floorheight - worldbottom) * grTex->scaleY; diff --git a/src/p_ceilng.c b/src/p_ceilng.c index ed385be33..11d08724f 100644 --- a/src/p_ceilng.c +++ b/src/p_ceilng.c @@ -375,7 +375,7 @@ INT32 EV_DoCrush(mtag_t tag, line_t *line, ceiling_e type) ceiling->topheight = P_FindHighestCeilingSurrounding(sec); ceiling->direction = 1; // Retain stupid behavior for backwards compatibility - if (!udmf && !(line->flags & ML_EFFECT4)) + if (!udmf && !(line->flags & ML_MIDSOLID)) ceiling->speed /= 2; else ceiling->speed = line->args[3] << (FRACBITS - 2); diff --git a/src/p_spec.c b/src/p_spec.c index 9358d6766..53c7f9cc8 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1647,7 +1647,7 @@ static boolean P_ActivateLinedefExecutorsInSector(line_t *triggerline, mobj_t *a size_t linecnt = ctlsector->linecount; size_t i; - if (triggerline->flags & ML_EFFECT5) // disregard order for efficiency + if (triggerline->flags & ML_WRAPMIDTEX) // disregard order for efficiency { for (i = 0; i < linecnt; i++) P_ActivateLinedefExecutor(ctlsector->lines[i], actor, caller); @@ -6812,9 +6812,9 @@ void P_SpawnSpecials(boolean fromnetsave) if (lines[i].args[4] & TMFB_ONLYBOTTOM) fflr->bustflags |= FB_ONLYBOTTOM; - if (lines[i].flags & ML_EFFECT4) + if (lines[i].flags & ML_MIDSOLID) fflr->bustflags |= FB_PUSHABLES; - if (lines[i].flags & ML_EFFECT5) + if (lines[i].flags & ML_WRAPMIDTEX) { fflr->bustflags |= FB_EXECUTOR; fflr->busttag = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS; diff --git a/src/r_segs.c b/src/r_segs.c index 28968563e..f1a0d9596 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -301,7 +301,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) if (ds->curline->sidedef->repeatcnt) repeats = 1 + ds->curline->sidedef->repeatcnt; - else if (ldef->flags & ML_EFFECT5) + else if (ldef->flags & ML_WRAPMIDTEX) { fixed_t high, low; @@ -345,7 +345,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) { dc_texturemid = ds->maskedtextureheight[dc_x]; - if (curline->linedef->flags & ML_EFFECT3) + if (curline->linedef->flags & ML_MIDPEG) dc_texturemid += (textureheight[texnum])*times + textureheight[texnum]; else dc_texturemid -= (textureheight[texnum])*times; @@ -1455,7 +1455,7 @@ static void R_RenderSegLoop (void) maskedtexturecol[rw_x] = (INT16)texturecolumn; if (maskedtextureheight != NULL) { - maskedtextureheight[rw_x] = (curline->linedef->flags & ML_EFFECT3) ? + maskedtextureheight[rw_x] = (curline->linedef->flags & ML_MIDPEG) ? max(rw_midtexturemid, rw_midtextureback) : min(rw_midtexturemid, rw_midtextureback); } @@ -1766,7 +1766,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) texheight = textureheight[midtexture]; // a single sided line is terminal, so it must mark ends markfloor = markceiling = true; - if (linedef->flags & ML_EFFECT2) { + if (linedef->flags & ML_NOSKEW) { if (linedef->flags & ML_DONTPEGBOTTOM) rw_midtexturemid = frontsector->floorheight + texheight - viewz; else @@ -1991,7 +1991,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) toptexture = R_GetTextureNum(sidedef->toptexture); texheight = textureheight[toptexture]; } - if (!(linedef->flags & ML_EFFECT1)) { // Ignore slopes for lower/upper textures unless flag is checked + if (!(linedef->flags & ML_SKEWTD)) { // Ignore slopes for lower/upper textures unless flag is checked if (linedef->flags & ML_DONTPEGTOP) rw_toptexturemid = frontsector->ceilingheight - viewz; else @@ -2016,7 +2016,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) // bottom texture bottomtexture = R_GetTextureNum(sidedef->bottomtexture); - if (!(linedef->flags & ML_EFFECT1)) { // Ignore slopes for lower/upper textures unless flag is checked + if (!(linedef->flags & ML_SKEWTD)) { // Ignore slopes for lower/upper textures unless flag is checked if (linedef->flags & ML_DONTPEGBOTTOM) rw_bottomtexturemid = frontsector->floorheight - viewz; else @@ -2247,7 +2247,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) if (curline->polyseg) { // use REAL front and back floors please, so midtexture rendering isn't mucked up rw_midtextureslide = rw_midtexturebackslide = 0; - if (linedef->flags & ML_EFFECT3) + if (linedef->flags & ML_MIDPEG) rw_midtexturemid = rw_midtextureback = max(curline->frontsector->floorheight, curline->backsector->floorheight) - viewz; else rw_midtexturemid = rw_midtextureback = min(curline->frontsector->ceilingheight, curline->backsector->ceilingheight) - viewz; @@ -2255,16 +2255,16 @@ void R_StoreWallRange(INT32 start, INT32 stop) else { // Set midtexture starting height - if (linedef->flags & ML_EFFECT2) + if (linedef->flags & ML_NOSKEW) { // Ignore slopes when texturing rw_midtextureslide = rw_midtexturebackslide = 0; - if (linedef->flags & ML_EFFECT3) + if (linedef->flags & ML_MIDPEG) rw_midtexturemid = rw_midtextureback = max(frontsector->floorheight, backsector->floorheight) - viewz; else rw_midtexturemid = rw_midtextureback = min(frontsector->ceilingheight, backsector->ceilingheight) - viewz; } - else if (linedef->flags & ML_EFFECT3) + else if (linedef->flags & ML_MIDPEG) { rw_midtexturemid = worldbottom; rw_midtextureslide = floorfrontslide;