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/exclude.cc | |
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/exclude.cc')
-rw-r--r-- | crawl-ref/source/exclude.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 630d549d2b..228a8fcf67 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -108,7 +108,7 @@ struct opacity_excl : opacity_func }; static opacity_excl opc_excl; -// Note: bounds_radius gives a circle with square radius r*r+1; +// Note: circle_def(r, C_ROUND) gives a circle with square radius r*r+1; // this doesn't work well for radius 0, but then we want to // skip LOS calculation in that case anyway since it doesn't // currently short-cut for small bounds. So radius 0 is special-cased. @@ -116,7 +116,7 @@ static opacity_excl opc_excl; travel_exclude::travel_exclude(const coord_def &p, int r, bool autoexcl, monster_type mons, bool vaultexcl) : pos(p), radius(r), - los(los_def(p, opc_excl, bounds_radius(r))), + los(los_def(p, opc_excl, circle_def(r, C_ROUND))), uptodate(false), autoex(autoexcl), mon(mons), vault(vaultexcl) { set_los(); @@ -128,7 +128,7 @@ void travel_exclude::set_los() if (radius > 0) { // Radius might have been changed, and this is cheap. - los.set_bounds(bounds_radius(radius)); + los.set_bounds(circle_def(radius, C_ROUND)); los.update(); } } |