From 99578a522dbdc7ae3b19a6ec06c61193bcd08e65 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 7 Nov 2008 23:25:16 +0000 Subject: 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 --- crawl-ref/source/maps.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/maps.cc') 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; -- cgit v1.2.3-54-g00ecf