From 28f6c800df6bc63658b9c79e803bf81ac282aa1d Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 8 Nov 2009 14:23:03 +0100 Subject: Split map knowledge and FPROPs. map_cell no longer has the field "properties", which has been replaced by the unsigned long array env.pgrid. env.map has been renamed to env.map_knowledge. It should really be moved into player. --- crawl-ref/source/misc.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 3c96ec0319..39271c1592 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -43,7 +43,8 @@ #include "dgnevent.h" #include "directn.h" #include "dungeon.h" -#include "envmap.h" +#include "map_knowledge.h" +#include "fprop.h" #include "fight.h" #include "files.h" #include "food.h" @@ -1107,7 +1108,7 @@ static void _maybe_bloodify_square(const coord_def& where, int amount, where.x, where.y, amount); #endif if (allow_bleeding_on_square(where)) - env.map(where).property |= FPROP_BLOODY; + env.pgrid(where) |= FPROP_BLOODY; if (smell_alert) blood_smell(12, where); @@ -1194,7 +1195,7 @@ static void _spatter_neighbours(const coord_def& where, int chance) if (one_chance_in(chance)) { - env.map(*ai).property |= FPROP_BLOODY; + env.pgrid(*ai) |= FPROP_BLOODY; _spatter_neighbours(*ai, chance+1); } } @@ -1234,7 +1235,7 @@ void generate_random_blood_spatter_on_level() startprob = min_prob + random2(max_prob); if (allow_bleeding_on_square(c)) - env.map(c).property |= FPROP_BLOODY; + env.pgrid(c) |= FPROP_BLOODY; _spatter_neighbours(c, startprob); } @@ -3021,7 +3022,7 @@ static void apply_environment_effect(const coord_def &c) { const dungeon_feature_type grid = grd(c); // Don't apply if if the feature doesn't want it. - if (testbits(env.map(c).property, FPROP_NO_CLOUD_GEN)) + if (testbits(env.pgrid(c), FPROP_NO_CLOUD_GEN)) return; if (grid == DNGN_LAVA) check_place_cloud(CLOUD_BLACK_SMOKE, c, random_range(4, 8), KC_OTHER); -- cgit v1.2.3-54-g00ecf