summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilepick.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-17 20:41:45 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-17 20:41:45 +0000
commit3738559721d08c98bbf42b5debddee0cac63196b (patch)
tree78b9c39aa6a5c6dfaf59a1f50b2bd77dc38e2b4c /crawl-ref/source/tilepick.cc
parent999f4ba812512fbc28c9cbdc5d4f42a8eafdd1dd (diff)
downloadcrawl-ref-3738559721d08c98bbf42b5debddee0cac63196b.tar.gz
crawl-ref-3738559721d08c98bbf42b5debddee0cac63196b.zip
Fix [2604363]: stashes and autoexplore leaked information about mimics.
(Incidentally, if you walk into a mimic by accident, the stash won't go away until the next turn. Technically a bug, but a minor one.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9118 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 7f23c07988..6b66e9c6f2 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -4356,7 +4356,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
if (!mons_is_known_mimic(mon))
{
// if necessary add item brand
- if (igrd[gx][gy] != NON_ITEM)
+ if (igrd(gc) != NON_ITEM)
{
if (foreground)
t |= TILE_FLAG_S_UNDER;
@@ -4371,14 +4371,14 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
if (foreground)
env.tile_bg[ep.x-1][ep.y-1] |= TILE_FLAG_CURSOR3;
else
- env.tile_bk_bg[gx][gy] |= TILE_FLAG_CURSOR3;
+ env.tile_bk_bg(gc) |= TILE_FLAG_CURSOR3;
}
}
}
else if (menv[idx].holiness() == MH_PLANT)
{
// if necessary add item brand
- if (igrd[gx][gy] != NON_ITEM)
+ if (igrd(gc) != NON_ITEM)
{
if (foreground)
t |= TILE_FLAG_S_UNDER;
@@ -4399,7 +4399,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
if (!player_monster_visible(mon)
|| mons_is_lurking(mon)
- || (mons_is_mimic(mon->type) && !mons_is_known_mimic(mon))
+ || mons_is_unknown_mimic(mon)
|| mons_class_flag(mon->type, M_NO_EXP_GAIN))
{
return;
@@ -4430,7 +4430,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
}
else
{
- env.tile_bk_fg[gc.x][gc.y] = t0;
+ env.tile_bk_fg(gc) = t0;
}
}
@@ -4491,9 +4491,9 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
if (in_bounds)
{
- wall_flv = env.tile_flv[gc.x][gc.y].wall;
- floor_flv = env.tile_flv[gc.x][gc.y].floor;
- special_flv = env.tile_flv[gc.x][gc.y].special;
+ wall_flv = env.tile_flv(gc).wall;
+ floor_flv = env.tile_flv(gc).floor;
+ special_flv = env.tile_flv(gc).special;
}
_finalize_tile(&tileb[count+1], wall_flv, floor_flv, special_flv);