summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-07 23:25:16 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-07 23:25:16 +0000
commit99578a522dbdc7ae3b19a6ec06c61193bcd08e65 (patch)
tree5fe01979ad2537458dd1ce059275747be311ee60 /crawl-ref/source/maps.cc
parente8a014fe9b602a577e9497ab1b3ef1dd4f50a600 (diff)
downloadcrawl-ref-99578a522dbdc7ae3b19a6ec06c61193bcd08e65.tar.gz
crawl-ref-99578a522dbdc7ae3b19a6ec06c61193bcd08e65.zip
Change floor_property (blood, sanctuary) to flags, and add two new
settings: vault and highlight. Vault means a grid is part of a vault (set in dungeon.cc), and currently used to exempt vault grids when shifting labyrinths. Highlight is a meta flag currently only used to highlight labyrinth changes on the 'X' map in wizard mode, but I can think of a couple of other uses, mostly for debugging purposes. Also replace a few for loops in the lab shift function with rectangle_iterators. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7414 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 91e7cc29d6..30be71d78e 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -228,23 +228,29 @@ static bool apply_vault_grid(map_def &def, map_type map,
if (orient == MAP_SOUTH || orient == MAP_SOUTHEAST
|| orient == MAP_SOUTHWEST)
+ {
start.y = GYM - height;
-
+ }
if (orient == MAP_EAST || orient == MAP_NORTHEAST
|| orient == MAP_SOUTHEAST)
+ {
start.x = GXM - width;
+ }
// Handle maps aligned along cardinals that are smaller than
// the corresponding map dimension.
if ((orient == MAP_NORTH || orient == MAP_SOUTH
|| orient == MAP_ENCOMPASS)
&& width < GXM)
+ {
start.x = (GXM - width) / 2;
-
+ }
if ((orient == MAP_EAST || orient == MAP_WEST
|| orient == MAP_ENCOMPASS)
&& height < GYM)
+ {
start.y = (GYM - height) / 2;
+ }
// Floating maps can go anywhere, ask the map_def to suggest a place.
if (orient == MAP_FLOAT)
@@ -278,6 +284,8 @@ static bool apply_vault_grid(map_def &def, map_type map,
{
const std::string &s = lines[y - start.y];
strncpy(&map[y][start.x], s.c_str(), s.length());
+// for (unsigned int x = start.x; x < start.x + s.length(); x++)
+// env.map[x][y].property |= FPROP_VAULT;
}
place.pos = start;