summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-14 10:46:11 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-14 12:04:40 +0100
commitf009514cece14ae92173b0915cf1fc98c3b07d4d (patch)
tree5bce322ac93d28a01eaa69b7e9e4b30e0fc0befd
parenta69476ae7d5f83012ef953d09a97a9329089676b (diff)
downloadcrawl-ref-f009514cece14ae92173b0915cf1fc98c3b07d4d.tar.gz
crawl-ref-f009514cece14ae92173b0915cf1fc98c3b07d4d.zip
Display explored depth in level overview (anonymous).
SF artefact 2897410.
-rw-r--r--crawl-ref/source/overmap.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index a57fa1ee28..239c78504d 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -346,12 +346,21 @@ std::string overview_description_string()
}
++branchcount;
-
- snprintf(buffer, sizeof buffer, "<yellow>%-6s</yellow>: %-7s",
+ level_id lid(branches[i].id, 0);
+ lid = find_deepest_explored(lid);
+
+ // account for the space of the depth. Fortunately it's only an issue
+ // for the Lair which has a short name anyway.
+ snprintf(buffer, sizeof buffer,
+ branches[i].depth < 10 ? "<yellow>%-6s</yellow> <darkgrey>(%d/%d)</darkgrey>: %-7s" :
+ lid.depth < 10 ? "<yellow>%-5s</yellow> <darkgrey>(%d/%d)</darkgrey>: %-7s" :
+ "<yellow>%-4s</yellow> <darkgrey>(%d/%d)</darkgrey>: %-7s",
branches[branch].abbrevname,
+ lid.depth,
+ branches[i].depth,
stair_level[branch].describe(false, true).c_str());
disp += buffer;
- if ( (branchcount % 4) == 0 )
+ if ( (branchcount % 3) == 0 )
disp += "\n";
else
disp += " ";