summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-25 23:36:07 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-25 23:36:07 +0000
commit83b1c7b2cc01d46d8f904b102681e85c044710a0 (patch)
tree9d76a04ce3d820458e18b87c7283f4f68b4f2fa4 /crawl-ref/source/maps.cc
parent527fdaf6347eeec4683c418593c1977ab77c5007 (diff)
downloadcrawl-ref-83b1c7b2cc01d46d8f904b102681e85c044710a0.tar.gz
crawl-ref-83b1c7b2cc01d46d8f904b102681e85c044710a0.zip
Place external loot chamber for ziggurat levels with jellies.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7625 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 062439163b..1549039ee0 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -30,6 +30,9 @@
#include "stuff.h"
#include "terrain.h"
+static bool bad_map_place(const map_def &map, const coord_def &c,
+ const coord_def &size);
+
static int write_vault(map_def &mdef,
vault_placement &,
bool check_place);
@@ -40,6 +43,13 @@ static int apply_vault_definition(
static bool resolve_map(map_def &def);
+// Globals: Use unwind_var to modify!
+
+// Checks whether a map place is valid.
+map_place_check_t map_place_invalid = bad_map_place;
+
+// If non-empty, any floating vault's @ exit must land on these point.
+point_vector map_anchor_points;
//////////////////////////////////////////////////////////////////////////
// New style vault definitions
@@ -247,7 +257,10 @@ static bool apply_vault_grid(map_def &def,
start = def.float_place();
}
- if (check_place && bad_map_place(def, start, size))
+ if (!map_bounds(start))
+ return (false);
+
+ if (check_place && map_place_invalid(def, start, size))
{
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "Bad vault place: (%d,%d) dim (%d,%d)",