dungeon.h File Reference

#include "fixedarray.h"
#include "env.h"
#include "externs.h"
#include "terrain.h"
#include "stuff.h"
#include "mapdef.h"
#include <vector>
#include <set>
#include <algorithm>

Include dependency graph for dungeon.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dgn_region
struct  vault_placement
class  vault_place_iterator
class  unwind_vault_placement_mask

Defines

#define BUILD_METHOD_KEY   "build_method_key"
#define LAYOUT_TYPE_KEY   "layout_type_key"
#define LEVEL_VAULTS_KEY   "level_vaults_key"
#define LEVEL_EXTRAS_KEY   "level_extras_key"
#define LEVEL_ID_KEY   "level_id_key"
#define YOU_PORTAL_VAULT_NAMES_KEY   "you_portal_vault_names_key"
#define TEMPLE_GODS_KEY   "temple_gods_key"
#define OVERFLOW_TEMPLES_KEY   "overflow_temples_key"
#define TEMPLE_MAP_KEY   "temple_map_key"
#define MAP_SIDE   ((GXM) > (GYM) ? (GXM) : (GYM))

Typedefs

typedef std::vector< dgn_regiondgn_region_list

Enumerations

enum  portal_type {
  PORTAL_NONE = 0, PORTAL_LABYRINTH, PORTAL_HELL, PORTAL_ABYSS,
  PORTAL_PANDEMONIUM, NUM_PORTALS
}
enum  map_mask_type {
  MMT_NONE = 0x0, MMT_VAULT = 0x01, MMT_NO_ITEM = 0x02, MMT_NO_MONS = 0x04,
  MMT_NO_POOL = 0x08, MMT_NO_DOOR = 0x10, MMT_NO_WALL = 0x20, MMT_OPAQUE = 0x40,
  MMT_NO_TRAP = 0x80
}

Functions

void init_level_connectivity ()
void read_level_connectivity (reader &th)
void write_level_connectivity (writer &th)
bool builder (int level_number, level_area_type level_type, bool enable_random_maps=true)
void dgn_veto_level ()
void dgn_clear_vault_placements (vault_placement_refv &vps)
void dgn_erase_unused_vault_placements ()
void dgn_flush_map_memory ()
double dgn_degrees_to_radians (int degrees)
bool dgn_has_adjacent_feat (coord_def c, dungeon_feature_type feat)
coord_def dgn_random_point_in_margin (int margin)
coord_def dgn_random_point_from (const coord_def &c, int radius, int margin=1)
coord_def dgn_random_point_visible_from (const coord_def &c, int radius, int margin=1, int tries=5)
coord_def dgn_find_feature_marker (dungeon_feature_type feat)
void dgn_place_stone_stairs (bool maybe_place_hatches=false)
void dgn_set_colours_from_monsters ()
void dgn_set_grid_colour_at (const coord_def &c, int colour)
bool dgn_place_map (const map_def *map, bool clobber, bool make_no_exits, const coord_def &pos=INVALID_COORD)
const map_defdgn_safe_place_map (const map_def *map, bool clobber, bool make_no_exits, const coord_def &pos=INVALID_COORD)
void level_clear_vault_memory ()
void level_welcome_messages ()
void run_map_epilogues ()
bool place_specific_trap (const coord_def &where, trap_type spec_type)
void place_spec_shop (int level_number, const coord_def &where, int force_s_type, bool representative=false)
bool seen_replace_feat (dungeon_feature_type replace, dungeon_feature_type feature)
bool map_masked (const coord_def &c, unsigned mask)
coord_def dgn_find_nearby_stair (dungeon_feature_type stair_to_find, coord_def base_pos, bool find_closest)
int dgn_place_monster (mons_spec &mspec, int monster_level, const coord_def &where, bool force_pos=false, bool generate_awake=false, bool patrolling=false)
int dgn_place_item (const item_spec &spec, const coord_def &where, int level=INVALID_ABSDEPTH)
void dgn_place_multiple_items (item_list &list, const coord_def &where, int level)
bool set_level_flags (uint32_t flags, bool silent=false)
bool unset_level_flags (uint32_t flags, bool silent=false)
void dgn_set_lt_callback (std::string level_type_name, std::string callback_name)
void dgn_reset_level (bool enable_random_maps=true)
void dgn_register_place (const vault_placement &place, bool register_vault)
void dgn_register_vault (const map_def &map)
void dgn_seen_vault_at (coord_def p)
int process_disconnected_zones (int x1, int y1, int x2, int y2, bool choose_stairless, dungeon_feature_type fill)
int dgn_count_disconnected_zones (bool choose_stairless, dungeon_feature_type fill=DNGN_UNSEEN)
void dgn_replace_area (const coord_def &p1, const coord_def &p2, dungeon_feature_type replace, dungeon_feature_type feature, unsigned mmask=0, bool needs_update=false)
void dgn_replace_area (int sx, int sy, int ex, int ey, dungeon_feature_type replace, dungeon_feature_type feature, unsigned mmask=0, bool needs_update=false)
bool dgn_ensure_vault_placed (bool vault_success, bool disable_further_vaults)
vault_placementdgn_vault_at (coord_def gp)
int count_neighbours (int x, int y, dungeon_feature_type feat)
int count_neighbours (const coord_def &p, dungeon_feature_type feat)
void remember_vault_placement (std::string key, const vault_placement &place)
std::string dump_vault_maps ()
bool dgn_square_travel_ok (const coord_def &c)

Variables

const int MAKE_GOOD_ITEM = 351
const unsigned short INVALID_MAP_INDEX = 10000
bool Generating_Level
std::vector< vault_placementTemp_Vaults
const map_maskVault_Placement_Mask


Define Documentation

#define BUILD_METHOD_KEY   "build_method_key"

#define LAYOUT_TYPE_KEY   "layout_type_key"

#define LEVEL_EXTRAS_KEY   "level_extras_key"

#define LEVEL_ID_KEY   "level_id_key"

#define LEVEL_VAULTS_KEY   "level_vaults_key"

#define MAP_SIDE   ((GXM) > (GYM) ? (GXM) : (GYM))

#define OVERFLOW_TEMPLES_KEY   "overflow_temples_key"

#define TEMPLE_GODS_KEY   "temple_gods_key"

#define TEMPLE_MAP_KEY   "temple_map_key"

#define YOU_PORTAL_VAULT_NAMES_KEY   "you_portal_vault_names_key"


Typedef Documentation

typedef std::vector<dgn_region> dgn_region_list


Enumeration Type Documentation

Enumerator:
MMT_NONE 
MMT_VAULT 
MMT_NO_ITEM 
MMT_NO_MONS 
MMT_NO_POOL 
MMT_NO_DOOR 
MMT_NO_WALL 
MMT_OPAQUE 
MMT_NO_TRAP 

Enumerator:
PORTAL_NONE 
PORTAL_LABYRINTH 
PORTAL_HELL 
PORTAL_ABYSS 
PORTAL_PANDEMONIUM 
NUM_PORTALS 


Function Documentation

bool builder ( int  level_number,
level_area_type  level_type,
bool  enable_random_maps = true 
)

Here is the call graph for this function:

int count_neighbours ( const coord_def p,
dungeon_feature_type  feat 
) [inline]

Here is the call graph for this function:

int count_neighbours ( int  x,
int  y,
dungeon_feature_type  feat 
)

void dgn_clear_vault_placements ( vault_placement_refv vps  ) 

int dgn_count_disconnected_zones ( bool  choose_stairless,
dungeon_feature_type  fill = DNGN_UNSEEN 
)

Here is the call graph for this function:

double dgn_degrees_to_radians ( int  degrees  ) 

bool dgn_ensure_vault_placed ( bool  vault_success,
bool  disable_further_vaults 
)

void dgn_erase_unused_vault_placements (  ) 

coord_def dgn_find_feature_marker ( dungeon_feature_type  feat  ) 

Here is the call graph for this function:

coord_def dgn_find_nearby_stair ( dungeon_feature_type  stair_to_find,
coord_def  base_pos,
bool  find_closest 
)

Here is the call graph for this function:

void dgn_flush_map_memory (  ) 

bool dgn_has_adjacent_feat ( coord_def  c,
dungeon_feature_type  feat 
)

int dgn_place_item ( const item_spec spec,
const coord_def where,
int  level = INVALID_ABSDEPTH 
)

Here is the call graph for this function:

bool dgn_place_map ( const map_def map,
bool  clobber,
bool  make_no_exits,
const coord_def pos = INVALID_COORD 
)

Here is the call graph for this function:

int dgn_place_monster ( mons_spec mspec,
int  monster_level,
const coord_def where,
bool  force_pos = false,
bool  generate_awake = false,
bool  patrolling = false 
)

Here is the call graph for this function:

void dgn_place_multiple_items ( item_list list,
const coord_def where,
int  level 
)

Here is the call graph for this function:

void dgn_place_stone_stairs ( bool  maybe_place_hatches = false  ) 

Here is the call graph for this function:

coord_def dgn_random_point_from ( const coord_def c,
int  radius,
int  margin = 1 
)

Here is the call graph for this function:

coord_def dgn_random_point_in_margin ( int  margin  ) 

Here is the call graph for this function:

coord_def dgn_random_point_visible_from ( const coord_def c,
int  radius,
int  margin = 1,
int  tries = 5 
)

Here is the call graph for this function:

void dgn_register_place ( const vault_placement place,
bool  register_vault 
)

Here is the call graph for this function:

void dgn_register_vault ( const map_def map  ) 

Here is the call graph for this function:

void dgn_replace_area ( int  sx,
int  sy,
int  ex,
int  ey,
dungeon_feature_type  replace,
dungeon_feature_type  feature,
unsigned  mmask = 0,
bool  needs_update = false 
)

Here is the call graph for this function:

void dgn_replace_area ( const coord_def p1,
const coord_def p2,
dungeon_feature_type  replace,
dungeon_feature_type  feature,
unsigned  mmask = 0,
bool  needs_update = false 
)

void dgn_reset_level ( bool  enable_random_maps = true  ) 

Here is the call graph for this function:

const map_def* dgn_safe_place_map ( const map_def map,
bool  clobber,
bool  make_no_exits,
const coord_def pos = INVALID_COORD 
)

Here is the call graph for this function:

void dgn_seen_vault_at ( coord_def  p  ) 

Here is the call graph for this function:

void dgn_set_colours_from_monsters (  ) 

Here is the call graph for this function:

void dgn_set_grid_colour_at ( const coord_def c,
int  colour 
)

void dgn_set_lt_callback ( std::string  level_type_name,
std::string  callback_name 
)

bool dgn_square_travel_ok ( const coord_def c  ) 

Here is the call graph for this function:

vault_placement* dgn_vault_at ( coord_def  gp  ) 

void dgn_veto_level (  ) 

std::string dump_vault_maps (  ) 

Here is the call graph for this function:

void init_level_connectivity (  ) 

void level_clear_vault_memory (  ) 

Here is the call graph for this function:

void level_welcome_messages (  ) 

Here is the call graph for this function:

bool map_masked ( const coord_def c,
unsigned  mask 
)

void place_spec_shop ( int  level_number,
const coord_def where,
int  force_s_type,
bool  representative = false 
)

Here is the call graph for this function:

bool place_specific_trap ( const coord_def where,
trap_type  spec_type 
)

Here is the call graph for this function:

int process_disconnected_zones ( int  x1,
int  y1,
int  x2,
int  y2,
bool  choose_stairless,
dungeon_feature_type  fill 
)

Here is the call graph for this function:

void read_level_connectivity ( reader th  ) 

Here is the call graph for this function:

void remember_vault_placement ( std::string  key,
const vault_placement place 
)

Here is the call graph for this function:

void run_map_epilogues (  ) 

Here is the call graph for this function:

bool seen_replace_feat ( dungeon_feature_type  replace,
dungeon_feature_type  feature 
)

Here is the call graph for this function:

bool set_level_flags ( uint32_t  flags,
bool  silent = false 
)

Here is the call graph for this function:

bool unset_level_flags ( uint32_t  flags,
bool  silent = false 
)

Here is the call graph for this function:

void write_level_connectivity ( writer th  ) 

Here is the call graph for this function:


Variable Documentation

const unsigned short INVALID_MAP_INDEX = 10000

const int MAKE_GOOD_ITEM = 351


Generated on Thu Jan 13 13:04:42 2011 by  doxygen 1.5.6