#pragma once #include "dobject.h" #include "build.h" BEGIN_DUKE_NS // Iterator wrappers that return an actor pointer, not an index. class DukeStatIterator : public StatIterator { public: DukeStatIterator(int stat) : StatIterator(stat) { } DDukeActor *Next() { int n = NextIndex(); return n >= 0? &hittype[n] : nullptr; } DDukeActor *Peek() { int n = PeekIndex(); return n >= 0? &hittype[n] : nullptr; } }; class DukeSectIterator : public SectIterator { public: DukeSectIterator(int stat) : SectIterator(stat) { } DDukeActor *Next() { int n = NextIndex(); return n >= 0? &hittype[n] : nullptr; } DDukeActor *Peek() { int n = PeekIndex(); return n >= 0? &hittype[n] : nullptr; } }; END_DUKE_NS