Data Structures | Defines | Functions | Variables

dungeon.c File Reference

#include "hack.h"
#include "dgn_file.h"
#include "dlb.h"
#include "display.h"
Include dependency graph for dungeon.c:

Data Structures

struct  proto_dungeon
struct  lchoice
struct  level_map

Defines

#define DUNGEON_FILE   "dungeon"
#define X_START   "x-strt"
#define X_LOCATE   "x-loca"
#define X_GOAL   "x-goal"
#define branch_val(bp)
#define badspot(x, y)   ((levl[x][y].typ != ROOM && levl[x][y].typ != CORR) || MON_AT(x, y))
#define INTEREST(feat)
#define TAB   " "
#define BULLET   ""
#define PREFIX   TAB TAB BULLET
#define COMMA   (i++ > 0 ? ", " : PREFIX)
#define ADDNTOBUF(nam, var)
#define ADDTOBUF(nam, var)   { if (var) Sprintf(eos(buf), "%s " nam, COMMA); }

Functions

static void FDECL (Fread,(genericptr_t, int, int, dlb *))
STATIC_DCL xchar FDECL (dname_to_dnum,(const char *))
STATIC_DCL int FDECL (find_branch,(const char *, struct proto_dungeon *))
STATIC_DCL xchar FDECL (parent_dnum,(const char *, struct proto_dungeon *))
STATIC_DCL int FDECL (level_range,(XCHAR_P, int, int, int, struct proto_dungeon *, int *))
STATIC_DCL xchar FDECL (parent_dlevel,(const char *, struct proto_dungeon *))
STATIC_DCL int FDECL (correct_branch_type,(struct tmpbranch *))
STATIC_DCL branchFDECL (add_branch,(int, int, struct proto_dungeon *))
STATIC_DCL void FDECL (add_level,(s_level *))
STATIC_DCL void FDECL (init_level,(int, int, struct proto_dungeon *))
STATIC_DCL int FDECL (possible_places,(int, boolean *, struct proto_dungeon *))
STATIC_DCL xchar FDECL (pick_level,(boolean *, int))
STATIC_DCL boolean FDECL (place_level,(int, struct proto_dungeon *))
STATIC_DCL mapseenFDECL (load_mapseen,(int))
STATIC_DCL void FDECL (save_mapseen,(int, mapseen *))
STATIC_DCL mapseenFDECL (find_mapseen,(d_level *))
STATIC_DCL void FDECL (print_mapseen,(winid, mapseen *, boolean, boolean, boolean))
STATIC_DCL boolean FDECL (interest_mapseen,(mapseen *))
STATIC_DCL char * FDECL (seen_string,(xchar, const char *))
STATIC_DCL const char * FDECL (br_string2,(branch *))
void save_dungeon (int fd, boolean perform_write, boolean free_data)
void restore_dungeon (int fd)
static void Fread (genericptr_t ptr, int size, int nitems, dlb *stream)
STATIC_OVL xchar dname_to_dnum (char *s) const
s_levelfind_level (char *s) const
STATIC_OVL int find_branch (char *s, struct proto_dungeon *pd) const
STATIC_OVL xchar parent_dnum (char *s, struct proto_dungeon *pd) const
STATIC_OVL int level_range (xchar dgn, int base, int rand, int chain, struct proto_dungeon *pd, int *adjusted_base)
STATIC_OVL xchar parent_dlevel (char *s, struct proto_dungeon *pd) const
STATIC_OVL int correct_branch_type (struct tmpbranch *tbr)
void insert_branch (branch *new_branch, boolean extract_first)
STATIC_OVL branchadd_branch (int dgn, int child_entry_level, struct proto_dungeon *pd)
STATIC_OVL void add_level (s_level *new_lev)
STATIC_OVL void init_level (int dgn, int proto_index, struct proto_dungeon *pd)
STATIC_OVL int possible_places (int idx, boolean *map, struct proto_dungeon *pd)
STATIC_OVL xchar pick_level (boolean *map, int nth)
STATIC_OVL boolean place_level (int proto_index, struct proto_dungeon *pd)
void init_dungeons ()
xchar dunlev (d_level *lev)
xchar dunlevs_in_dungeon (d_level *lev)
xchar deepest_lev_reached (boolean noquest)
xchar ledger_no (d_level *lev)
xchar maxledgerno ()
xchar ledger_to_dnum (xchar ledgerno)
xchar ledger_to_dlev (xchar ledgerno)
schar depth (d_level *lev)
boolean on_level (d_level *lev1, d_level *lev2)
s_levelIs_special (d_level *lev)
branchIs_branchlev (d_level *lev)
void next_level (boolean at_stairs)
void prev_level (boolean at_stairs)
void u_on_newpos (int x, int y)
void u_on_sstairs ()
void u_on_upstairs ()
void u_on_dnstairs ()
boolean On_stairs (xchar x, xchar y)
boolean Is_botlevel (d_level *lev)
boolean Can_dig_down (d_level *lev)
boolean Can_fall_thru (d_level *lev)
boolean Can_rise_up (int x, int y, d_level *lev)
void get_level (d_level *newlevel, int levnum)
boolean In_quest (d_level *lev)
boolean In_mines (d_level *lev)
branchdungeon_branch (char *s) const
boolean at_dgn_entrance (char *s) const
boolean In_V_tower (d_level *lev)
boolean On_W_tower_level (d_level *lev)
boolean In_W_tower (int x, int y, d_level *lev)
boolean In_hell (d_level *lev)
void find_hell (d_level *lev)
void goto_hell (boolean at_stairs, boolean falling)
void assign_level (d_level *dest, d_level *src)
void assign_rnd_level (d_level *dest, d_level *src, int range)
int induced_align (int pct)
boolean Invocation_lev (d_level *lev)
xchar level_difficulty ()
schar lev_by_name (char *nam) const
void recbranch_mapseen (d_level *source, d_level *dest)
int donamelevel ()
STATIC_OVL mapseenfind_mapseen (d_level *lev)
void forget_mapseen (int ledger_no)
STATIC_OVL void save_mapseen (int fd, mapseen *mptr)
STATIC_OVL mapseenload_mapseen (int fd)
void remdun_mapseen (int dnum)
void init_mapseen (d_level *lev)
STATIC_OVL boolean interest_mapseen (mapseen *mptr)
void recalc_mapseen ()
int dooverview ()
STATIC_OVL char * seen_string (xchar x, const char *obj)
STATIC_OVL const char * br_string2 (branch *br)
STATIC_OVL const char * shop_string (int rtype)
STATIC_OVL void print_mapseen (winid win, mapseen *mptr, boolean printdun, boolean dump, boolean final)

Variables

int n_dgns
static branchbranches = (branch *) 0
mapseenmapseenchn = (struct mapseen *)0
struct level_map level_map []

Define Documentation

#define ADDNTOBUF (   nam,
  var 
)
Value:
{ if (var) \
        Sprintf(eos(buf), "%s%s " nam "%s", COMMA, seen_string((var), (nam)), \
        ((var) != 1 ? "s" : "")); }

Referenced by print_mapseen().

#define ADDTOBUF (   nam,
  var 
)    { if (var) Sprintf(eos(buf), "%s " nam, COMMA); }
#define badspot (   x,
 
)    ((levl[x][y].typ != ROOM && levl[x][y].typ != CORR) || MON_AT(x, y))

Referenced by u_on_sstairs().

#define branch_val (   bp )
Value:
((((long)(bp)->end1.dnum * (MAXLEVEL+1) + \
          (long)(bp)->end1.dlevel) * (MAXDUNGEON+1) * (MAXLEVEL+1)) + \
         ((long)(bp)->end2.dnum * (MAXLEVEL+1) + (long)(bp)->end2.dlevel))

Referenced by insert_branch().

#define BULLET   ""
#define COMMA   (i++ > 0 ? ", " : PREFIX)

Referenced by print_mapseen().

#define DUNGEON_FILE   "dungeon"

Referenced by init_dungeons().

#define INTEREST (   feat )
Value:
((feat).nfount) || \
        ((feat).nsink) || \
        ((feat).nthrone) || \
        ((feat).naltar) || \
        ((feat).nshop) || \
        ((feat).ntemple) || \
        ((feat).ntree)

Referenced by interest_mapseen(), and print_mapseen().

#define PREFIX   TAB TAB BULLET

Referenced by print_mapseen().

#define TAB   " "

Referenced by print_mapseen().

#define X_GOAL   "x-goal"
#define X_LOCATE   "x-loca"
#define X_START   "x-strt"

Function Documentation

STATIC_OVL branch* add_branch ( int  dgn,
int  child_entry_level,
struct proto_dungeon pd 
)
STATIC_OVL void add_level ( s_level new_lev )

References d_level::dlevel, s_level::dlevel, d_level::dnum, s_level::next, and sp_levchn.

Referenced by init_dungeons().

Here is the caller graph for this function:

void assign_level ( d_level dest,
d_level src 
)
void assign_rnd_level ( d_level dest,
d_level src,
int  range 
)

References d_level::dnum, dunlevs_in_dungeon(), and rnd().

Here is the call graph for this function:

boolean at_dgn_entrance ( char *  s ) const

References dungeon_branch(), branch::end1, FALSE, on_level(), TRUE, u, and you::uz.

Referenced by domagictrap(), dosounds(), goto_level(), and mk_knox_portal().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL const char* br_string2 ( branch br )

References BR_NO_END1, BR_NO_END2, BR_PORTAL, BR_STAIR, quest_dnum, u, and you::uevent.

Referenced by print_mapseen().

Here is the caller graph for this function:

boolean Can_dig_down ( d_level lev )

References dlevel_t::flags, Invocation_lev(), Is_botlevel(), and level.

Referenced by Can_fall_thru(), dig_check(), digactualhole(), dighole(), do_break_wand(), rndtrap(), and use_defensive().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean Can_fall_thru ( d_level lev )

References Can_dig_down(), and Is_stronghold.

Referenced by dodown(), dotrap(), fall_through(), find_defensive(), float_down(), makeniche(), mintrap(), mktrap(), and readobjnam().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean Can_rise_up ( int  x,
int  y,
d_level lev 
)

References d_level::dlevel, d_level::dnum, dungeons, dungeon::entry_lev, FALSE, In_endgame, In_sokoban, In_W_tower(), Is_wiz1_level, ledger_no(), sstairs, stairway::sx, and stairway::up.

Referenced by peffects(), and use_misc().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int correct_branch_type ( struct tmpbranch tbr )

References BR_NO_END1, BR_NO_END2, BR_PORTAL, BR_STAIR, TBR_NO_DOWN, TBR_NO_UP, TBR_PORTAL, and TBR_STAIR.

Referenced by add_branch().

Here is the caller graph for this function:

xchar deepest_lev_reached ( boolean  noquest )

References depth(), d_level::dlevel, d_level::dnum, dungeons, dungeon::dunlev_ureached, and n_dgns.

Referenced by done(), level_difficulty(), and topten().

Here is the call graph for this function:

Here is the caller graph for this function:

schar depth ( d_level lev )
STATIC_OVL xchar dname_to_dnum ( char *  s ) const

References dungeons, and n_dgns.

Referenced by dungeon_branch(), and init_dungeons().

Here is the caller graph for this function:

int donamelevel (  )

References BUFSZ, mapseen::custom, mapseen::custom_lth, find_mapseen(), getlin, index, QBUFSZ, Sprintf, u, and you::uz.

Here is the call graph for this function:

int dooverview (  )

References create_nhwindow, destroy_nhwindow, display_nhwindow, d_level::dnum, FALSE, interest_mapseen(), mapseen::lev, mapseen::next, NHW_MENU, print_mapseen(), recalc_mapseen(), and TRUE.

Referenced by dooverview_or_wiz_where().

Here is the call graph for this function:

Here is the caller graph for this function:

branch* dungeon_branch ( char *  s ) const

References dname_to_dnum(), d_level::dnum, branch::end2, and branch::next.

Referenced by at_dgn_entrance(), expulsion(), and mk_knox_portal().

Here is the call graph for this function:

Here is the caller graph for this function:

xchar dunlev ( d_level lev )
xchar dunlevs_in_dungeon ( d_level lev )
STATIC_DCL xchar FDECL ( dname_to_dnum  ,
(const char *)   
)
STATIC_DCL mapseen* FDECL ( find_mapseen  ,
(d_level *)   
)
STATIC_DCL xchar FDECL ( parent_dnum  ,
(const char *, struct proto_dungeon *)   
)
STATIC_DCL branch* FDECL ( add_branch  ,
(int, int, struct proto_dungeon *)   
)
STATIC_DCL void FDECL ( print_mapseen  ,
(winid, mapseen *, boolean, boolean, boolean  
)
STATIC_DCL boolean FDECL ( interest_mapseen  ,
(mapseen *)   
)
STATIC_DCL void FDECL ( add_level  ,
(s_level *)   
)
STATIC_DCL char* FDECL ( seen_string  ,
(xchar, const char *)   
)
STATIC_DCL int FDECL ( level_range  ,
(XCHAR_P, int, int, int, struct proto_dungeon *, int *)   
)
STATIC_DCL const char* FDECL ( br_string2  ,
(branch *)   
)
STATIC_DCL void FDECL ( init_level  ,
(int, int, struct proto_dungeon *)   
)
STATIC_DCL int FDECL ( possible_places  ,
(int, boolean *, struct proto_dungeon *)   
)
STATIC_DCL int FDECL ( find_branch  ,
(const char *, struct proto_dungeon *)   
)
STATIC_DCL xchar FDECL ( parent_dlevel  ,
(const char *, struct proto_dungeon *)   
)
STATIC_DCL xchar FDECL ( pick_level  ,
(boolean *, int)   
)
STATIC_DCL boolean FDECL ( place_level  ,
(int, struct proto_dungeon *)   
)
static void FDECL ( Fread  ,
(genericptr_t, int, int, dlb *)   
) [static]
STATIC_DCL mapseen* FDECL ( load_mapseen  ,
(int)   
)
STATIC_DCL int FDECL ( correct_branch_type  ,
(struct tmpbranch *)   
)
STATIC_DCL void FDECL ( save_mapseen  ,
(int, mapseen *)   
)
STATIC_OVL int find_branch ( char *  s,
struct proto_dungeon pd 
) const

References mapseen::br, dungeon::dname, d_level::dnum, dungeons, branch::end1, branch::end2, ledger_no(), proto_dungeon::n_brs, tmpbranch::name, branch::next, strcmpi, strncmpi(), and proto_dungeon::tmpbranch.

Referenced by add_branch(), lev_by_name(), parent_dlevel(), and parent_dnum().

Here is the call graph for this function:

Here is the caller graph for this function:

void find_hell ( d_level lev )

References d_level::dnum, and valley_level.

Referenced by fall_through(), goto_hell(), and level_tele().

Here is the caller graph for this function:

s_level* find_level ( char *  s ) const

References s_level::next, s_level::proto, sp_levchn, and strcmpi.

Referenced by fixup_special(), init_dungeons(), lev_by_name(), and makelevel().

Here is the caller graph for this function:

STATIC_OVL mapseen* find_mapseen ( d_level lev )

References mapseen::lev, mapseen::next, and on_level().

Referenced by donamelevel(), recalc_mapseen(), and recbranch_mapseen().

Here is the call graph for this function:

Here is the caller graph for this function:

void forget_mapseen ( int  ledger_no )
static void Fread ( genericptr_t  ptr,
int  size,
int  nitems,
dlb *  stream 
) [static]

References dlb_fread, EXIT_FAILURE, and terminate().

Referenced by init_dungeons().

Here is the call graph for this function:

Here is the caller graph for this function:

void get_level ( d_level newlevel,
int  levnum 
)
void goto_hell ( boolean  at_stairs,
boolean  falling 
)

References FALSE, find_hell(), and goto_level().

Referenced by dodown().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean In_hell ( d_level lev )

References dungeons, and dungeon::flags.

Referenced by goto_level(), Invocation_lev(), makelevel(), mineralize(), and no_bones_level().

Here is the caller graph for this function:

boolean In_mines ( d_level lev )

References mines_dnum.

Referenced by create_monster(), makelevel(), mineralize(), and nameshk().

Here is the caller graph for this function:

boolean In_quest ( d_level lev )
boolean In_V_tower ( d_level lev )

References tower_dnum.

Referenced by find_defensive(), goto_level(), lev_by_name(), mineralize(), and sp_level_coder().

Here is the caller graph for this function:

boolean In_W_tower ( int  x,
int  y,
d_level lev 
)

References dndest, FALSE, dest_area::nhx, dest_area::nhy, dest_area::nlx, dest_area::nly, On_W_tower_level(), and within_bounded_area.

Referenced by Can_rise_up(), goto_level(), migrate_to_level(), rloc(), and tactics().

Here is the call graph for this function:

Here is the caller graph for this function:

int induced_align ( int  pct )

References Align2amask, d_level::dnum, dungeons, dungeon::flags, s_level::flags, Is_special(), rn2(), u, and you::uz.

Referenced by create_altar(), create_monster(), and mktemple().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_dungeons (  )

References add_branch(), add_level(), assign_level(), couple::base, dungeon::boneid, tmpdungeon::boneschar, BR_PORTAL, BRANCH_LIMIT, tmpdungeon::branches, BUFSZ, tmpdungeon::chance, check_version(), clear_nhwindow, D_ALIGN_MASK, DATAPREFIX, depth(), dungeon::depth_start, dlb, dlb_fclose, dlb_fopen, DLBFILE, s_level::dlevel, dname_to_dnum(), d_level::dnum, DUNGEON_FILE, dungeons, dungeon::dunlev_ureached, dunlevs_in_dungeon(), branch::end1, branch::end1_up, branch::end2, dungeon::entry_lev, tmpdungeon::entry_lev, Role::filecode, proto_dungeon::final_lev, find_level(), tmpdungeon::flags, dungeon::flags, fqn_prefix, Fread(), HELLISH, iflags, init_level(), insert_branch(), interject_assistance, INTERJECT_PANIC, knox_level, dungeon::ledger_start, tmpdungeon::lev, LEV_LIMIT, level_map::lev_name, level_map::lev_spec, tmpdungeon::levels, mall_dnum, MAXDUNGEON, MAXLEVEL, MAZELIKE, mines_dnum, proto_dungeon::n_brs, n_dgns, proto_dungeon::n_levs, tmpdungeon::name, branch::next, dungeon::num_dunlevs, on_level(), place_level(), s_level::proto, tmpdungeon::protoname, quest_dnum, couple::rand, RDBMODE, rn1, rn2(), ROGUELIKE, sokoban_dnum, sp_levchn, Sprintf, proto_dungeon::start, Strcat, Strcpy, proto_dungeon::tmpbranch, proto_dungeon::tmpdungeon, proto_dungeon::tmplevel, tower_dnum, TRUE, tune, branch::type, urole, WIN_MAP, instance_flags::window_inited, and wizard.

Referenced by makelevel(), newgame(), and prscore().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void init_level ( int  dgn,
int  proto_index,
struct proto_dungeon pd 
)
void init_mapseen ( d_level lev )

References d_level::dlevel, d_level::dnum, mapseen::lev, and mapseen::next.

Referenced by mklev().

Here is the caller graph for this function:

void insert_branch ( branch new_branch,
boolean  extract_first 
)

References branch_val, branches, and branch::next.

Referenced by add_branch(), init_dungeons(), and mk_knox_portal().

Here is the caller graph for this function:

STATIC_OVL boolean interest_mapseen ( mapseen mptr )

References INTEREST, on_level(), u, and you::uz.

Referenced by dooverview().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean Invocation_lev ( d_level lev )

References dungeons, In_hell(), and dungeon::num_dunlevs.

Referenced by Can_dig_down(), invocation_message(), invocation_pos(), makelevel(), and makemaz().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean Is_botlevel ( d_level lev )
branch* Is_branchlev ( d_level lev )

References branch::end1, branch::end2, branch::next, and on_level().

Referenced by can_make_bones(), fixup_special(), getlev(), makelevel(), makemaz(), mk_knox_portal(), no_bones_level(), place_lregion(), and put_lregion_here().

Here is the call graph for this function:

Here is the caller graph for this function:

s_level* Is_special ( d_level lev )

References s_level::dlevel, s_level::next, on_level(), and sp_levchn.

Referenced by align_shift(), in_town(), induced_align(), makelevel(), makemaz(), mineralize(), nameshk(), no_bones_level(), onquest(), print_mapseen(), and set_bonesfile_name().

Here is the call graph for this function:

Here is the caller graph for this function:

xchar ledger_no ( d_level lev )
xchar ledger_to_dlev ( xchar  ledgerno )

References dungeons, and ledger_to_dnum().

Referenced by lev_by_name(), and migrate_to_level().

Here is the call graph for this function:

Here is the caller graph for this function:

xchar ledger_to_dnum ( xchar  ledgerno )

References dungeons, and n_dgns.

Referenced by forget_levels(), ledger_to_dlev(), lev_by_name(), and migrate_to_level().

Here is the caller graph for this function:

schar lev_by_name ( char *  nam ) const
xchar level_difficulty (  )
STATIC_OVL int level_range ( xchar  dgn,
int  base,
int  rand,
int  chain,
struct proto_dungeon pd,
int *  adjusted_base 
)

References d_level::dlevel, s_level::dlevel, dungeons, proto_dungeon::final_lev, and dungeon::num_dunlevs.

Referenced by parent_dlevel(), and possible_places().

Here is the caller graph for this function:

STATIC_OVL mapseen* load_mapseen ( int  fd )

References mapseen::br, mapseen::custom, mapseen::custom_lth, mapseen::feat, mapseen::lev, mread(), branch::next, and mapseen::rooms.

Referenced by restore_dungeon().

Here is the call graph for this function:

Here is the caller graph for this function:

xchar maxledgerno (  )

References dungeons, dungeon::ledger_start, and dungeon::num_dunlevs.

Referenced by can_make_bones(), clearlocks(), dosave0(), forget_levels(), goto_level(), save_dungeon(), savelev(), and setgemprobs().

Here is the caller graph for this function:

void next_level ( boolean  at_stairs )

References d_level::dlevel, d_level::dnum, FALSE, goto_level(), sstairs, stairway::sx, stairway::sy, stairway::tolev, u, you::ux, you::uy, and you::uz.

Referenced by dodown().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean on_level ( d_level lev1,
d_level lev2 
)
boolean On_stairs ( xchar  x,
xchar  y 
)
boolean On_W_tower_level ( d_level lev )

References Is_wiz1_level, Is_wiz2_level, and Is_wiz3_level.

Referenced by goto_level(), In_W_tower(), rloc_pos_ok(), tele(), and use_defensive().

Here is the caller graph for this function:

STATIC_OVL xchar parent_dlevel ( char *  s,
struct proto_dungeon pd 
) const

References couple::base, tmpbranch::chain, d_level::dlevel, d_level::dnum, branch::end1, branch::end2, find_branch(), tmpbranch::lev, level_range(), branch::next, parent_dnum(), couple::rand, rn2(), and proto_dungeon::tmpbranch.

Referenced by add_branch().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL xchar parent_dnum ( char *  s,
struct proto_dungeon pd 
) const

References tmpdungeon::branches, find_branch(), tmpdungeon::name, and proto_dungeon::tmpdungeon.

Referenced by add_branch(), and parent_dlevel().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL xchar pick_level ( boolean map,
int  nth 
)

References MAXLEVEL.

Referenced by place_level().

Here is the caller graph for this function:

STATIC_OVL boolean place_level ( int  proto_index,
struct proto_dungeon pd 
)

References d_level::dlevel, s_level::dlevel, FALSE, proto_dungeon::final_lev, tmplevel::lev, MAXLEVEL, proto_dungeon::n_levs, pick_level(), possible_places(), s_level::proto, rn2(), proto_dungeon::start, and TRUE.

Referenced by init_dungeons().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int possible_places ( int  idx,
boolean map,
struct proto_dungeon pd 
)

References couple::base, tmplevel::chain, d_level::dlevel, s_level::dlevel, d_level::dnum, FALSE, proto_dungeon::final_lev, tmplevel::lev, level_range(), MAXLEVEL, couple::rand, proto_dungeon::start, proto_dungeon::tmplevel, and TRUE.

Referenced by place_level().

Here is the call graph for this function:

Here is the caller graph for this function:

void prev_level ( boolean  at_stairs )

References d_level::dlevel, d_level::dnum, done(), ESCAPED, FALSE, goto_level(), sstairs, stairway::sx, stairway::sy, stairway::tolev, u, you::uhave, you::ux, you::uy, and you::uz.

Referenced by doup().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void print_mapseen ( winid  win,
mapseen mptr,
boolean  printdun,
boolean  dump,
boolean  final 
)
void recalc_mapseen (  )
void recbranch_mapseen ( d_level source,
d_level dest 
)

References mapseen::br, d_level::dnum, branch::end1, branch::end2, find_mapseen(), branch::next, and on_level().

Referenced by goto_level().

Here is the call graph for this function:

Here is the caller graph for this function:

void remdun_mapseen ( int  dnum )

References mapseenchn, and mapseen::next.

Referenced by expulsion().

Here is the caller graph for this function:

void restore_dungeon ( int  fd )

References dungeon_topology, dungeons, inv_pos, level_info, load_mapseen(), MAXLINFO, mread(), mapseen::next, branch::next, and tune.

Referenced by restgamestate().

Here is the call graph for this function:

Here is the caller graph for this function:

void save_dungeon ( int  fd,
boolean  perform_write,
boolean  free_data 
)

References bwrite(), mapseen::custom, dungeon_topology, dungeons, inv_pos, level_info, maxledgerno(), branch::next, mapseen::next, save_mapseen(), and tune.

Referenced by free_dungeons(), and savegamestate().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void save_mapseen ( int  fd,
mapseen mptr 
)

References mapseen::br, bwrite(), mapseen::custom, mapseen::custom_lth, mapseen::feat, mapseen::lev, branch::next, and mapseen::rooms.

Referenced by save_dungeon().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL char* seen_string ( xchar  x,
const char *  obj 
)

References index, and vowels.

STATIC_OVL const char* shop_string ( int  rtype )

References ARMORSHOP, BOOKSHOP, CANDLESHOP, FOODSHOP, INSTRUMENTSHOP, PETSHOP, POTIONSHOP, RINGSHOP, SCROLLSHOP, SHOPBASE, TINSHOP, TOOLSHOP, WANDSHOP, and WEAPONSHOP.

Referenced by print_mapseen().

Here is the caller graph for this function:

void u_on_dnstairs (  )

References u_on_newpos(), u_on_sstairs(), xdnstair, and ydnstair.

Referenced by goto_level().

Here is the call graph for this function:

Here is the caller graph for this function:

void u_on_newpos ( int  x,
int  y 
)

References u, you::ux, and you::uy.

Referenced by goto_level(), put_lregion_here(), u_on_dnstairs(), u_on_sstairs(), and u_on_upstairs().

Here is the caller graph for this function:

void u_on_sstairs (  )

References badspot, COLNO, pline(), rn2(), rnd(), ROWNO, sstairs, stairway::sx, stairway::sy, and u_on_newpos().

Referenced by goto_level(), u_on_dnstairs(), and u_on_upstairs().

Here is the call graph for this function:

Here is the caller graph for this function:

void u_on_upstairs (  )

References u_on_newpos(), u_on_sstairs(), xupstair, and yupstair.

Referenced by goto_level(), and newgame().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

branch* branches = (branch *) 0 [static]

Referenced by insert_branch().

struct level_map level_map[]
mapseen* mapseenchn = (struct mapseen *)0

Referenced by remdun_mapseen().

int n_dgns