summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/direct.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-08 17:29:39 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-08 17:29:39 +0000
commit9f35f123b311ebb5c9e8465e3d1080577958c5b4 (patch)
tree1eb4bec30dd51bd46c3206ada6da74dfd8dfb6e4 /crawl-ref/source/direct.cc
parent3bf9b714ff65b5ddfb27a318dae2d23baf34317a (diff)
downloadcrawl-ref-9f35f123b311ebb5c9e8465e3d1080577958c5b4.tar.gz
crawl-ref-9f35f123b311ebb5c9e8465e3d1080577958c5b4.zip
Better secret door hiding (Darshan)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2817 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r--crawl-ref/source/direct.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index 994e5b463d..535f93965c 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -1733,7 +1733,10 @@ static bool interesting_feature(dungeon_feature_type feat)
std::string feature_description(int mx, int my, description_level_type dtype,
bool add_stop)
{
- const dungeon_feature_type grid = grd[mx][my];
+ dungeon_feature_type grid = grd[mx][my];
+ if ( grid == DNGN_SECRET_DOOR )
+ grid = grid_secret_door_appearance(mx, my);
+
switch (grid)
{
case DNGN_TRAP_MECHANICAL:
@@ -1748,20 +1751,6 @@ std::string feature_description(int mx, int my, description_level_type dtype,
return (feature_do_grammar(
dtype, add_stop, false,
marker_feature_description(coord_def(mx, my))));
- case DNGN_SECRET_DOOR:
- {
- // If we have neighbouring walls, try to look like them.
- // Arguably we should go by our own colour, but well...
- for ( int dx = -1; dx <= 1; ++dx )
- for ( int dy = -1; dy <= 1; ++dy )
- {
- const dungeon_feature_type neighbour = grd[mx+dx][my+dy];
- if ( grid_is_wall(neighbour) )
- return feature_description(neighbour, NUM_TRAPS,
- dtype, add_stop);
- }
- return (feature_description(grid, NUM_TRAPS, dtype, add_stop));
- }
default:
return (feature_description(grid, NUM_TRAPS, dtype, add_stop));
}