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.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index c37901d7e0..0148d92438 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -224,8 +224,8 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep)
const monsters* m = monster_at(gp);
if (m && mons_is_unknown_mimic(m))
eitem = &get_mimic_item(m);
- else if (igrd(gp) != NON_ITEM)
- eitem = &mitm[igrd(gp)];
+ else if (you.visible_igrd(gp) != NON_ITEM)
+ eitem = &mitm[you.visible_igrd(gp)];
else
return;
@@ -234,17 +234,20 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep)
glyph g = get_item_glyph(eitem);
const dungeon_feature_type feat = grd(gp);
+
if (Options.feature_item_brand && is_critical_feature(feat))
ecol |= COLFLAG_FEATURE_ITEM;
else if (Options.trap_item_brand && feat_is_trap(feat))
ecol |= COLFLAG_TRAP_ITEM;
else
{
- const unsigned short gcol = env.grid_colours(gp);
- ecol = (feat == DNGN_SHALLOW_WATER) ?
- (gcol != BLACK ? gcol : CYAN) : g.col;
+ ecol = g.col;
+
+ if (feat_is_water(feat))
+ ecol = _feat_colour(gp, feat);
+
// monster(mimic)-owned items have link = NON_ITEM+1+midx
- if (eitem->link > NON_ITEM && igrd(gp) != NON_ITEM)
+ if (eitem->link > NON_ITEM && you.visible_igrd(gp) != NON_ITEM)
ecol |= COLFLAG_ITEM_HEAP;
else if (eitem->link < NON_ITEM && !crawl_state.arena)
ecol |= COLFLAG_ITEM_HEAP;
@@ -253,7 +256,7 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep)
}
#ifdef USE_TILE
- int idx = igrd(gp);
+ int idx = you.visible_igrd(gp);
if (idx != NON_ITEM)
{
if (feat_is_stair(feat))