summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/coordit.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-04 11:55:50 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-05 05:14:16 +0100
commitc85d5d303fb3957007230e665cb37b8d21e17376 (patch)
tree37f3d6af05d645ac6570e29dd7e1cb99e3ef9fd6 /crawl-ref/source/coordit.cc
parentbfccd69dc6f11e2a37f96a5b2b8cb07f956404a9 (diff)
downloadcrawl-ref-c85d5d303fb3957007230e665cb37b8d21e17376.tar.gz
crawl-ref-c85d5d303fb3957007230e665cb37b8d21e17376.zip
Update the whole arena.
It was the only user of non-standard get_los().
Diffstat (limited to 'crawl-ref/source/coordit.cc')
-rw-r--r--crawl-ref/source/coordit.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/coordit.cc b/crawl-ref/source/coordit.cc
index f3da834d94..b7fb349ddc 100644
--- a/crawl-ref/source/coordit.cc
+++ b/crawl-ref/source/coordit.cc
@@ -22,6 +22,15 @@ rectangle_iterator::rectangle_iterator(const coord_def& corner1,
current = topleft;
}
+rectangle_iterator::rectangle_iterator(const coord_def& center, int halfside)
+{
+ topleft.x = center.x - halfside;
+ topleft.y = center.y - halfside;
+ bottomright.x = center.x + halfside;
+ bottomright.y = center.y + halfside;
+ current = topleft;
+}
+
rectangle_iterator::rectangle_iterator(int x_border_dist, int y_border_dist)
{
if (y_border_dist < 0)