summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilepick.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-24 22:54:44 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-24 22:54:44 +0000
commit685985f831e2d385aac7b4c68b10f994b1c49b2c (patch)
tree8fed497942508c175dc242c304564568d8e4c586 /crawl-ref/source/tilepick.cc
parentb1606bd733165bbfd914e19fe78cce2c343bc59b (diff)
downloadcrawl-ref-685985f831e2d385aac7b4c68b10f994b1c49b2c.tar.gz
crawl-ref-685985f831e2d385aac7b4c68b10f994b1c49b2c.zip
Port r10393 (magic mapping fixes for tiles) to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10394 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc28
1 files changed, 21 insertions, 7 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 0fc0ce24e8..20b113957f 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -92,9 +92,7 @@ int tile_unseen_flag(const coord_def& gc)
return TILE_FLAG_MM_UNSEEN;
}
else
- {
return TILE_FLAG_UNSEEN;
- }
}
// Special case for *taurs which have a different tile
@@ -2662,6 +2660,7 @@ void tileidx_unseen(unsigned int &fg, unsigned int &bg, int ch,
case '<': bg = TILE_DNGN_STONE_STAIRS_UP; break;
case '=': fg = TILE_RING_NORMAL_OFFSET + 1; break;
case '>': bg = TILE_DNGN_STONE_STAIRS_DOWN; break;
+ case '~':
case '?': fg = TILE_UNSEEN_ITEM; break;
case '[':
case ']': fg = TILE_UNSEEN_ARMOUR; break;
@@ -2670,10 +2669,10 @@ void tileidx_unseen(unsigned int &fg, unsigned int &bg, int ch,
case '_':
case 220:
case 131: fg = TILE_UNSEEN_ALTAR; break;
- case '~': fg = TILE_UNSEEN_ITEM; break;
case '{':
case 247:
case 135: bg = TILE_DNGN_DEEP_WATER; break;
+ case 244:
case 133: bg = TILE_DNGN_BLUE_FOUNTAIN; break;
case '}': fg = TILE_MISC_CRYSTAL_BALL_OF_SEEING; break;
case 128: //old
@@ -4321,8 +4320,8 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
const coord_def gc(gx, gy);
const coord_def ep = view2show(grid2view(gc));
- int t = _tileidx_monster(idx, detected);
- int t0 = t & TILE_FLAG_MASK;
+ int t = _tileidx_monster(idx, detected);
+ int t0 = t & TILE_FLAG_MASK;
int flag = t & (~TILE_FLAG_MASK);
if (mons_is_mimic(menv[idx].type))
@@ -4330,7 +4329,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
const monsters *mon = &menv[idx];
if (!mons_is_known_mimic(mon))
{
- // if necessary add item brand
+ // If necessary add item brand.
if (igrd(gc) != NON_ITEM)
{
if (foreground)
@@ -4352,7 +4351,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
}
else if (menv[idx].holiness() == MH_PLANT)
{
- // if necessary add item brand
+ // If necessary add item brand.
if (igrd(gc) != NON_ITEM)
{
if (foreground)
@@ -4405,6 +4404,21 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
}
else
{
+ // Retain the magic mapped terrain, but don't give away the real
+ // features either.
+ if (is_terrain_mapped(gc))
+ {
+ unsigned int feature = grd(gc);
+
+ unsigned int grid_symbol;
+ unsigned short grid_color;
+ get_item_symbol(feature, &grid_symbol, &grid_color);
+
+ unsigned int fg;
+ unsigned int bg;
+ tileidx_unseen(fg, bg, grid_symbol, gc);
+ env.tile_bk_bg(gc) = bg;
+ }
env.tile_bk_fg(gc) = t0;
}
}