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/terrain.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/terrain.cc') diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 621403ff36..f1eef97a51 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -504,11 +504,12 @@ static void _dgn_check_terrain_monsters(const coord_def &pos) } +// Um, what does this do? (jpeg) static void _dgn_check_terrain_blood(const coord_def &pos, dungeon_feature_type old_feat, dungeon_feature_type new_feat) { - if (env.map(pos).property != FPROP_BLOODY) + if (!testbits(env.map(pos).property, FPROP_BLOODY)) return; if (new_feat == DNGN_UNSEEN) @@ -516,7 +517,7 @@ static void _dgn_check_terrain_blood(const coord_def &pos, // Caller has already changed the grid, and old_feat is actually // the new feat. if (old_feat != DNGN_FLOOR && !grid_is_solid(old_feat)) - env.map(pos).property = FPROP_NONE; + env.map(pos).property &= ~(FPROP_BLOODY); } else { @@ -524,7 +525,7 @@ static void _dgn_check_terrain_blood(const coord_def &pos, || grid_is_water(new_feat) || grid_destroys_items(new_feat) || is_critical_feature(new_feat)) { - env.map(pos).property = FPROP_NONE; + env.map(pos).property &= ~(FPROP_BLOODY); } } } -- cgit v1.2.3-54-g00ecf