From b33014e5510ddaf3a5088c934bbb53aa406b451c Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 8 Nov 2009 01:25:43 +0100 Subject: 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. --- crawl-ref/source/los.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/los.h') 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(); -- cgit v1.2.3-54-g00ecf