summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2013-05-14 16:25:25 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2013-05-14 16:28:20 -0600
commita45499ba62926a823659172633c64b2d06d381fc (patch)
tree2d724cec144801c9783f93d9aada356296103b57 /crawl-ref/source/maps.cc
parentded950aa25a8f3b911acc4f50fd6efbac46d3e28 (diff)
downloadcrawl-ref-a45499ba62926a823659172633c64b2d06d381fc.tar.gz
crawl-ref-a45499ba62926a823659172633c64b2d06d381fc.zip
ORIENT: centre.
This places the vault at the centre of the map, and tries to use a layout that benefits from having a vault at the centre of the map (indicated by using the tag "central" in the layout). A few older vaults have been tagged with ORIENT: centre, and a handful of layouts have been tagged with central; these are vaults and layouts that have been observed to benefit from the interaction in the past for the most part. This may be the first step towards better specifying how primary vaults interact with layouts (castle-like maps with layout_stronghold or layout_gridville, for example, as suggested by mumra). This also fixes a couple of bugs in the layout selector (in particular, "no_primary_layout" being ignored outside of Pan).
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index b12dc4856e..54f9f36a03 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -578,13 +578,13 @@ static bool _apply_vault_grid(map_def &def,
// Handle maps aligned along cardinals that are smaller than
// the corresponding map dimension.
if ((orient == MAP_NORTH || orient == MAP_SOUTH
- || orient == MAP_ENCOMPASS)
+ || orient == MAP_ENCOMPASS || orient == MAP_CENTRE)
&& size.x < GXM)
{
start.x = (GXM - size.x) / 2;
}
if ((orient == MAP_EAST || orient == MAP_WEST
- || orient == MAP_ENCOMPASS)
+ || orient == MAP_ENCOMPASS || orient == MAP_CENTRE)
&& size.y < GYM)
{
start.y = (GYM - size.y) / 2;