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>2008-12-07 16:04:17 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-07 16:04:17 +0000
commit9575aca8560b78a5c4dbb50698ab7902863708d3 (patch)
tree042915f3166e0e75e6973a840f370991bb98ba76 /crawl-ref/source/tilepick.cc
parent247c86d819723d311cdf53eed4bbbe63b272eadc (diff)
downloadcrawl-ref-9575aca8560b78a5c4dbb50698ab7902863708d3.tar.gz
crawl-ref-9575aca8560b78a5c4dbb50698ab7902863708d3.zip
Add tiles for disturbance in shallow water (only preliminary since you
can only recognize them if you're looking for them), and for closed shops. Move statue tiles into monster folder. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7767 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index b6a584da64..b192db52e8 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2245,7 +2245,12 @@ static int _tileidx_trap(trap_type type)
static int _tileidx_shop(coord_def where)
{
+ if (shop_is_closed(where))
+ return TILE_SHOP_CLOSED;
+
const shop_struct *shop = get_shop(where);
+ if (!shop)
+ return TILE_ERROR;
switch (shop->type)
{
@@ -2315,12 +2320,22 @@ int tileidx_feature(int object, int gx, int gy)
}
return TILE_DNGN_DEEP_WATER;
case DNGN_SHALLOW_WATER:
+ {
+ int t = TILE_DNGN_SHALLOW_WATER;
if (_is_sewers() || env.grid_colours[gx][gy] == GREEN
|| env.grid_colours[gx][gy] == LIGHTGREEN)
{
- return TILE_DNGN_SHALLOW_WATER_MURKY;
+ t = TILE_DNGN_SHALLOW_WATER_MURKY;
}
- return TILE_DNGN_SHALLOW_WATER;
+ if (mgrd[gx][gy] != NON_MONSTER)
+ {
+ monsters *mon = &menv[mgrd[gx][gy]];
+ // Add disturbance to tile.
+ if (mons_is_submerged(mon))
+ t++;
+ }
+ return (t);
+ }
case DNGN_FLOOR:
case DNGN_UNDISCOVERED_TRAP:
return TILE_FLOOR_NORMAL;
@@ -2634,7 +2649,7 @@ static inline void _finalize_tile(unsigned int *tile,
// TODO enne - expose this as an option, so ziggurat can use it too.
// Alternatively, allow the stone type to be set.
- //
+ //
// Hack: Swap rock/stone in crypt and tomb, because there are
// only stone walls.
if ((you.where_are_you == BRANCH_CRYPT || you.where_are_you == BRANCH_TOMB)