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:49:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-24 22:49:03 +0000
commitaf13176b28721a63037bc82e75778121f34a8ae1 (patch)
tree7a6616f15ccc925d0a1dedb84e44dfe8a8ede852 /crawl-ref/source/tilepick.cc
parent699744855c0118c363391967d15f4667bf1c622d (diff)
downloadcrawl-ref-af13176b28721a63037bc82e75778121f34a8ae1.tar.gz
crawl-ref-af13176b28721a63037bc82e75778121f34a8ae1.zip
* Another patch by zebez: Display fountain tiles for magic mapping.
* Fix 2826781: Black background for Detect Items/Creatures tiles after magic mapping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10393 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc26
1 files changed, 21 insertions, 5 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index e1c3d34efb..e9f17e482b 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2645,6 +2645,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;
@@ -2653,10 +2654,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
@@ -4397,8 +4398,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))
@@ -4406,7 +4407,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)
@@ -4428,7 +4429,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)
@@ -4481,6 +4482,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;
}
}