rename TAG_ITER_C to TAG_ITER_DECLARECOUNTER and remove the semicolon from the macro.

This commit is contained in:
Nev3r 2020-11-10 12:22:55 +01:00
parent 1d542d3676
commit 95a61a226b
8 changed files with 30 additions and 30 deletions

View File

@ -395,7 +395,7 @@ INT32 EV_DoCeiling(line_t *line, ceiling_e type)
sector_t *sec;
ceiling_t *ceiling;
mtag_t tag = Tag_FGet(&line->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(tag, secnum)
{
@ -617,7 +617,7 @@ INT32 EV_DoCrush(line_t *line, ceiling_e type)
sector_t *sec;
ceiling_t *ceiling;
mtag_t tag = Tag_FGet(&line->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(tag, secnum)
{

View File

@ -635,7 +635,7 @@ void T_BounceCheese(bouncecheese_t *bouncer)
boolean remove;
INT32 i;
mtag_t tag = Tag_FGet(&bouncer->sourceline->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
if (bouncer->sector->crumblestate == CRUMBLE_RESTORE || bouncer->sector->crumblestate == CRUMBLE_WAIT
|| bouncer->sector->crumblestate == CRUMBLE_ACTIVATED) // Oops! Crumbler says to remove yourself!
@ -775,7 +775,7 @@ void T_StartCrumble(crumble_t *crumble)
sector_t *sector;
INT32 i;
mtag_t tag = Tag_FGet(&crumble->sourceline->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
// Once done, the no-return thinker just sits there,
// constantly 'returning'... kind of an oxymoron, isn't it?
@ -948,7 +948,7 @@ void T_StartCrumble(crumble_t *crumble)
void T_MarioBlock(mariothink_t *block)
{
INT32 i;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
T_MovePlane
(
@ -1295,7 +1295,7 @@ void T_NoEnemiesSector(noenemies_t *nobaddies)
INT32 secnum = -1;
boolean FOFsector = false;
mtag_t tag = Tag_FGet(&nobaddies->sourceline->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(tag, secnum)
{
@ -1308,7 +1308,7 @@ void T_NoEnemiesSector(noenemies_t *nobaddies)
{
INT32 targetsecnum = -1;
mtag_t tag2 = Tag_FGet(&sec->lines[i]->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
if (sec->lines[i]->special < 100 || sec->lines[i]->special >= 300)
continue;
@ -1402,7 +1402,7 @@ void T_EachTimeThinker(eachtime_t *eachtime)
fixed_t bottomheight, topheight;
ffloor_t *rover;
mtag_t tag = Tag_FGet(&eachtime->sourceline->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
for (i = 0; i < MAXPLAYERS; i++)
{
@ -1430,7 +1430,7 @@ void T_EachTimeThinker(eachtime_t *eachtime)
{
INT32 targetsecnum = -1;
mtag_t tag2 = Tag_FGet(&sec->lines[i]->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
if (sec->lines[i]->special < 100 || sec->lines[i]->special >= 300)
continue;
@ -1572,7 +1572,7 @@ void T_RaiseSector(raise_t *raise)
INT32 direction;
result_e res = 0;
mtag_t tag = raise->tag;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
if (raise->sector->crumblestate >= CRUMBLE_FALL || raise->sector->ceilingdata)
return;
@ -1822,7 +1822,7 @@ void EV_DoFloor(line_t *line, floor_e floortype)
sector_t *sec;
floormove_t *dofloor;
mtag_t tag = Tag_FGet(&line->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(tag, secnum)
{
@ -2039,7 +2039,7 @@ void EV_DoElevator(line_t *line, elevator_e elevtype, boolean customspeed)
sector_t *sec;
elevator_t *elevator;
mtag_t tag = Tag_FGet(&line->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
// act on all sectors with the same tag as the triggering linedef
TAG_ITER_SECTORS(tag, secnum)
@ -2339,7 +2339,7 @@ INT32 EV_StartCrumble(sector_t *sec, ffloor_t *rover, boolean floating,
sector_t *foundsec;
INT32 i;
mtag_t tag = Tag_FGet(&rover->master->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
// If floor is already activated, skip it
if (sec->floordata)

View File

@ -374,7 +374,7 @@ void P_FadeLightBySector(sector_t *sector, INT32 destvalue, INT32 speed, boolean
void P_FadeLight(INT16 tag, INT32 destvalue, INT32 speed, boolean ticbased, boolean force)
{
INT32 i;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
// search all sectors for ones with tag
TAG_ITER_SECTORS(tag, i)

View File

@ -4631,7 +4631,7 @@ static boolean P_Boss4MoveCage(mobj_t *mobj, fixed_t delta)
INT32 snum;
sector_t *sector;
boolean gotcage = false;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(tag, snum)
{
@ -4717,7 +4717,7 @@ static void P_Boss4DestroyCage(mobj_t *mobj)
size_t a;
sector_t *sector, *rsec;
ffloor_t *rover;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(tag, snum)
{

View File

@ -2971,7 +2971,7 @@ static void P_ConvertBinaryMap(void)
INT32 check = -1;
INT32 paramline = -1;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_LINES(tag, check)
{
@ -3188,7 +3188,7 @@ static void P_ConvertBinaryMap(void)
INT32 firstline = -1;
mtag_t tag = mapthings[i].angle;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
Tag_FSet(&mapthings[i].tags, tag);

View File

@ -546,7 +546,7 @@ static boolean P_SetSlopeFromTag(sector_t *sec, INT32 tag, boolean ceiling)
{
INT32 i;
pslope_t **secslope = ceiling ? &sec->c_slope : &sec->f_slope;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
if (!tag || *secslope)
return false;

View File

@ -2223,7 +2223,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
INT32 secnum = -1;
mobj_t *bot = NULL;
mtag_t tag = Tag_FGet(&line->tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
I_Assert(!mo || !P_MobjWasRemoved(mo)); // If mo is there, mo must be valid!
@ -3887,7 +3887,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
case 465: // Set linedef executor delay
{
INT32 linenum;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
if (!udmf)
break;
@ -5922,7 +5922,7 @@ void T_LaserFlash(laserthink_t *flash)
sector_t *sector;
sector_t *sourcesec = flash->sourceline->frontsector;
fixed_t top, bottom;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(flash->tag, s)
{
@ -6204,7 +6204,7 @@ void P_SpawnSpecials(boolean fromnetsave)
INT32 s;
size_t sec;
ffloortype_e ffloorflags;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
case 1: // Definable gravity per sector
sec = sides[*lines[i].sidenum].sector - sectors;
@ -7098,7 +7098,7 @@ void P_SpawnSpecials(boolean fromnetsave)
*/
static void P_AddFakeFloorsByLine(size_t line, ffloortype_e ffloorflags, thinkerlist_t *secthinkers)
{
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
INT32 s;
mtag_t tag = Tag_FGet(&lines[line].tags);
size_t sec = sides[*lines[line].sidenum].sector-sectors;
@ -7214,7 +7214,7 @@ void T_Scroll(scroll_t *s)
size_t i;
INT32 sect;
ffloor_t *rover;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
case sc_side: // scroll wall texture
side = sides + s->affectee;
@ -7466,7 +7466,7 @@ static void P_SpawnScrollers(void)
switch (special)
{
register INT32 s;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
case 513: // scroll effect ceiling
case 533: // scroll and carry objects on ceiling
@ -7604,7 +7604,7 @@ void T_Disappear(disappear_t *d)
ffloor_t *rover;
register INT32 s;
mtag_t afftag = Tag_FGet(&lines[d->affectee].tags);
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
TAG_ITER_SECTORS(afftag, s)
{
@ -8337,7 +8337,7 @@ static void P_SpawnFriction(void)
fixed_t strength; // frontside texture offset controls magnitude
fixed_t friction; // friction value to be applied during movement
INT32 movefactor; // applied to each player move to simulate inertia
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
for (i = 0; i < numlines; i++, l++)
if (l->special == 540)
@ -8882,7 +8882,7 @@ static void P_SpawnPushers(void)
mtag_t tag;
register INT32 s;
mobj_t *thing;
TAG_ITER_C
TAG_ITER_DECLARECOUNTER;
for (i = 0; i < numlines; i++, l++)
{

View File

@ -61,7 +61,7 @@ INT32 Tag_FindLineSpecial(const INT16 special, const mtag_t tag);
INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start);
// Use this macro to declare the iterator position variable.
#define TAG_ITER_C size_t tag_iterator_pos;
#define TAG_ITER_DECLARECOUNTER size_t tag_iterator_pos
#define TAG_ITER(fn, tag, id) for(tag_iterator_pos = 0; (id = fn(tag, tag_iterator_pos)) >= 0; tag_iterator_pos++)