summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 10:47:44 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 10:47:44 +0000
commitfb869dee39e5953d9240ac1344d029c3ff62d624 (patch)
treeee2a92547a332d91ff0cfafb6e7927868cf5b84c /crawl-ref/source/stuff.h
parentdf23c385f390c4a7beb7c24826085c35e6145b95 (diff)
downloadcrawl-ref-fb869dee39e5953d9240ac1344d029c3ff62d624.tar.gz
crawl-ref-fb869dee39e5953d9240ac1344d029c3ff62d624.zip
[2468791] Reduce distinction between minivaults and floating vaults. All vaults are now handled by _build_vaults.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8169 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.h')
-rw-r--r--crawl-ref/source/stuff.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h
index d235407577..a29c0c07e7 100644
--- a/crawl-ref/source/stuff.h
+++ b/crawl-ref/source/stuff.h
@@ -167,6 +167,13 @@ inline bool map_bounds(const coord_def &p)
return map_bounds(p.x, p.y);
}
+// Determines if the coordinate is within bounds of an LOS array.
+inline bool show_bounds(const coord_def &p)
+{
+ return (p.x >= 0 && p.x < ENV_SHOW_DIAMETER
+ && p.y >= 0 && p.y < ENV_SHOW_DIAMETER);
+}
+
int grid_distance( const coord_def& p1, const coord_def& p2 );
int grid_distance( int x, int y, int x2, int y2 );
int distance( const coord_def& p1, const coord_def& p2 );