From f6cf2bbe461eb50243c279f5bc4b6efe1ab9c4da Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 31 Oct 2009 19:04:46 +0100 Subject: Change ray_def bouncing interface. For one, rename ray_def::advance_and_bounce to ray_def::bounce. Then, pass a grid of bools for adjacent cells which states which cells are considered solid (reflecting). --- crawl-ref/source/ray.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/ray.h') diff --git a/crawl-ref/source/ray.h b/crawl-ref/source/ray.h index 671ca0fa8a..cc7688571d 100644 --- a/crawl-ref/source/ray.h +++ b/crawl-ref/source/ray.h @@ -6,8 +6,11 @@ #ifndef RAY_H #define RAY_H +#include "fixary.h" #include "geom2d.h" +typedef FixedArray reflect_grid; + struct ray_def { geom::ray r; @@ -20,7 +23,7 @@ struct ray_def coord_def pos() const; bool advance(); - void advance_and_bounce(); + void bounce(const reflect_grid &rg); void regress(); }; -- cgit v1.2.3-54-g00ecf