diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 17:38:36 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 17:38:36 +0000 |
commit | 23c5277317de657f8376d1b5f33144948a811a42 (patch) | |
tree | de39ce9e4c369e1f42ddf291695d25b1c5c44c55 /crawl-ref/source/overmap.cc | |
parent | a9a5ce7479fc6358f96aadad9654d35f2a573782 (diff) | |
download | crawl-ref-23c5277317de657f8376d1b5f33144948a811a42.tar.gz crawl-ref-23c5277317de657f8376d1b5f33144948a811a42.zip |
[1738010] Stash-tracker now also tracks traps and other dungeon features.
Changed env.grid to dungeon_feature_type. (The special-level builder still
stores map characters directly into env.grid and then translates them to
features.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1592 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r-- | crawl-ref/source/overmap.cc | 52 |
1 files changed, 2 insertions, 50 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc index 117e8d96d6..1fa8d5ddee 100644 --- a/crawl-ref/source/overmap.cc +++ b/crawl-ref/source/overmap.cc @@ -49,7 +49,7 @@ static void seen_altar( god_type god, const coord_def& pos ); static void seen_staircase(unsigned char which_staircase,const coord_def& pos); static void seen_other_thing(unsigned char which_thing, const coord_def& pos); -void seen_notable_thing( int which_thing, int x, int y ) +void seen_notable_thing( dungeon_feature_type which_thing, int x, int y ) { // Don't record in temporary terrain if (you.level_type != LEVEL_DUNGEON) @@ -65,7 +65,7 @@ void seen_notable_thing( int which_thing, int x, int y ) seen_other_thing( which_thing, pos ); } -static int portal_to_feature(portal_type p) +static dungeon_feature_type portal_to_feature(portal_type p) { switch ( p ) { @@ -159,44 +159,6 @@ inline static std::string portal_description(portal_type portal) return feature_description( portal_to_feature(portal) ); } -static void get_matching_altars( - const base_pattern &pattern, std::vector<stash_search_result> &results) -{ - for ( altar_map_type::const_iterator na_iter = altars_present.begin(); - na_iter != altars_present.end(); ++na_iter ) - { - const std::string adesc = - altar_description(na_iter->second); - - if (pattern.matches(place_desc(na_iter->first) + adesc)) - { - stash_search_result sr; - sr.pos = na_iter->first; - sr.match = adesc; - results.push_back(sr); - } - } -} - -static void get_matching_portals( - const base_pattern &pattern, std::vector<stash_search_result> &results) -{ - for ( portal_map_type::const_iterator pl_iter = portals_present.begin(); - pl_iter != portals_present.end(); ++pl_iter ) - { - const std::string desc = - portal_description(pl_iter->second); - - if (pattern.matches(place_desc(pl_iter->first) + desc + " [portal]")) - { - stash_search_result sr; - sr.pos = pl_iter->first; - sr.match = desc; - results.push_back(sr); - } - } -} - bool overmap_knows_portal(dungeon_feature_type portal) { for ( portal_map_type::const_iterator pl_iter = portals_present.begin(); @@ -208,16 +170,6 @@ bool overmap_knows_portal(dungeon_feature_type portal) return (false); } -void get_matching_features( - const base_pattern &pattern, std::vector<stash_search_result> &results) -{ - if (!pattern.valid()) - return; - - get_matching_altars(pattern, results); - get_matching_portals(pattern, results); -} - std::string overview_description_string() { char buffer[100]; |