From 0adf2c9dd91d2f49931fc242545b1e4cd7f5119b Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 16 Oct 2009 23:30:11 +0200 Subject: Some find_ray related cleanup. Introduce a function exists_ray when the ray is not actually needed. Also factor out part of _blocked_ray from directn.cc to ray_blocker. --- crawl-ref/source/los.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/los.h') diff --git a/crawl-ref/source/los.h b/crawl-ref/source/los.h index 7041c2af0d..92d00090e0 100644 --- a/crawl-ref/source/los.h +++ b/crawl-ref/source/los.h @@ -19,9 +19,12 @@ int get_los_radius_squared(); // XXX struct ray_def; bool find_ray(const coord_def& source, const coord_def& target, - ray_def& ray, bool cycle = false, - const opacity_func &opc = opc_solid, - const bounds_func &bds = bds_default); + ray_def& ray, const opacity_func &opc = opc_solid, + const bounds_func &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); +dungeon_feature_type ray_blocker(const coord_def& source, const coord_def& target); void fallback_ray(const coord_def& source, const coord_def& target, ray_def& ray); -- cgit v1.2.3-54-g00ecf