zscript-doc/api/level/SectorTagIterator.md

32 lines
705 B
Markdown
Raw Permalink Normal View History

2019-04-02 14:59:37 -07:00
# SectorTagIterator
2019-04-02 15:10:12 -07:00
Iterates over sector indices with a specified tag.
2019-04-02 14:59:37 -07:00
```
class SectorTagIterator : Object
{
2019-08-14 03:32:51 -07:00
static SectorTagIterator Create(int tag, Line defline = null);
2019-04-02 14:59:37 -07:00
2019-08-14 03:32:51 -07:00
int Next();
int NextCompat(bool compat, int secnum);
2019-04-02 14:59:37 -07:00
}
```
2019-08-14 03:31:41 -07:00
### `Create`
2019-04-02 14:59:37 -07:00
2019-08-14 03:31:41 -07:00
Creates a new iterator over sectors with tag `tag`. TODO: I can't find where
`defline` is actually used. It is a mystery.
2019-04-02 14:59:37 -07:00
2019-08-14 03:31:41 -07:00
### `Next`
2019-04-02 14:59:37 -07:00
2019-08-14 03:31:41 -07:00
Returns the index of the current sector and advances the iterator. Returns `-1`
when the list is exhausted.
2019-04-02 14:59:37 -07:00
2019-08-14 03:31:41 -07:00
### `NextCompat`
2019-04-02 14:59:37 -07:00
2019-08-14 03:31:41 -07:00
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.
2019-04-02 14:59:37 -07:00
<!-- EOF -->