File: place.h

package info (click to toggle)
crawl 2%3A0.7.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 30,420 kB
  • ctags: 23,018
  • sloc: cpp: 244,317; ansic: 16,144; perl: 2,214; makefile: 984; python: 488; objc: 250; ruby: 200; sh: 140
file content (53 lines) | stat: -rw-r--r-- 1,610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 *  File:       place.h
 *  Summary:    Place related functions.
 *  Written by: Linley Henzell
 */

#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);
int place_type(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);
bool level_type_allows_followers(level_area_type type);
bool level_type_is_stash_trackable(level_area_type type);

std::vector<level_id> all_dungeon_ids();

#endif