dungeon.cc File Reference

#include "AppHdr.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <list>
#include <set>
#include <sstream>
#include <algorithm>
#include <cmath>
#include "abyss.h"
#include "acquire.h"
#include "artefact.h"
#include "branch.h"
#include "chardump.h"
#include "cloud.h"
#include "coord.h"
#include "coordit.h"
#include "defines.h"
#include "dgn-shoals.h"
#include "dgn-swamp.h"
#include "effects.h"
#include "env.h"
#include "enum.h"
#include "map_knowledge.h"
#include "flood_find.h"
#include "food.h"
#include "fprop.h"
#include "externs.h"
#include "dbg-maps.h"
#include "dbg-scan.h"
#include "directn.h"
#include "dungeon.h"
#include "files.h"
#include "itemname.h"
#include "itemprop.h"
#include "items.h"
#include "l_defs.h"
#include "libutil.h"
#include "makeitem.h"
#include "mapdef.h"
#include "mapmark.h"
#include "maps.h"
#include "message.h"
#include "misc.h"
#include "mon-util.h"
#include "mon-place.h"
#include "mgen_data.h"
#include "mon-pathfind.h"
#include "notes.h"
#include "place.h"
#include "player.h"
#include "random.h"
#include "religion.h"
#include "spl-book.h"
#include "spl-transloc.h"
#include "spl-util.h"
#include "sprint.h"
#include "state.h"
#include "stuff.h"
#include "tags.h"
#include "terrain.h"
#include "traps.h"
#include "travel.h"
#include "tutorial.h"
#include "hints.h"

Classes

struct  dist_feat
class  dgn_veto_exception
struct  coloured_feature
struct  dgn_colour_override_manager
struct  coord_comparator
struct  nearest_point
struct  StairConnectivity

Defines

#define YOU_DUNGEON_VAULTS_KEY   "you_dungeon_vaults_key"
#define YOU_PORTAL_VAULT_MAPS_KEY   "you_portal_vault_maps_key"

Typedefs

typedef std::list< coord_defcoord_list
typedef FixedArray
< coloured_feature, GXM, GYM > 
dungeon_colour_grid
typedef std::map< std::string,
std::string
callback_map
typedef std::set< coord_def,
coord_comparator
coord_set

Functions

bool builder (int level_number, level_area_type level_type, bool enable_random_maps)
void level_welcome_messages ()
void dgn_clear_vault_placements (vault_placement_refv &vps)
void dgn_erase_unused_vault_placements ()
void level_clear_vault_memory ()
void dgn_flush_map_memory ()
bool set_level_flags (uint32_t flags, bool silent)
bool unset_level_flags (uint32_t flags, bool silent)
void dgn_set_grid_colour_at (const coord_def &c, int colour)
void dgn_register_vault (const map_def &map)
bool dgn_square_travel_ok (const coord_def &c)
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)
void dgn_register_place (const vault_placement &place, bool register_vault)
bool dgn_ensure_vault_placed (bool vault_success, bool disable_further_vaults)
void dgn_reset_level (bool enable_random_maps)
void dgn_set_colours_from_monsters ()
int count_neighbours (int x, int y, dungeon_feature_type feat)
void dgn_place_stone_stairs (bool maybe_place_hatches)
bool dgn_has_adjacent_feat (coord_def c, dungeon_feature_type feat)
coord_def dgn_random_point_in_margin (int margin)
bool dgn_place_map (const map_def *mdef, bool clobber, bool make_no_exits, const coord_def &where)
const map_defdgn_safe_place_map (const map_def *mdef, bool clobber, bool make_no_exits, const coord_def &where)
vault_placementdgn_vault_at (coord_def p)
void dgn_seen_vault_at (coord_def p)
int dgn_item_corpse (const item_spec &ispec)
int dgn_place_item (const item_spec &spec, const coord_def &where, int level)
void dgn_place_multiple_items (item_list &list, const coord_def &where, int level)
int dgn_place_monster (mons_spec &mspec, int monster_level, const coord_def &where, bool force_pos, bool generate_awake, bool patrolling)
dungeon_feature_type map_feature_at (map_def *map, const coord_def &c, int rawfeat)
bool seen_replace_feat (dungeon_feature_type old_feat, dungeon_feature_type new_feat)
void dgn_replace_area (int sx, int sy, int ex, int ey, dungeon_feature_type replace, dungeon_feature_type feature, unsigned mmask, bool needs_update)
void dgn_replace_area (const coord_def &p1, const coord_def &p2, dungeon_feature_type replace, dungeon_feature_type feature, uint32_t mapmask, bool needs_update)
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)
bool place_specific_trap (const coord_def &where, trap_type spec_type)
double dgn_degrees_to_radians (int degrees)
coord_def dgn_random_point_from (const coord_def &c, int radius, int margin)
coord_def dgn_random_point_visible_from (const coord_def &c, int radius, int margin, int tries)
coord_def dgn_find_feature_marker (dungeon_feature_type feat)
coord_def dgn_find_nearby_stair (dungeon_feature_type stair_to_find, coord_def base_pos, bool find_closest)
void dgn_set_lt_callback (std::string level_type_tag, std::string callback_name)
void init_level_connectivity ()
void read_level_connectivity (reader &th)
void write_level_connectivity (writer &th)
void run_map_epilogues ()
void remember_vault_placement (std::string key, const vault_placement &place)
std::string dump_vault_maps ()

Variables

std::vector< vault_placementTemp_Vaults
FixedVector< bool, NUM_MONSTERS > temp_unique_creatures
FixedVector
< unique_item_status_type,
MAX_UNRANDARTS > 
temp_unique_items
const map_maskVault_Placement_Mask = NULL
bool Generating_Level = false
FixedVector< std::vector
< StairConnectivity >
, NUM_BRANCHES > 
connectivity

Define Documentation

#define YOU_DUNGEON_VAULTS_KEY   "you_dungeon_vaults_key"

#define YOU_PORTAL_VAULT_MAPS_KEY   "you_portal_vault_maps_key"


Typedef Documentation

typedef std::map<std::string, std::string> callback_map

typedef std::list<coord_def> coord_list

typedef std::set<coord_def, coord_comparator> coord_set


Function Documentation

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

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 
)

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_item_corpse ( const item_spec ispec  ) 

Here is the call graph for this function:

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

Here is the call graph for this function:

bool dgn_place_map ( const map_def mdef,
bool  clobber,
bool  make_no_exits,
const coord_def where 
)

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,
bool  generate_awake,
bool  patrolling 
)

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  ) 

Here is the call graph for this function:

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

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,
int  tries 
)

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 ( const coord_def p1,
const coord_def p2,
dungeon_feature_type  replace,
dungeon_feature_type  feature,
uint32_t  mapmask,
bool  needs_update 
)

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,
bool  needs_update 
)

Here is the call graph for this function:

void dgn_reset_level ( bool  enable_random_maps  ) 

Here is the call graph for this function:

const map_def* dgn_safe_place_map ( const map_def mdef,
bool  clobber,
bool  make_no_exits,
const coord_def where 
)

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_tag,
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  p  ) 

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:

dungeon_feature_type map_feature_at ( map_def map,
const coord_def c,
int  rawfeat 
)

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 
)

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  old_feat,
dungeon_feature_type  new_feat 
)

Here is the call graph for this function:

bool set_level_flags ( uint32_t  flags,
bool  silent 
)

Here is the call graph for this function:

bool unset_level_flags ( uint32_t  flags,
bool  silent 
)

Here is the call graph for this function:

void write_level_connectivity ( writer th  ) 

Here is the call graph for this function:


Variable Documentation

FixedVector<std::vector<StairConnectivity>, NUM_BRANCHES> connectivity

bool Generating_Level = false

FixedVector<bool, NUM_MONSTERS> temp_unique_creatures


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