diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-19 12:16:45 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-22 22:37:06 +0200 |
commit | baac5dcb6b5ae6f006cedcd3ff708b03df84bd69 (patch) | |
tree | 2336f520bd8ff9a9c5868b2d50937ff22e47cebf /crawl-ref/source/los.h | |
parent | e14a242819bafa92d2edf0425729a0485f78f591 (diff) | |
download | crawl-ref-baac5dcb6b5ae6f006cedcd3ff708b03df84bd69.tar.gz crawl-ref-baac5dcb6b5ae6f006cedcd3ff708b03df84bd69.zip |
Wrap losight() in class los_def together with env_show_grid.
Diffstat (limited to 'crawl-ref/source/los.h')
-rw-r--r-- | crawl-ref/source/los.h | 21 |
1 files changed, 20 insertions, 1 deletions
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 ); |