diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-31 19:04:46 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-01 21:45:26 +0100 |
commit | f6cf2bbe461eb50243c279f5bc4b6efe1ab9c4da (patch) | |
tree | 61195c985d6265c87e6dd38ee2c368b1e041e036 /crawl-ref/source/ray.h | |
parent | c8f4dd7a1f5e3c666bc84e81248df7fba78eefeb (diff) | |
download | crawl-ref-f6cf2bbe461eb50243c279f5bc4b6efe1ab9c4da.tar.gz crawl-ref-f6cf2bbe461eb50243c279f5bc4b6efe1ab9c4da.zip |
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).
Diffstat (limited to 'crawl-ref/source/ray.h')
-rw-r--r-- | crawl-ref/source/ray.h | 5 |
1 files changed, 4 insertions, 1 deletions
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<bool,3,3> 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(); }; |