summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-13 22:09:17 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-13 22:51:33 +0100
commit8f81aa0a6fcb839a91b70e29d006f6858fb303b6 (patch)
treeb4adcb08e72e7c253f3420e92fda3a4e3d80ac68 /crawl-ref
parenta1f031fb94e91514d260e879b6d69a4e66bc00b3 (diff)
downloadcrawl-ref-8f81aa0a6fcb839a91b70e29d006f6858fb303b6.tar.gz
crawl-ref-8f81aa0a6fcb839a91b70e29d006f6858fb303b6.zip
Add los_def::get_bounds.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/los_def.cc5
-rw-r--r--crawl-ref/source/los_def.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/los_def.cc b/crawl-ref/source/los_def.cc
index d53b71c1dc..3e2a3eae2e 100644
--- a/crawl-ref/source/los_def.cc
+++ b/crawl-ref/source/los_def.cc
@@ -68,6 +68,11 @@ void los_def::set_bounds(const circle_def &b)
bds = b;
}
+circle_def los_def::get_bounds() const
+{
+ return (circle_def(center, bds));
+}
+
bool los_def::in_bounds(const coord_def& p) const
{
return (bds.contains(p));
diff --git a/crawl-ref/source/los_def.h b/crawl-ref/source/los_def.h
index 9b9b4a421c..82a82f6447 100644
--- a/crawl-ref/source/los_def.h
+++ b/crawl-ref/source/los_def.h
@@ -24,6 +24,7 @@ public:
void set_center(const coord_def& center);
void set_opacity(const opacity_func& o);
void set_bounds(const circle_def& b);
+ circle_def get_bounds() const;
void update();
bool in_bounds(const coord_def& p) const;