diff options
Diffstat (limited to 'crawl-ref/source/place.h')
-rw-r--r-- | crawl-ref/source/place.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/crawl-ref/source/place.h b/crawl-ref/source/place.h new file mode 100644 index 0000000000..32eba39987 --- /dev/null +++ b/crawl-ref/source/place.h @@ -0,0 +1,53 @@ +/* + * File: place.h + * Summary: Place related functions. + * Written by: Linley Henzell + * + * Modified for Crawl Reference by $Author: j-p-e-g $ on $Date: 2007-09-03 06:41:30 -0700 (Mon, 03 Sep 2007) $ + * + * Change History (most recent first): + * + * <1> 9/11/07 MPC Split from misc.h + */ + +#ifndef PLACE_H +#define PLACE_H + +#include "enum.h" + +////////////////////////////////////////////////////////////////////// +// Places and names +// +unsigned short get_packed_place(); + +unsigned short get_packed_place( branch_type branch, int subdepth, + level_area_type level_type ); + +int place_branch(unsigned short place); +int place_depth(unsigned short place); +std::string short_place_name(unsigned short place); +std::string short_place_name(level_id id); +std::string place_name( unsigned short place, bool long_name = false, + bool include_number = true ); + +// Prepositional form of branch level name. For example, "in the +// Abyss" or "on level 3 of the Main Dungeon". +std::string prep_branch_level_name(unsigned short packed_place); +std::string prep_branch_level_name(); + +// Get displayable depth in the current branch, given the absolute +// depth. +int subdungeon_depth(branch_type branch, int depth); + +// Get absolute depth given the displayable depth in the branch. +int absdungeon_depth(branch_type branch, int subdepth); + +// Get displayable depth in the current branch. +int player_branch_depth(); + +bool single_level_branch(branch_type branch); + +bool level_type_exits_up(level_area_type type); +bool level_type_exits_down(level_area_type type); + +#endif |