From b0d21459b7ec552fe6f9690d3d172bf6412551a9 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 13 Nov 2009 22:09:35 +0100 Subject: Reimplement radius_iterator on the basis of circle_def. --- crawl-ref/source/coord-circle.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'crawl-ref/source/coord-circle.h') 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 -- cgit v1.2.3-54-g00ecf