Skip to content

Commit

Permalink
Migrate to FIND_LINES
Browse files Browse the repository at this point in the history
  • Loading branch information
kraflab committed Jul 17, 2024
1 parent 1d65e27 commit f258310
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion prboom2/src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ void P_PostProcessZDoomLineSpecial(line_t *ld)
}
else
{
for (id_p = dsda_FindLinesFromID(ld->special_args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, ld->special_args[0])
{
lines[*id_p].tranmap = dsda_TranMap(dsda_FloatToPercent(alpha));
lines[*id_p].alpha = alpha;
Expand Down
18 changes: 9 additions & 9 deletions prboom2/src/p_spec.c
Original file line number Diff line number Diff line change
Expand Up @@ -3757,7 +3757,7 @@ void P_SpawnCompatibleScroller(line_t *l, int i)
// killough 3/1/98: scroll wall according to linedef
// (same direction and speed as scrolling floors)
case 254:
for (id_p = dsda_FindLinesFromID(l->tag); *id_p >= 0; id_p++)
FIND_LINES(id_p, l->tag)
if (*id_p != i)
Add_WallScroller(dx, dy, lines + *id_p, control, accel);
break;
Expand All @@ -3782,7 +3782,7 @@ void P_SpawnCompatibleScroller(line_t *l, int i)
side = lines[i].sidenum[0];
dx = -sides[side].textureoffset / 8;
dy = sides[side].rowoffset / 8;
for (id_p = dsda_FindLinesFromID(l->tag); *id_p >= 0; id_p++)
FIND_LINES(id_p, l->tag)
if (*id_p != i)
dsda_AddControlSideScroller(dx, dy, control, lines[*id_p].sidenum[0], accel, 0);

Expand Down Expand Up @@ -3932,7 +3932,7 @@ void P_SpawnZDoomScroller(line_t *l, int i)
case zl_scroll_texture_model:
// killough 3/1/98: scroll wall according to linedef
// (same direction and speed as scrolling floors)
for (id_p = dsda_FindLinesFromID(l->special_args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, l->special_args[0])
if (*id_p != i)
Add_WallScroller(dx, dy, lines + *id_p, control, accel);

Expand Down Expand Up @@ -6482,7 +6482,7 @@ dboolean P_ExecuteZDoomLineSpecial(int special, int * args, line_t * line, int s
if (args[2] & 1) clearflags |= flags[i];
}

for (id_p = dsda_FindLinesFromID(args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, args[0])
{
lines[*id_p].flags = (lines[*id_p].flags & ~clearflags) | setflags;
}
Expand Down Expand Up @@ -6550,7 +6550,7 @@ dboolean P_ExecuteZDoomLineSpecial(int special, int * args, line_t * line, int s
if (args[2] & 1) clearflags |= flags[i];
}

for (id_p = dsda_FindLinesFromID(args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, args[0])
{
lines[*id_p].flags = (lines[*id_p].flags & ~clearflags) | setflags;
}
Expand All @@ -6563,7 +6563,7 @@ dboolean P_ExecuteZDoomLineSpecial(int special, int * args, line_t * line, int s
{
const int *id_p;

for (id_p = dsda_FindLinesFromID(args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, args[0])
{
lines[*id_p].automap_style = args[1];
}
Expand All @@ -6577,7 +6577,7 @@ dboolean P_ExecuteZDoomLineSpecial(int special, int * args, line_t * line, int s
const int *id_p;
int side = !!args[3];

for (id_p = dsda_FindLinesFromID(args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, args[0])
{
dsda_AddSideScroller(args[1], args[2], lines[*id_p].sidenum[side], args[4]);
}
Expand All @@ -6592,7 +6592,7 @@ dboolean P_ExecuteZDoomLineSpecial(int special, int * args, line_t * line, int s
const int NO_CHANGE = 32767 << FRACBITS;
int sidenum = !!args[3];

for (id_p = dsda_FindLinesFromID(args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, args[0])
{
side_t *side = &sides[lines[*id_p].sidenum[sidenum]];

Expand Down Expand Up @@ -6666,7 +6666,7 @@ dboolean P_ExecuteZDoomLineSpecial(int special, int * args, line_t * line, int s
if (!args[2])
args[2] = FRACUNIT;

for (id_p = dsda_FindLinesFromID(args[0]); *id_p >= 0; id_p++)
FIND_LINES(id_p, args[0])
{
side_t *side = &sides[lines[*id_p].sidenum[sidenum]];

Expand Down

0 comments on commit f258310

Please sign in to comment.