summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/overmap.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-20 20:08:15 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-20 20:08:15 +0000
commitebe5e29212f88a4db612ffe5707c08aaa01f818e (patch)
treefb0a90f1ae4f92250010ffca50f3300797b49379 /crawl-ref/source/overmap.cc
parent1aabb3c12726b02bce39e5f9ec843e18640b1fdd (diff)
downloadcrawl-ref-ebe5e29212f88a4db612ffe5707c08aaa01f818e.tar.gz
crawl-ref-ebe5e29212f88a4db612ffe5707c08aaa01f818e.zip
Refactored out branches into branch.h and branch.cc.
NOTE: This commit is *buggy*; the final Hell vaults contain buggy runes now. Will fix later; this is a benchmark, since hopefully everything else works. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@682 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r--crawl-ref/source/overmap.cc21
1 files changed, 4 insertions, 17 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index ab61669d1c..8252d33580 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -25,6 +25,7 @@
#include "externs.h"
+#include "branch.h"
#include "direct.h"
// for #definitions of MAX_BRANCHES & MAX_LEVELS
#include "files.h"
@@ -210,27 +211,13 @@ std::string overview_description_string()
std::string disp;
bool seen_anything = false;
- // better put this somewhere central
- const branch_type list_order[] =
- {
- BRANCH_MAIN_DUNGEON,
- BRANCH_ECUMENICAL_TEMPLE,
- BRANCH_ORCISH_MINES, BRANCH_ELVEN_HALLS,
- BRANCH_LAIR, BRANCH_SWAMP, BRANCH_SLIME_PITS, BRANCH_SNAKE_PIT,
- BRANCH_HIVE,
- BRANCH_VAULTS, BRANCH_HALL_OF_BLADES, BRANCH_CRYPT, BRANCH_TOMB,
- BRANCH_VESTIBULE_OF_HELL,
- BRANCH_DIS, BRANCH_GEHENNA, BRANCH_COCYTUS, BRANCH_TARTARUS,
- BRANCH_HALL_OF_ZOT
- };
-
disp += " <white>Overview of the Dungeon</white>\n" ;
// print branches
int branchcount = 0;
- for (unsigned int i = 1; i < sizeof(list_order)/sizeof(branch_type); ++i)
+ for (int i = 0; i < NUM_BRANCHES; ++i)
{
- const branch_type branch = list_order[i];
+ const branch_type branch = branches[i].id;
if ( stair_level.find(branch) != stair_level.end() )
{
if ( !branchcount )
@@ -242,7 +229,7 @@ std::string overview_description_string()
++branchcount;
snprintf(buffer, sizeof buffer, "<yellow>%-6s</yellow>: %-7s",
- branch_name(branch, true).c_str(),
+ branches[branch].abbrevname,
stair_level[branch].describe(false, true).c_str());
disp += buffer;
if ( (branchcount % 4) == 0 )