summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/showsymb.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-12-21 14:44:33 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-12-21 14:44:33 +0100
commitc53f02819cf667c9654aa5561fc81ffc7aab0e01 (patch)
tree4d7df2a1787c404954707683ee1a2438b51650df /crawl-ref/source/showsymb.cc
parentb7524afb080d8ae48191deb243197866383fa00f (diff)
downloadcrawl-ref-c53f02819cf667c9654aa5561fc81ffc7aab0e01.tar.gz
crawl-ref-c53f02819cf667c9654aa5561fc81ffc7aab0e01.zip
Optimize.
This gets rid of 0.55% of qw CPU time. The ugly list here could be avoided by sorting feature enums, something that's very tempting with branch entrances/exits in mind.
Diffstat (limited to 'crawl-ref/source/showsymb.cc')
-rw-r--r--crawl-ref/source/showsymb.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc
index f1f29f97c9..7497277631 100644
--- a/crawl-ref/source/showsymb.cc
+++ b/crawl-ref/source/showsymb.cc
@@ -299,9 +299,13 @@ show_class get_cell_show_class(const map_cell& cell,
if (cell.cloud() != CLOUD_NONE)
return SH_CLOUD;
- if (feat_is_trap(cell.feat())
- || is_critical_feature(cell.feat())
- || (cell.feat() && cell.feat() < DNGN_MINMOVE))
+ const dungeon_feature_type feat = cell.feat();
+ if (feat && feat < DNGN_MINMOVE
+ || feat > DNGN_OPEN_DOOR
+ && feat != DNGN_ABANDONED_SHOP
+ && feat != DNGN_STONE_ARCH
+ && feat != DNGN_EXPIRED_PORTAL
+ && (feat < DNGN_FOUNTAIN_BLUE || feat > DNGN_DRY_FOUNTAIN))
{
return SH_FEATURE;
}