summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/place.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 15:03:31 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 15:03:31 +0000
commitdc6826e6b1d0672e12cc13aae63c0b9192bc72dc (patch)
treea78857b3710d3fde90b37ef821ca48e0d0ef1b64 /crawl-ref/source/place.cc
parentc4fe8d851bbeceb9c768dc72f53378360f5938f2 (diff)
downloadcrawl-ref-dc6826e6b1d0672e12cc13aae63c0b9192bc72dc.tar.gz
crawl-ref-dc6826e6b1d0672e12cc13aae63c0b9192bc72dc.zip
Treat all bazaars as noteworthy, not just the first one.
Since bazaars are currently the only type of portal chambers, just refer to them as bazaars in the notes. (The subchecks for the "bazaar" flag don't work with packed_place, unfortunately.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5848 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/place.cc')
-rw-r--r--crawl-ref/source/place.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/crawl-ref/source/place.cc b/crawl-ref/source/place.cc
index fc89dbd60b..efaf31ede9 100644
--- a/crawl-ref/source/place.cc
+++ b/crawl-ref/source/place.cc
@@ -49,16 +49,18 @@ unsigned short get_packed_place( branch_type branch, int subdepth,
{
unsigned short place = (unsigned short)
( (static_cast<int>(branch) << 8) | (subdepth & 0xFF) );
+
if (level_type != LEVEL_DUNGEON)
place = (unsigned short) ( (static_cast<int>(level_type) << 8) | 0xFF );
+
return place;
}
unsigned short get_packed_place()
{
- return get_packed_place( you.where_are_you,
- subdungeon_depth(you.where_are_you, you.your_level),
- you.level_type );
+ return get_packed_place(you.where_are_you,
+ subdungeon_depth(you.where_are_you, you.your_level),
+ you.level_type);
}
bool single_level_branch( branch_type branch )
@@ -87,10 +89,12 @@ std::string place_name( unsigned short place, bool long_name,
case LEVEL_LABYRINTH:
return ( long_name ? "a Labyrinth" : "Lab" );
case LEVEL_PORTAL_VAULT:
- if ( you.level_type_name == "bazaar" )
+ // FIXME: While there are no further portal vaults, declare all
+ // portal vaults as bazaars.
+// if (you.level_type_name == "bazaar")
return ( long_name ? "a Bazaar" : "Bazaar" );
- return ( long_name ? "a Portal Chamber" : "Port" );
+// return ( long_name ? "a Portal Chamber" : "Port" );
default:
return ( long_name ? "Buggy Badlands" : "Bug" );
}
@@ -135,9 +139,8 @@ std::string prep_branch_level_name(unsigned short packed_place)
std::string place = place_name( packed_place, true, true );
if (place.length() && place != "Pandemonium")
place[0] = tolower(place[0]);
- return (place.find("level") == 0?
- "on " + place
- : "in " + place);
+ return (place.find("level") == 0 ? "on " + place
+ : "in " + place);
}
// Use current branch and depth