From 91480fa09bfd0c7e937cdf0b29360c9e10413f62 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 17 Oct 2009 08:59:19 +0200 Subject: More renaming and reorganization of feature checks. There were a couple of functions is_something(dgn_feature_type feat) defined in travel.cc that were otherwise independent of travel. For consistency, move these to terrain.cc and rename to feat_is_something. One might also consider renaming the various feat_is_whatever functions to just is_whatever. --- crawl-ref/source/terrain.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/terrain.h') diff --git a/crawl-ref/source/terrain.h b/crawl-ref/source/terrain.h index 35ff6603c9..1cceb40020 100644 --- a/crawl-ref/source/terrain.h +++ b/crawl-ref/source/terrain.h @@ -18,12 +18,12 @@ actor* actor_at(const coord_def& c); bool fall_into_a_pool( const coord_def& entry, bool allow_shift, unsigned char terrain ); +bool cell_is_solid(int x, int y); +bool cell_is_solid(const coord_def &c); bool feat_is_wall(dungeon_feature_type feat); bool feat_is_opaque(dungeon_feature_type feat); bool feat_is_solid(dungeon_feature_type feat); -bool cell_is_solid(int x, int y); -bool cell_is_solid(const coord_def &c); bool feat_is_closed_door(dungeon_feature_type feat); bool feat_is_secret_door(dungeon_feature_type feat); bool feat_is_rock(dungeon_feature_type feat); @@ -36,6 +36,11 @@ command_type feat_stair_direction(dungeon_feature_type feat); bool feat_sealable_portal(dungeon_feature_type feat); bool feat_is_portal(dungeon_feature_type feat); +bool feat_is_stair(dungeon_feature_type feat); +bool feat_is_travelable_stair(dungeon_feature_type feat); +bool feat_is_escape_hatch(dungeon_feature_type feat); +bool feat_is_gate(dungeon_feature_type feat); + std::string feat_preposition(dungeon_feature_type feat, bool active = false, const actor* who = NULL); std::string stair_climb_verb(dungeon_feature_type feat); @@ -44,6 +49,9 @@ bool feat_is_water(dungeon_feature_type feat); bool feat_is_watery(dungeon_feature_type feat); god_type feat_altar_god(dungeon_feature_type feat); dungeon_feature_type altar_for_god(god_type god); +bool feat_is_altar(dungeon_feature_type feat); +bool feat_is_player_altar(dungeon_feature_type grid); + bool feat_is_branch_stairs(dungeon_feature_type feat); void find_connected_identical(coord_def d, dungeon_feature_type ft, std::set& out); -- cgit v1.2.3-54-g00ecf