diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-20 20:08:15 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-20 20:08:15 +0000 |
commit | ebe5e29212f88a4db612ffe5707c08aaa01f818e (patch) | |
tree | fb0a90f1ae4f92250010ffca50f3300797b49379 /crawl-ref/source/notes.cc | |
parent | 1aabb3c12726b02bce39e5f9ec843e18640b1fdd (diff) | |
download | crawl-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/notes.cc')
-rw-r--r-- | crawl-ref/source/notes.cc | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc index 9f645fa807..a7c16bfe6c 100644 --- a/crawl-ref/source/notes.cc +++ b/crawl-ref/source/notes.cc @@ -7,6 +7,7 @@ #include "AppHdr.h" #include "notes.h" +#include "branch.h" #include "files.h" #include "Kills.h" #include "message.h" @@ -58,24 +59,9 @@ static bool is_noteworthy_hp( int hp, int maxhp ) { } static int dungeon_branch_depth( unsigned char branch ) { - if ( branch > BRANCH_CAVERNS ) // last branch - return -1; - switch ( branch ) { - case BRANCH_MAIN_DUNGEON: - return 27; - case BRANCH_DIS: - case BRANCH_GEHENNA: - case BRANCH_COCYTUS: - case BRANCH_TARTARUS: - return 7; - case BRANCH_VESTIBULE_OF_HELL: - return 1; - case BRANCH_INFERNO: - case BRANCH_THE_PIT: - return -1; - default: - return branch_depth( branch - 10 ); - } + if ( branch >= NUM_BRANCHES ) + return -1; + return branches[branch].depth; } static bool is_noteworthy_dlevel( unsigned short place ) { |