From fb869dee39e5953d9240ac1344d029c3ff62d624 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 3 Jan 2009 10:47:44 +0000 Subject: [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 --- crawl-ref/source/stuff.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crawl-ref/source/stuff.h') 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 ); -- cgit v1.2.3-54-g00ecf