diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 22:10:49 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 22:11:20 +0100 |
commit | c445956fabba97f647a0e659cab6a15ddc019260 (patch) | |
tree | 4477a008e82892cb9d96176932a7744a448241b7 /crawl-ref/source/showsymb.cc | |
parent | 3af1c1befef81545ec1cc2eb97659030de20122c (diff) | |
download | crawl-ref-c445956fabba97f647a0e659cab6a15ddc019260.tar.gz crawl-ref-c445956fabba97f647a0e659cab6a15ddc019260.zip |
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.
Diffstat (limited to 'crawl-ref/source/showsymb.cc')
-rw-r--r-- | crawl-ref/source/showsymb.cc | 37 |
1 files 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) |