diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-02 06:52:08 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-02 06:52:08 +0000 |
commit | b153e8bfc653f4ac0e28cfe7901d3f32006b06e9 (patch) | |
tree | e3bb56c2235eef2d93f5a3d714007b953130d5bb /crawl-ref/source/terrain.cc | |
parent | 3d2b0998bdf89936687648f81c1ce68fc35080ef (diff) | |
download | crawl-ref-b153e8bfc653f4ac0e28cfe7901d3f32006b06e9.tar.gz crawl-ref-b153e8bfc653f4ac0e28cfe7901d3f32006b06e9.zip |
Added floor_special and floor_reserved to dngn_feature_names[], to make
the array match up with the enums.
Don't describe the weapon with which an unseen monster is attacking.
Added methods can_see() and visible_to() to the actor, player and
monster classes, which take care of calling mons_player_visible(),
player_monster_visible(), mons_monster_visible() and mons_near().
Re-arranged the first 12 dungeon_feature_type enumerations so that
similar features are contiguous (i.e., closed door and secret door are
next to each other), and added DNGN_MAXOPAQUE (one less than
DNGN_MINSEE), DNGN_MINWALL and DNGN_MAXWALL.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2293 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r-- | crawl-ref/source/terrain.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 8355657edc..ecb1a70092 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -33,15 +33,7 @@ bool grid_is_wall( dungeon_feature_type grid ) { - return (grid == DNGN_ROCK_WALL - || grid == DNGN_STONE_WALL - || grid == DNGN_METAL_WALL - || grid == DNGN_GREEN_CRYSTAL_WALL - || grid == DNGN_WAX_WALL - || grid == DNGN_PERMAROCK_WALL - || grid == DNGN_CLEAR_ROCK_WALL - || grid == DNGN_CLEAR_STONE_WALL - || grid == DNGN_CLEAR_PERMAROCK_WALL); + return (grid >= DNGN_MINWALL && grid <= DNGN_MAXWALL); } bool grid_is_stone_stair(dungeon_feature_type grid) @@ -164,7 +156,7 @@ command_type grid_stair_direction(dungeon_feature_type grid) bool grid_is_opaque( dungeon_feature_type grid ) { - return (grid < DNGN_MINSEE && grid != DNGN_ORCISH_IDOL); + return (grid < DNGN_MINSEE); } bool grid_is_solid( dungeon_feature_type grid ) |