James R
e5a3e6a845
Fix removing a tag unsetting the bit array even if more elements with that tag exist
2020-12-05 01:14:52 -08:00
James R
621efbfa15
Lua taglib for accessing taggroups
...
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)
For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
2020-12-04 00:30:08 -08:00
Nev3r
3a8b2a6fb7
Better documentation.
2020-11-14 20:50:34 +01:00
Nev3r
cc98be4d23
Add documentation for the iterator macros.
2020-11-14 20:25:00 +01:00
Nev3r
2c8a99f25a
Add a level parameter to the iterators to account for nesting, and thus avoid variable shadowing.
2020-11-12 13:48:14 +01:00
Nev3r
a8f554075f
Extern the global tag groups properly.
2020-11-12 12:25:02 +01:00
Nev3r
a405f17d0b
Missing prototype.
2020-11-10 13:09:30 +01:00
Nev3r
95a61a226b
rename TAG_ITER_C to TAG_ITER_DECLARECOUNTER and remove the semicolon from the macro.
2020-11-10 12:22:55 +01:00
Nev3r
1d542d3676
Add copyright notices.
2020-11-10 12:12:16 +01:00
Nev3r
77e438d4bd
Some commenting tweaks.
2020-08-16 11:33:00 +02:00
Nev3r
c914ac99b4
Bring back P_FindSpecialLineFromTag() for backwards compatibility reasons; emulate the old taglist behavior for this function.
2020-07-29 17:26:43 +02:00
Nev3r
b7c4ed9c6b
Implement dynamic global taggroups/lists functionality.
2020-04-18 11:35:56 +02:00
Nev3r
e3dfdb448e
Add currently unused auxiliary function.
2020-04-17 18:14:15 +02:00
Nev3r
b690d35a99
Move the global taglist init functionality to the taglist files.
2020-04-17 12:52:44 +02:00
Nev3r
944716c45a
Add auxiliary functions to the taglist library.
2020-04-17 09:57:45 +02:00
Nev3r
c0b4090924
Clean up type inconsistency on tags.
2020-04-16 18:48:57 +02:00
Nev3r
2d9b0e4906
Fix the args in Tag_FindLineSpecial() being swapped.
2020-04-15 09:32:19 +02:00
Nev3r
439fde3434
Replace most P_FindSpecialLineFromTag() cases with Tag_FindLineSpecial(), which settle with the first found result.
2020-04-14 23:59:22 +02:00
Nev3r
5df60f8e15
Make use of functions for the tag lists iterations instead of bloated macros.
2020-04-14 21:46:02 +02:00
Nev3r
8495b59890
Added hilarious -1 tag support for the iteration macros.
2020-04-14 18:53:05 +02:00
Nev3r
e820b9e369
Fixed a typo worthy of divine punishment.
2020-04-13 19:45:41 +02:00
Nev3r
de07c04f5c
Make the macros and their usage relatively cleaner.
2020-04-13 13:09:58 +02:00
Nev3r
cb2571b12c
Rename the macros, reshape them slightly to avoid mixed declarations, and add a finalizer.
2020-04-12 18:42:42 +02:00
Nev3r
f7f9b68bb9
Introduce tagged element iteration macros.
2020-04-12 17:50:48 +02:00
Nev3r
07b4d0ee3d
Add lookup tag tables construction.
2020-04-12 15:16:04 +02:00
Nev3r
bfd48c4c83
add Tag_Compare()
2020-04-12 13:05:21 +02:00
Nev3r
a7e99ab5cf
Added static multitag read and storage on mapload.
2020-04-12 11:56:36 +02:00