summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/overmap.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-27 05:26:45 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-27 05:26:45 +0000
commit158387451269b0a382b98c7a9ec508e3f9e33514 (patch)
tree46cc661d967ef4b6d87d6092f8f17c97d2050147 /crawl-ref/source/overmap.cc
parent9056ed35e126e573487ed4f43891376cb8248381 (diff)
downloadcrawl-ref-158387451269b0a382b98c7a9ec508e3f9e33514.tar.gz
crawl-ref-158387451269b0a382b98c7a9ec508e3f9e33514.zip
Changed "dstovermap" portal vault entrance parameter to "overmap".
New portal vault entrance parameter "overmap_note" can be used to associate a note with a particular entrance on the overmap display. The overmap display now notes entry fee for each known ziggurat. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7647 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r--crawl-ref/source/overmap.cc35
1 files changed, 30 insertions, 5 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index b945877a0e..f341bef7a6 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -40,6 +40,7 @@ typedef std::map<level_pos, shop_type> shop_map_type;
typedef std::map<level_pos, god_type> altar_map_type;
typedef std::map<level_pos, portal_type> portal_map_type;
typedef std::map<level_pos, std::string> portal_vault_map_type;
+typedef std::map<level_pos, std::string> portal_note_map_type;
// NOTE: The value for colours here is char rather than unsigned char
// because g++ needs it to be char for marshallMap in tags.cc to
// compile properly.
@@ -51,6 +52,7 @@ shop_map_type shops_present;
altar_map_type altars_present;
portal_map_type portals_present;
portal_vault_map_type portal_vaults_present;
+portal_note_map_type portal_vault_notes;
portal_vault_colour_map_type portal_vault_colours;
annotation_map_type level_annotations;
@@ -268,14 +270,33 @@ static std::string _portal_vaults_description_string()
disp += ':';
}
- if ( ci_portals->first.id == last_id )
- disp += '*';
+ const level_id lid = ci_portals->first.id;
+ const level_pos where = ci_portals->first;
+
+ if ( lid == last_id )
+ {
+ if (!portal_vault_notes[where].empty())
+ {
+ disp += " (";
+ disp += portal_vault_notes[where];
+ disp += ")";
+ }
+ else
+ disp += '*';
+ }
else
{
disp += ' ';
- disp += ci_portals->first.id.describe(false, true);
+ disp += lid.describe(false, true);
+
+ if (!portal_vault_notes[where].empty())
+ {
+ disp += " (";
+ disp += portal_vault_notes[where];
+ disp += ") ";
+ }
}
- last_id = ci_portals->first.id;
+ last_id = lid;
}
}
if ( last_id.depth != 10000 )
@@ -524,6 +545,7 @@ static bool unnotice_portal(const level_pos &pos)
static bool unnotice_portal_vault(const level_pos &pos)
{
(void) find_erase(portal_vault_colours, pos);
+ (void) find_erase(portal_vault_notes, pos);
return find_erase(portal_vaults_present, pos);
}
@@ -648,7 +670,7 @@ void seen_other_thing( dungeon_feature_type which_thing, const coord_def& pos )
{
std::string portal_name;
- portal_name = env.markers.property_at(pos, MAT_ANY, "dstovermap");
+ portal_name = env.markers.property_at(pos, MAT_ANY, "overmap");
if (portal_name.empty())
portal_name = env.markers.property_at(pos, MAT_ANY, "dstname");
if (portal_name.empty())
@@ -666,6 +688,9 @@ void seen_other_thing( dungeon_feature_type which_thing, const coord_def& pos )
col = get_feature_def(which_thing).colour;
portal_vault_colours[where] = (char) element_colour(col, true);
+ portal_vault_notes[where] =
+ env.markers.property_at(pos, MAT_ANY, "overmap_note");
+
break;
}