summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/branch.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-09 19:52:59 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-09 19:52:59 +0000
commitd69688f0d70ebd684181678a77ca10f800258cfe (patch)
tree19b8b9fdd4c8194ea65d0729cdf44adf31ee7e60 /crawl-ref/source/branch.cc
parentb31a9edb3090aa8dac6dc1fc70c5e241c3019642 (diff)
downloadcrawl-ref-d69688f0d70ebd684181678a77ca10f800258cfe.tar.gz
crawl-ref-d69688f0d70ebd684181678a77ca10f800258cfe.zip
Added Lemuel's mines minivaults.
Extended map DEPTH: attribute to support branch specifiers and negated depth specifiers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1442 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/branch.cc')
-rw-r--r--crawl-ref/source/branch.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/branch.cc b/crawl-ref/source/branch.cc
index 298431f866..3f81d87d32 100644
--- a/crawl-ref/source/branch.cc
+++ b/crawl-ref/source/branch.cc
@@ -12,6 +12,16 @@ Branch& your_branch()
return branches[static_cast<int>(you.where_are_you)];
}
+branch_type str_to_branch(const std::string &branch, branch_type err)
+{
+ for (int i = 0; i < NUM_BRANCHES; ++i)
+ {
+ if (branches[i].abbrevname && branches[i].abbrevname == branch)
+ return (static_cast<branch_type>(i));
+ }
+ return (err);
+}
+
Branch branches[] = {
{ BRANCH_MAIN_DUNGEON, BRANCH_MAIN_DUNGEON, 27, -1,