diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 01:25:43 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 01:41:41 +0100 |
commit | b33014e5510ddaf3a5088c934bbb53aa406b451c (patch) | |
tree | dde4379a3ad2a0b8eb10179029d4acac6aa88a76 /crawl-ref/source/los.h | |
parent | dbb39bdfc8ddc1c4b06b07f09d626791e46ed4bb (diff) | |
download | crawl-ref-b33014e5510ddaf3a5088c934bbb53aa406b451c.tar.gz crawl-ref-b33014e5510ddaf3a5088c934bbb53aa406b451c.zip |
Replace bounds_func with circle_def.
The various LOS objects and functions now accept a circle_def
instead of a bounds_func. This is a little less generic, but
should eventually help with iterating over coordinates in
any los_def.
Diffstat (limited to 'crawl-ref/source/los.h')
-rw-r--r-- | crawl-ref/source/los.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/los.h b/crawl-ref/source/los.h index 5947edb4a4..fd24d16cf1 100644 --- a/crawl-ref/source/los.h +++ b/crawl-ref/source/los.h @@ -6,9 +6,12 @@ #ifndef LOS_H #define LOS_H -#include "los_def.h" +#include "coord-circle.h" #include "losparam.h" +class circle_def; +struct ray_def; + #define EPSILON_VALUE 0.00001 bool double_is_zero(const double x); @@ -16,13 +19,14 @@ bool double_is_zero(const double x); void set_los_radius(int r); int get_los_radius_sq(); // XXX -struct ray_def; +#define BDS_DEFAULT (circle_def()) + bool find_ray(const coord_def& source, const coord_def& target, ray_def& ray, const opacity_func &opc = opc_solid, - const bounds_func &bds = bds_default, bool cycle = false); + const circle_def &bds = BDS_DEFAULT, bool cycle = false); bool exists_ray(const coord_def& source, const coord_def& target, const opacity_func &opc = opc_solid, - const bounds_func &bds = bds_default); + const circle_def &bds = BDS_DEFAULT); dungeon_feature_type ray_blocker(const coord_def& source, const coord_def& target); void fallback_ray(const coord_def& source, const coord_def& target, @@ -38,7 +42,7 @@ bool cell_see_cell(const coord_def& p1, const coord_def& p2); void clear_rays_on_exit(); void losight(env_show_grid& sh, const coord_def& center, const opacity_func &opc = opc_default, - const bounds_func &bds = bds_default); + const circle_def &bds = BDS_DEFAULT); void losight(env_show_grid& sh, const los_param& param); void calc_show_los(); |