diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-07-11 14:10:16 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-07-11 14:10:16 +0200 |
commit | 9b1000a185fec05191034701d72f2e3065a00d53 (patch) | |
tree | fcde6b9f0a5684e076d5e5fd9e2e24c9fe8639d8 /crawl-ref/source/view.cc | |
parent | 0c8f6b4214ac63ec9eb54968d21f38be997a9981 (diff) | |
download | crawl-ref-9b1000a185fec05191034701d72f2e3065a00d53.tar.gz crawl-ref-9b1000a185fec05191034701d72f2e3065a00d53.zip |
Let magic mapping detect stuff behind secret doors.
Because, you know, there are none anymore.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 435b0124bd..78f7d2c3e4 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -398,47 +398,6 @@ static const FixedArray<uint8_t, GXM, GYM>& _tile_difficulties(bool random) return cache; } -static std::auto_ptr<FixedArray<bool, GXM, GYM> > _tile_detectability() -{ - std::auto_ptr<FixedArray<bool, GXM, GYM> > map(new FixedArray<bool, GXM, GYM>); - - std::vector<coord_def> flood_from; - - for (int x = X_BOUND_1; x <= X_BOUND_2; ++x) - for (int y = Y_BOUND_1; y <= Y_BOUND_2; ++y) - { - (*map)(coord_def(x,y)) = false; - - if (feat_is_stair(grd[x][y])) - flood_from.push_back(coord_def(x, y)); - } - - flood_from.push_back(you.pos()); - - while (!flood_from.empty()) - { - coord_def p = flood_from.back(); - flood_from.pop_back(); - - if (!in_bounds(p)) - continue; - - if ((*map)(p)) - continue; - - (*map)(p) = true; - - if (grd(p) < DNGN_MINSEE && grd(p) != DNGN_CLOSED_DOOR) - continue; - - for (int dy = -1; dy <= 1; ++dy) - for (int dx = -1; dx <= 1; ++dx) - flood_from.push_back(p + coord_def(dx,dy)); - } - - return map; -} - // Returns true if it succeeded. bool magic_mapping(int map_radius, int proportion, bool suppress_msg, bool force, bool deterministic, @@ -471,11 +430,6 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg, const FixedArray<uint8_t, GXM, GYM>& difficulty = _tile_difficulties(!deterministic); - std::auto_ptr<FixedArray<bool, GXM, GYM> > detectable; - - if (!deterministic) - detectable = _tile_detectability(); - for (radius_iterator ri(pos, map_radius, C_ROUND); ri; ++ri) { @@ -500,9 +454,6 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg, if (!wizard_map && (env.map_knowledge(*ri).seen() || env.map_knowledge(*ri).mapped())) continue; - if (!wizard_map && !deterministic && !((*detectable)(*ri))) - continue; - const dungeon_feature_type feat = grd(*ri); bool open = true; |