Skip to content
Snippets Groups Projects
Commit cb2571b1 authored by Nev3r's avatar Nev3r
Browse files

Rename the macros, reshape them slightly to avoid mixed declarations, and add a finalizer.

parent f7f9b68b
No related branches found
No related tags found
1 merge request!1097UDMF: Multitag support
...@@ -29,23 +29,25 @@ void Taglist_AddToLines (const size_t tag, const size_t itemid); ...@@ -29,23 +29,25 @@ void Taglist_AddToLines (const size_t tag, const size_t itemid);
void Taglist_AddToMapthings (const size_t tag, const size_t itemid); void Taglist_AddToMapthings (const size_t tag, const size_t itemid);
#endif //__R_TAGLIST__ #endif //__R_TAGLIST__
#define Tag_IterateSectors(tag, sc)\ #define TAG_ITER_SECTORS(tag, sc)\
size_t kk;\
if(tags_sectors[tag])\ if(tags_sectors[tag])\
{ size_t kk;\
for(kk = 0, sc = tags_sectors[tag]->elements[0];\ for(kk = 0, sc = tags_sectors[tag]->elements[0];\
kk < tags_sectors[tag]->count;\ kk < tags_sectors[tag]->count;\
sc = tags_sectors[tag]->elements[++kk]) sc = tags_sectors[tag]->elements[++kk])
#define Tag_IterateLines(tag, li)\ #define TAG_ITER_LINES(tag, li)\
size_t kk;\
if(tags_lines[tag])\ if(tags_lines[tag])\
{ size_t kk;\
for(kk = 0, li = tags_lines[tag]->elements[0];\ for(kk = 0, li = tags_lines[tag]->elements[0];\
kk < tags_lines[tag]->count;\ kk < tags_lines[tag]->count;\
li = tags_lines[tag]->elements[++kk]) li = tags_lines[tag]->elements[++kk])
#define Tag_IterateMapthings(tag, mt)\ #define TAG_ITER_THINGS(tag, mt)\
size_t kk;\
if(tags_mapthings[tag])\ if(tags_mapthings[tag])\
{ size_t kk;\
for(kk = 0, mt = tags_mapthings[tag]->elements[0];\ for(kk = 0, mt = tags_mapthings[tag]->elements[0];\
kk < tags_mapthings[tag]->count;\ kk < tags_mapthings[tag]->count;\
mt = tags_mapthings[tag]->elements[++kk]) mt = tags_mapthings[tag]->elements[++kk])
#define TAG_ITER_END }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment