summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/show.cc')
-rw-r--r--crawl-ref/source/show.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index 784eac2994..a28a5b5777 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -393,3 +393,19 @@ void show_def::init()
for (radius_iterator ri(&you.get_los()); ri; ++ri)
update_at(*ri, grid2show(*ri));
}
+
+show_type to_knowledge(show_type obj, bool emph)
+{
+ if (Options.item_colour && obj.cls == SH_ITEM)
+ return (obj);
+ if (obj.cls == SH_MONSTER)
+ {
+ obj.colour = DARKGREY;
+ return (obj);
+ }
+ const feature_def& fdef = get_feature_def(obj);
+ obj.colour = fdef.seen_colour;
+ if (emph && fdef.seen_em_colour)
+ obj.colour = fdef.seen_em_colour;
+ return (obj);
+}