From c445956fabba97f647a0e659cab6a15ddc019260 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 8 Nov 2009 22:10:49 +0100 Subject: Revert "Make get_symbol() a little clearer." This reverts commit c4a0e05b9d3328834444e374a89d354ee0536396. Haven't managed to find out what's wrong with that one, but it breaks map memory badly. --- crawl-ref/source/showsymb.cc | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc index 36a6ab34fa..39570c3cf0 100644 --- a/crawl-ref/source/showsymb.cc +++ b/crawl-ref/source/showsymb.cc @@ -128,36 +128,31 @@ void get_symbol(const coord_def& where, { ASSERT(ch != NULL); - feature_def fdef; - switch (object.cls) + if (object.cls < SH_MONSTER) { - case SH_FEATURE: - fdef = get_feature_def(object); - if (colour) + + // Don't recolor items + if (colour && object.cls == SH_FEATURE) { const int colmask = *colour & COLFLAG_MASK; *colour = _feat_colour(where, object.feat, *colour) | colmask; } - // Note anything we see that's notable - if (!where.origin() && fdef.is_notable()) - seen_notable_thing(object.feat, where); + + const feature_def &fdef = get_feature_def(object); *ch = magic_mapped ? fdef.magic_symbol : fdef.symbol; - break; - - case SH_ITEM: - case SH_CLOUD: - case SH_INVIS_EXPOSED: - fdef = get_feature_def(object); - *ch = fdef.symbol; - break; - case SH_MONSTER: + // Note anything we see that's notable + if (!where.origin() && fdef.is_notable()) + { + if (object.cls == SH_FEATURE) + seen_notable_thing(object.feat, where); + } + } + else + { + ASSERT(object.cls == SH_MONSTER); *ch = mons_char(object.mons); - break; - - default: - break; } if (colour) -- cgit v1.2.3-54-g00ecf