add SectorTagIterator

pull/1/head
an 2019-04-02 17:59:37 -04:00
parent fceaa55824
commit 4ad49259b2
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
# SectorTagIterator
Iterates over line indices with a specified tag.
```
class SectorTagIterator : Object
{
static SectorTagIterator Create(int tag, Line defline = null);
int Next();
int NextCompat(bool compat, int secnum);
}
```
- `Create`
Creates a new iterator over sectors with tag `tag`. TODO: I can't find where
`defline` is actually used. It is a mystery.
- `Next`
Returns the index of the current sector and advances the iterator. Returns
`-1` when the list is exhausted.
- `NextCompat`
If `compat` is `false`, acts exactly as `Next`. Otherwise, returns the
index of the current sector and advances the iterator in a manner
compatible with Doom's stair builders.
<!-- EOF -->

1
api.md
View File

@ -127,6 +127,7 @@ for [statistics drivers](https://doomwiki.org/wiki/Statistics_driver).
* [SecSpecial](api-level-SecSpecial.md)
* [Sector](api-level-Sector.md)
* [SectorEffect](api-level-SectorEffect.md)
* [SectorTagIterator](api-level-SectorTagIterator.md)
* [Side](api-level-Side.md)
* [Vertex](api-level-Vertex.md)