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-11-20 21:47:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-20 21:47:40 +0000
commitf382ac5fc0137d0a2a58be30a893dfa9aa2723bd (patch)
tree8b709259cba53b49949b2c1f7f3b81984942be90 /crawl-ref/source/tilepick.cc
parent43e1f3ff5c4132023e80c6afe33e308f938a9860 (diff)
downloadcrawl-ref-f382ac5fc0137d0a2a58be30a893dfa9aa2723bd.tar.gz
crawl-ref-f382ac5fc0137d0a2a58be30a893dfa9aa2723bd.zip
Add tiles for the sewers' murky (deep and shallow) water, as well as a
yellow background for melded items in inventory. Allow higher level transformations (level 5 and above) to work even if your to-be-melded equipment is cursed, exempting weapons, as before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7522 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 0f065395dc..0288eba6ed 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -36,6 +36,12 @@ static inline bool _is_bazaar()
&& you.level_type_name == "bazaar");
}
+static inline bool _is_sewers()
+{
+ return (you.level_type == LEVEL_PORTAL_VAULT
+ && you.level_type_name == "sewer");
+}
+
static inline unsigned short _get_bazaar_special_colour()
{
return YELLOW;
@@ -2108,8 +2114,12 @@ int tileidx_feature(int object, int gx, int gy)
case DNGN_LAVA:
return TILE_DNGN_LAVA;
case DNGN_DEEP_WATER:
+ if (_is_sewers())
+ return TILE_DNGN_DEEP_WATER_MURKY;
return TILE_DNGN_DEEP_WATER;
case DNGN_SHALLOW_WATER:
+ if (_is_sewers())
+ return TILE_DNGN_SHALLOW_WATER_MURKY;
return TILE_DNGN_SHALLOW_WATER;
case DNGN_FLOOR:
case DNGN_UNDISCOVERED_TRAP:
@@ -2449,7 +2459,8 @@ static inline void _finalize_tile(unsigned int *tile, bool is_special,
}
else if (orig == TILE_DNGN_CLOSED_DOOR || orig == TILE_DNGN_OPEN_DOOR)
{
- ASSERT(special_flv <= 3);
+ if (special_flv > 3)
+ special_flv = 3;
(*tile) = orig + special_flv;
}
else if (orig < TILE_DNGN_MAX)
@@ -3808,11 +3819,15 @@ void tile_init_flavor()
else if (d_spc && r_spc)
env.tile_flv[x][y].special = SPECIAL_NW;
else if (u_spc)
+ {
env.tile_flv[x][y].special = coinflip() ?
SPECIAL_W : SPECIAL_SW;
+ }
else if (d_spc)
+ {
env.tile_flv[x][y].special = coinflip() ?
SPECIAL_W : SPECIAL_NW;
+ }
else
env.tile_flv[x][y].special = jitter(SPECIAL_W);
}