00001 /* 00002 * File: place.h 00003 * Summary: Place related functions. 00004 * Written by: Linley Henzell 00005 */ 00006 00007 #ifndef PLACE_H 00008 #define PLACE_H 00009 00010 #include "enum.h" 00011 00013 // Places and names 00014 // 00015 unsigned short get_packed_place(); 00016 00017 unsigned short get_packed_place(branch_type branch, int subdepth, 00018 level_area_type level_type); 00019 00020 int place_branch(unsigned short place); 00021 int place_depth(unsigned short place); 00022 int place_type(unsigned short place); 00023 00024 std::string short_place_name(unsigned short place); 00025 std::string short_place_name(level_id id); 00026 std::string place_name(unsigned short place, bool long_name = false, 00027 bool include_number = true); 00028 00029 // Prepositional form of branch level name. For example, "in the 00030 // Abyss" or "on level 3 of the Main Dungeon". 00031 std::string prep_branch_level_name(unsigned short packed_place); 00032 std::string prep_branch_level_name(); 00033 00034 // Get displayable depth in the current branch, given the absolute 00035 // depth. 00036 int subdungeon_depth(branch_type branch, int depth); 00037 00038 // Get absolute depth given the displayable depth in the branch. 00039 int absdungeon_depth(branch_type branch, int subdepth); 00040 00041 // Get displayable depth in the current branch. 00042 int player_branch_depth(); 00043 00044 bool single_level_branch(branch_type branch); 00045 00046 bool level_type_exits_up(level_area_type type); 00047 bool level_type_exits_down(level_area_type type); 00048 bool level_type_allows_followers(level_area_type type); 00049 bool level_type_is_stash_trackable(level_area_type type); 00050 00051 std::vector<level_id> all_dungeon_ids(); 00052 00053 #endif