From baac5dcb6b5ae6f006cedcd3ff708b03df84bd69 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 19 Oct 2009 12:16:45 +0200 Subject: Wrap losight() in class los_def together with env_show_grid. --- crawl-ref/source/los.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/los.h') diff --git a/crawl-ref/source/los.h b/crawl-ref/source/los.h index f7750e93e1..943a5674d6 100644 --- a/crawl-ref/source/los.h +++ b/crawl-ref/source/los.h @@ -40,8 +40,27 @@ void losight(env_show_grid& sh, const coord_def& center, const opacity_func &opc = opc_default, const bounds_func &bds = bds_default); void losight(env_show_grid& sh, const los_param& param); -void calc_show_los(); +class los_def +{ + env_show_grid show; + coord_def const * center; + opacity_func const * opc; + const bounds_func * bds; + +public: + los_def(); + los_def(const coord_def& c, const opacity_func &o = opc_default, + const bounds_func &b = bds_default); + void init(const coord_def& c, const opacity_func &o = opc_default, + const bounds_func &b = bds_default); + void update(); + void set_center(const coord_def& center); + bool see_cell(const coord_def& p) const; +}; + + +void calc_show_los(); bool see_cell(const env_show_grid &show, const coord_def &c, const coord_def &pos ); -- cgit v1.2.3-54-g00ecf