From d69688f0d70ebd684181678a77ca10f800258cfe Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 9 May 2007 19:52:59 +0000 Subject: 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 --- crawl-ref/source/branch.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crawl-ref/source/branch.cc') 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(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(i)); + } + return (err); +} + Branch branches[] = { { BRANCH_MAIN_DUNGEON, BRANCH_MAIN_DUNGEON, 27, -1, -- cgit v1.2.3-54-g00ecf