From 4ad49259b2f7c876022bcf93ba9d5d895617fd81 Mon Sep 17 00:00:00 2001 From: Marrub Date: Tue, 2 Apr 2019 17:59:37 -0400 Subject: [PATCH] add SectorTagIterator --- api-level-SectorTagIterator.md | 31 +++++++++++++++++++++++++++++++ api.md | 1 + 2 files changed, 32 insertions(+) create mode 100644 api-level-SectorTagIterator.md diff --git a/api-level-SectorTagIterator.md b/api-level-SectorTagIterator.md new file mode 100644 index 0000000..b38c8d5 --- /dev/null +++ b/api-level-SectorTagIterator.md @@ -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. + + diff --git a/api.md b/api.md index f4ce950..57db52f 100644 --- a/api.md +++ b/api.md @@ -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)