diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-13 22:09:35 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-13 22:51:34 +0100 |
commit | b0d21459b7ec552fe6f9690d3d172bf6412551a9 (patch) | |
tree | 891cdd33dfa81f5060af2d1e0dbcb602b9c39d16 /crawl-ref/source/coord-circle.h | |
parent | 8f81aa0a6fcb839a91b70e29d006f6858fb303b6 (diff) | |
download | crawl-ref-b0d21459b7ec552fe6f9690d3d172bf6412551a9.tar.gz crawl-ref-b0d21459b7ec552fe6f9690d3d172bf6412551a9.zip |
Reimplement radius_iterator on the basis of circle_def.
Diffstat (limited to 'crawl-ref/source/coord-circle.h')
-rw-r--r-- | crawl-ref/source/coord-circle.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/crawl-ref/source/coord-circle.h b/crawl-ref/source/coord-circle.h index 172e2600b6..9cf52acbe8 100644 --- a/crawl-ref/source/coord-circle.h +++ b/crawl-ref/source/coord-circle.h @@ -1,8 +1,6 @@ #ifndef COORD_CIRCLE_H #define COORD_CIRCLE_H -#include "coordit.h" - enum shape_type { SH_SQUARE, // square around an origin @@ -17,6 +15,7 @@ enum circle_type C_ROUND }; +class rectangle_iterator; class rect_def { coord_def min; @@ -51,6 +50,7 @@ public: bool contains(const coord_def &p) const; const rect_def& get_bbox() const; + const coord_def& get_center() const; circle_iterator iter() const; @@ -58,19 +58,4 @@ private: void init(int param, circle_type ctype); }; -class circle_iterator -{ - const circle_def &circle; - rectangle_iterator iter; - -public: - circle_iterator(const circle_def &circle_); - - operator bool() const; - coord_def operator*() const; - - void operator++(); - void operator++(int); -}; - #endif |