Rename more linedef flags

This commit is contained in:
MascaraSnake 2022-01-05 19:43:40 +01:00
parent 2bef8da42f
commit fcb69b9c2f
4 changed files with 28 additions and 28 deletions

View file

@ -1146,7 +1146,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
// PEGGING // PEGGING
if (gl_linedef->flags & ML_DONTPEGTOP) if (gl_linedef->flags & ML_DONTPEGTOP)
texturevpegtop = 0; texturevpegtop = 0;
else if (gl_linedef->flags & ML_EFFECT1) else if (gl_linedef->flags & ML_SKEWTD)
texturevpegtop = worldhigh + textureheight[gl_sidedef->toptexture] - worldtop; texturevpegtop = worldhigh + textureheight[gl_sidedef->toptexture] - worldtop;
else else
texturevpegtop = gl_backsector->ceilingheight + textureheight[gl_sidedef->toptexture] - gl_frontsector->ceilingheight; 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; wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX;
// Adjust t value for sloped walls // Adjust t value for sloped walls
if (!(gl_linedef->flags & ML_EFFECT1)) if (!(gl_linedef->flags & ML_SKEWTD))
{ {
// Unskewed // Unskewed
wallVerts[3].t -= (worldtop - gl_frontsector->ceilingheight) * grTex->scaleY; 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 // PEGGING
if (!(gl_linedef->flags & ML_DONTPEGBOTTOM)) if (!(gl_linedef->flags & ML_DONTPEGBOTTOM))
texturevpegbottom = 0; texturevpegbottom = 0;
else if (gl_linedef->flags & ML_EFFECT1) else if (gl_linedef->flags & ML_SKEWTD)
texturevpegbottom = worldbottom - worldlow; texturevpegbottom = worldbottom - worldlow;
else else
texturevpegbottom = gl_frontsector->floorheight - gl_backsector->floorheight; 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; wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX;
// Adjust t value for sloped walls // Adjust t value for sloped walls
if (!(gl_linedef->flags & ML_EFFECT1)) if (!(gl_linedef->flags & ML_SKEWTD))
{ {
// Unskewed // Unskewed
wallVerts[0].t -= (worldbottom - gl_frontsector->floorheight) * grTex->scaleY; 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) if (gl_sidedef->repeatcnt)
repeats = 1 + 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; fixed_t high, low;
@ -1328,9 +1328,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
popenbottom = max(worldbottom, worldlow); 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; polybottom = max(front->floorheight, back->floorheight) + gl_sidedef->rowoffset;
polytop = polybottom + textureheight[gl_midtexture]*repeats; 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; 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; polybottom = popenbottom + gl_sidedef->rowoffset;
polytop = polybottom + textureheight[gl_midtexture]*repeats; polytop = polybottom + textureheight[gl_midtexture]*repeats;
@ -1371,7 +1371,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{ {
// PEGGING // PEGGING
if (gl_linedef->flags & ML_EFFECT3) if (gl_linedef->flags & ML_MIDPEG)
texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom; texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom;
else else
texturevpeg = polytop - h; texturevpeg = polytop - h;
@ -1394,9 +1394,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{ {
fixed_t midtextureslant; fixed_t midtextureslant;
if (gl_linedef->flags & ML_EFFECT2) if (gl_linedef->flags & ML_NOSKEW)
midtextureslant = 0; midtextureslant = 0;
else if (gl_linedef->flags & ML_EFFECT3) else if (gl_linedef->flags & ML_MIDPEG)
midtextureslant = worldlow < worldbottom midtextureslant = worldlow < worldbottom
? worldbottomslope-worldbottom ? worldbottomslope-worldbottom
: worldlowslope-worldlow; : worldlowslope-worldlow;
@ -1421,7 +1421,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{ {
// PEGGING // PEGGING
if (gl_linedef->flags & ML_EFFECT3) if (gl_linedef->flags & ML_MIDPEG)
texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom; texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom;
else else
texturevpeg = polytop - h; texturevpeg = polytop - h;
@ -1538,7 +1538,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{ {
fixed_t texturevpeg; fixed_t texturevpeg;
// PEGGING // 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; texturevpeg = gl_frontsector->floorheight + textureheight[gl_sidedef->midtexture] - gl_frontsector->ceilingheight + gl_sidedef->rowoffset;
else if (gl_linedef->flags & ML_DONTPEGBOTTOM) else if (gl_linedef->flags & ML_DONTPEGBOTTOM)
texturevpeg = worldbottom + textureheight[gl_sidedef->midtexture] - worldtop + gl_sidedef->rowoffset; 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; wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX;
// Texture correction for slopes // 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[3].t += (gl_frontsector->ceilingheight - worldtop) * grTex->scaleY;
wallVerts[2].t += (gl_frontsector->ceilingheight - worldtopslope) * grTex->scaleY; wallVerts[2].t += (gl_frontsector->ceilingheight - worldtopslope) * grTex->scaleY;
wallVerts[0].t += (gl_frontsector->floorheight - worldbottom) * grTex->scaleY; wallVerts[0].t += (gl_frontsector->floorheight - worldbottom) * grTex->scaleY;

View file

@ -375,7 +375,7 @@ INT32 EV_DoCrush(mtag_t tag, line_t *line, ceiling_e type)
ceiling->topheight = P_FindHighestCeilingSurrounding(sec); ceiling->topheight = P_FindHighestCeilingSurrounding(sec);
ceiling->direction = 1; ceiling->direction = 1;
// Retain stupid behavior for backwards compatibility // Retain stupid behavior for backwards compatibility
if (!udmf && !(line->flags & ML_EFFECT4)) if (!udmf && !(line->flags & ML_MIDSOLID))
ceiling->speed /= 2; ceiling->speed /= 2;
else else
ceiling->speed = line->args[3] << (FRACBITS - 2); ceiling->speed = line->args[3] << (FRACBITS - 2);

View file

@ -1647,7 +1647,7 @@ static boolean P_ActivateLinedefExecutorsInSector(line_t *triggerline, mobj_t *a
size_t linecnt = ctlsector->linecount; size_t linecnt = ctlsector->linecount;
size_t i; 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++) for (i = 0; i < linecnt; i++)
P_ActivateLinedefExecutor(ctlsector->lines[i], actor, caller); P_ActivateLinedefExecutor(ctlsector->lines[i], actor, caller);
@ -6812,9 +6812,9 @@ void P_SpawnSpecials(boolean fromnetsave)
if (lines[i].args[4] & TMFB_ONLYBOTTOM) if (lines[i].args[4] & TMFB_ONLYBOTTOM)
fflr->bustflags |= FB_ONLYBOTTOM; fflr->bustflags |= FB_ONLYBOTTOM;
if (lines[i].flags & ML_EFFECT4) if (lines[i].flags & ML_MIDSOLID)
fflr->bustflags |= FB_PUSHABLES; fflr->bustflags |= FB_PUSHABLES;
if (lines[i].flags & ML_EFFECT5) if (lines[i].flags & ML_WRAPMIDTEX)
{ {
fflr->bustflags |= FB_EXECUTOR; fflr->bustflags |= FB_EXECUTOR;
fflr->busttag = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS; fflr->busttag = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;

View file

@ -301,7 +301,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
if (ds->curline->sidedef->repeatcnt) if (ds->curline->sidedef->repeatcnt)
repeats = 1 + 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; fixed_t high, low;
@ -345,7 +345,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
{ {
dc_texturemid = ds->maskedtextureheight[dc_x]; 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]; dc_texturemid += (textureheight[texnum])*times + textureheight[texnum];
else else
dc_texturemid -= (textureheight[texnum])*times; dc_texturemid -= (textureheight[texnum])*times;
@ -1455,7 +1455,7 @@ static void R_RenderSegLoop (void)
maskedtexturecol[rw_x] = (INT16)texturecolumn; maskedtexturecol[rw_x] = (INT16)texturecolumn;
if (maskedtextureheight != NULL) { if (maskedtextureheight != NULL) {
maskedtextureheight[rw_x] = (curline->linedef->flags & ML_EFFECT3) ? maskedtextureheight[rw_x] = (curline->linedef->flags & ML_MIDPEG) ?
max(rw_midtexturemid, rw_midtextureback) : max(rw_midtexturemid, rw_midtextureback) :
min(rw_midtexturemid, rw_midtextureback); min(rw_midtexturemid, rw_midtextureback);
} }
@ -1766,7 +1766,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
texheight = textureheight[midtexture]; texheight = textureheight[midtexture];
// a single sided line is terminal, so it must mark ends // a single sided line is terminal, so it must mark ends
markfloor = markceiling = true; markfloor = markceiling = true;
if (linedef->flags & ML_EFFECT2) { if (linedef->flags & ML_NOSKEW) {
if (linedef->flags & ML_DONTPEGBOTTOM) if (linedef->flags & ML_DONTPEGBOTTOM)
rw_midtexturemid = frontsector->floorheight + texheight - viewz; rw_midtexturemid = frontsector->floorheight + texheight - viewz;
else else
@ -1991,7 +1991,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
toptexture = R_GetTextureNum(sidedef->toptexture); toptexture = R_GetTextureNum(sidedef->toptexture);
texheight = textureheight[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) if (linedef->flags & ML_DONTPEGTOP)
rw_toptexturemid = frontsector->ceilingheight - viewz; rw_toptexturemid = frontsector->ceilingheight - viewz;
else else
@ -2016,7 +2016,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
// bottom texture // bottom texture
bottomtexture = R_GetTextureNum(sidedef->bottomtexture); 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) if (linedef->flags & ML_DONTPEGBOTTOM)
rw_bottomtexturemid = frontsector->floorheight - viewz; rw_bottomtexturemid = frontsector->floorheight - viewz;
else else
@ -2247,7 +2247,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
if (curline->polyseg) if (curline->polyseg)
{ // use REAL front and back floors please, so midtexture rendering isn't mucked up { // use REAL front and back floors please, so midtexture rendering isn't mucked up
rw_midtextureslide = rw_midtexturebackslide = 0; 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; rw_midtexturemid = rw_midtextureback = max(curline->frontsector->floorheight, curline->backsector->floorheight) - viewz;
else else
rw_midtexturemid = rw_midtextureback = min(curline->frontsector->ceilingheight, curline->backsector->ceilingheight) - viewz; rw_midtexturemid = rw_midtextureback = min(curline->frontsector->ceilingheight, curline->backsector->ceilingheight) - viewz;
@ -2255,16 +2255,16 @@ void R_StoreWallRange(INT32 start, INT32 stop)
else else
{ {
// Set midtexture starting height // Set midtexture starting height
if (linedef->flags & ML_EFFECT2) if (linedef->flags & ML_NOSKEW)
{ // Ignore slopes when texturing { // Ignore slopes when texturing
rw_midtextureslide = rw_midtexturebackslide = 0; 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; rw_midtexturemid = rw_midtextureback = max(frontsector->floorheight, backsector->floorheight) - viewz;
else else
rw_midtexturemid = rw_midtextureback = min(frontsector->ceilingheight, backsector->ceilingheight) - viewz; 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_midtexturemid = worldbottom;
rw_midtextureslide = floorfrontslide; rw_midtextureslide = floorfrontslide;