summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/showsymb.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-12-21 14:08:12 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-12-21 14:08:12 +0100
commitb7524afb080d8ae48191deb243197866383fa00f (patch)
treec112e76eef506cb30b41b53816287074afde0f5b /crawl-ref/source/showsymb.cc
parent6430f033a259abd5512634886699e93be8e0e9e8 (diff)
downloadcrawl-ref-b7524afb080d8ae48191deb243197866383fa00f.tar.gz
crawl-ref-b7524afb080d8ae48191deb243197866383fa00f.zip
Forbid recolouring a bunch of features, optimize.
Recolouring includes COLOUR: in vaults, blood, mold, slime. This commit affects: * active fountains * shops, abandoned or not * teleporters * sealed doors Removing this call to is_critical_feature() also gets rid of 0.25% of CPU use in qw profile, as 15M out of 50M calls come from here, in a tight loop. is_critical_feature() is surprisingly slow, due to hundreds of pointless ifs, especially inside feat_stair_direction().
Diffstat (limited to 'crawl-ref/source/showsymb.cc')
-rw-r--r--crawl-ref/source/showsymb.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc
index 221bfd8068..f1f29f97c9 100644
--- a/crawl-ref/source/showsymb.cc
+++ b/crawl-ref/source/showsymb.cc
@@ -32,8 +32,13 @@ static unsigned short _cell_feat_show_colour(const map_cell& cell,
unsigned short colour = BLACK;
const feature_def &fdef = get_feature_def(feat);
- // These aren't shown mossy/bloody/slimy.
- const bool norecolour = is_critical_feature(feat) || feat_is_trap(feat);
+ // These aren't shown mossy/bloody/slimy, nor obey vault recolouring.
+ const bool norecolour = feat > DNGN_OPEN_DOOR
+ && feat != DNGN_STONE_ARCH
+ && feat != DNGN_DRY_FOUNTAIN
+ && feat != DNGN_EXPIRED_PORTAL
+ // unknown traps won't get here
+ || feat == DNGN_MALIGN_GATEWAY;
if (is_stair_exclusion(loc))
colour = Options.tc_excluded;