diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-30 09:03:59 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-31 16:57:54 +0100 |
commit | 02d62bf9075ef5ceeafe1f28372feac70d11e7d5 (patch) | |
tree | 7ce0badecdc77549e37f2181486a4ff480b75c43 /crawl-ref/source/act-iter.h | |
parent | ec9c540f2946ec9f21d632cc22cc05e8f285fe0b (diff) | |
download | crawl-ref-02d62bf9075ef5ceeafe1f28372feac70d11e7d5.tar.gz crawl-ref-02d62bf9075ef5ceeafe1f28372feac70d11e7d5.zip |
Simplify actor_iterator and some of its users, rename to actor_near_iterator.
Diffstat (limited to 'crawl-ref/source/act-iter.h')
-rw-r--r-- | crawl-ref/source/act-iter.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/crawl-ref/source/act-iter.h b/crawl-ref/source/act-iter.h index e3df6603e2..dc70e66ea5 100644 --- a/crawl-ref/source/act-iter.h +++ b/crawl-ref/source/act-iter.h @@ -6,27 +6,26 @@ #ifndef ACT_ITER_H #define ACT_ITER_H -#include "mon-iter.h" - -class actor_iterator +class actor_near_iterator { public: - actor_iterator(const los_base* los_); + actor_near_iterator(coord_def c, los_type los = LOS_DEFAULT); + actor_near_iterator(const actor* a, los_type los = LOS_DEFAULT); operator bool() const; actor* operator*() const; actor* operator->() const; - actor_iterator& operator++(); - actor_iterator operator++(int); + actor_near_iterator& operator++(); + actor_near_iterator operator++(int); protected: - const los_base* los; - bool did_you; - monster_iterator mi; + const coord_def center; + los_type _los; + const actor* viewer; + int i; bool valid(const actor* a) const; - void raw_advance(); - void advance(bool may_stay=false); + void advance(); }; #endif |