#include "hack.h"
#include "dgn_file.h"
#include "dlb.h"
#include "display.h"
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 branch * | FDECL (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 mapseen * | FDECL (load_mapseen,(int)) |
STATIC_DCL void | FDECL (save_mapseen,(int, mapseen *)) |
STATIC_DCL mapseen * | FDECL (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_level * | find_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 branch * | add_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_level * | Is_special (d_level *lev) |
branch * | Is_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) |
branch * | dungeon_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 mapseen * | find_mapseen (d_level *lev) |
void | forget_mapseen (int ledger_no) |
STATIC_OVL void | save_mapseen (int fd, mapseen *mptr) |
STATIC_OVL mapseen * | load_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 branch * | branches = (branch *) 0 |
mapseen * | mapseenchn = (struct mapseen *)0 |
struct level_map | level_map [] |
#define ADDNTOBUF | ( | nam, | |
var | |||
) |
{ 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, | |
y | |||
) | ((levl[x][y].typ != ROOM && levl[x][y].typ != CORR) || MON_AT(x, y)) |
Referenced by u_on_sstairs().
#define branch_val | ( | bp ) |
((((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 ) |
((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" |
STATIC_OVL branch* add_branch | ( | int | dgn, |
int | child_entry_level, | ||
struct proto_dungeon * | pd | ||
) |
References correct_branch_type(), d_level::dlevel, d_level::dnum, dungeons, branch::end1, branch::end1_up, branch::end2, FALSE, find_branch(), branch::id, insert_branch(), branch::next, parent_dlevel(), parent_dnum(), proto_dungeon::tmpbranch, TRUE, branch::type, and tmpbranch::up.
Referenced by init_dungeons().
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().
References d_level::dnum.
Referenced by deferred_goto(), digactualhole(), float_down(), getlev(), goto_level(), init_dungeons(), invault(), level_tele(), mlevel_tele_trap(), no_bones_level(), place_branch(), priestini(), restpriest(), restshk(), schedule_goto(), shkinit(), still_chewing(), and use_pick_axe2().
References d_level::dnum, dunlevs_in_dungeon(), and rnd().
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().
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().
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().
References Can_dig_down(), and Is_stronghold.
Referenced by dodown(), dotrap(), fall_through(), find_defensive(), float_down(), makeniche(), mintrap(), mktrap(), and readobjnam().
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().
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().
References depth(), d_level::dlevel, d_level::dnum, dungeons, dungeon::dunlev_ureached, and n_dgns.
Referenced by done(), level_difficulty(), and topten().
References dungeon::depth_start, and dungeons.
Referenced by arti_invoke(), can_make_bones(), create_room(), create_subroom(), deepest_lev_reached(), describe_level(), digactualhole(), done(), dorecover(), fill_room(), fill_zoo(), goto_level(), init_dungeons(), launch_obj(), lev_by_name(), level_difficulty(), level_distance(), level_tele(), make_niches(), makelevel(), migrate_to_level(), mineralize(), mk_knox_portal(), mk_split_room(), mkmap(), mkshobj_at(), mlevel_tele_trap(), moveloop(), moverock(), observable_depth(), peffects(), place_random_engravings(), print_mapseen(), random_teleport_level(), spo_region(), use_defensive(), and use_misc().
STATIC_OVL xchar dname_to_dnum | ( | char * | s ) | const |
References dungeons, and n_dgns.
Referenced by dungeon_branch(), and init_dungeons().
int donamelevel | ( | ) |
References BUFSZ, mapseen::custom, mapseen::custom_lth, find_mapseen(), getlin, index, QBUFSZ, Sprintf, u, and you::uz.
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().
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().
Referenced by describe_level(), dipfountain(), dokick(), done(), fall_through(), fixup_special(), goto_level(), makemaz(), mineralize(), mkstairs(), and use_defensive().
References dungeons, and dungeon::num_dunlevs.
Referenced by assign_rnd_level(), dipfountain(), dokick(), fall_through(), goto_level(), init_dungeons(), level_tele(), makemaz(), mkstairs(), no_bones_level(), random_teleport_level(), and use_defensive().
STATIC_DCL xchar FDECL | ( | dname_to_dnum | , |
(const char *) | |||
) |
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 | ( | 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 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().
void find_hell | ( | d_level * | lev ) |
References d_level::dnum, and valley_level.
Referenced by fall_through(), goto_hell(), and level_tele().
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().
References mapseen::lev, mapseen::next, and on_level().
Referenced by donamelevel(), recalc_mapseen(), and recbranch_mapseen().
void forget_mapseen | ( | int | ledger_no ) |
References mapseen::br, mapseen::custom, mapseen::custom_lth, d_level::dlevel, d_level::dnum, dungeons, mapseen::feat, dungeon::ledger_start, mapseen::lev, mapseen::next, and mapseen::rooms.
Referenced by forget_levels().
static void Fread | ( | genericptr_t | ptr, |
int | size, | ||
int | nitems, | ||
dlb * | stream | ||
) | [static] |
References dlb_fread, EXIT_FAILURE, and terminate().
Referenced by init_dungeons().
void get_level | ( | d_level * | newlevel, |
int | levnum | ||
) |
References dungeon::depth_start, d_level::dlevel, d_level::dnum, dungeons, branch::end1, branch::end2, branch::next, dungeon::num_dunlevs, u, and you::uz.
Referenced by digactualhole(), launch_obj(), level_tele(), mlevel_tele_trap(), moverock(), peffects(), use_defensive(), and use_misc().
References FALSE, find_hell(), and goto_level().
Referenced by dodown().
References dungeons, and dungeon::flags.
Referenced by goto_level(), Invocation_lev(), makelevel(), mineralize(), and no_bones_level().
References mines_dnum.
Referenced by create_monster(), makelevel(), mineralize(), and nameshk().
References quest_dnum.
Referenced by describe_level(), domagictrap(), done(), dotrap(), goto_level(), level_tele(), makelevel(), mineralize(), mksobj(), random_teleport_level(), and set_bonesfile_name().
References tower_dnum.
Referenced by find_defensive(), goto_level(), lev_by_name(), mineralize(), and sp_level_coder().
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().
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().
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().
STATIC_OVL void init_level | ( | int | dgn, |
int | proto_index, | ||
struct proto_dungeon * | pd | ||
) |
References s_level::boneid, tmplevel::boneschar, tmplevel::chance, D_ALIGN_MASK, d_level::dlevel, s_level::dlevel, d_level::dnum, proto_dungeon::final_lev, tmpdungeon::flags, tmplevel::flags, s_level::flags, HELLISH, MAZELIKE, tmplevel::name, s_level::next, s_level::proto, rn2(), tmplevel::rndlevs, s_level::rndlevs, ROGUELIKE, Strcpy, proto_dungeon::tmpdungeon, proto_dungeon::tmplevel, TOWN, and wizard.
Referenced by init_dungeons().
void init_mapseen | ( | d_level * | lev ) |
References d_level::dlevel, d_level::dnum, mapseen::lev, and mapseen::next.
Referenced by mklev().
References branch_val, branches, and branch::next.
Referenced by add_branch(), init_dungeons(), and mk_knox_portal().
References INTEREST, on_level(), u, and you::uz.
Referenced by dooverview().
References dungeons, In_hell(), and dungeon::num_dunlevs.
Referenced by Can_dig_down(), invocation_message(), invocation_pos(), makelevel(), and makemaz().
References dungeons, and dungeon::num_dunlevs.
Referenced by Can_dig_down(), digactualhole(), drop_to(), find_defensive(), makelevel(), mlevel_tele_trap(), no_bones_level(), random_teleport_level(), and use_defensive().
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().
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().
References dungeons, and dungeon::ledger_start.
Referenced by can_make_bones(), Can_rise_up(), currentlevel_rewrite(), digactualhole(), dorecover(), dosave0(), doup(), find_branch(), find_defensive(), forget_levels(), getlev(), goto_level(), keepdogs(), lev_by_name(), make_happy_shk(), mlevel_tele_trap(), nameshk(), no_bones_level(), peffects(), savebones(), setgemprobs(), use_defensive(), and use_misc().
References dungeons, and ledger_to_dnum().
Referenced by lev_by_name(), and migrate_to_level().
References dungeons, and n_dgns.
Referenced by forget_levels(), ledger_to_dlev(), lev_by_name(), and migrate_to_level().
schar lev_by_name | ( | char * | nam ) | const |
References BUFSZ, depth(), d_level::dlevel, s_level::dlevel, d_level::dnum, eos(), find_branch(), find_level(), flags, FORGOTTEN, In_V_tower(), ledger_no(), ledger_to_dlev(), ledger_to_dnum(), level_info, medusa_level, strcmpi, strncmpi(), strstri(), u, you::uz, valley_level, VISITED, wizard, and WIZARD.
Referenced by level_tele().
xchar level_difficulty | ( | ) |
References deepest_lev_reached(), depth(), FALSE, In_endgame, sanctum_level, u, you::uhave, you::ulevel, and you::uz.
Referenced by adj_lev(), antholemon(), b_trapped(), courtmon(), dosdoor(), dowaterdemon(), enlightenment(), fill_zoo(), m_initinv(), makelevel(), max_monster_difficulty(), min_monster_difficulty(), mkbox_cnts(), mkclass(), mkgold(), mksobj(), mktrap(), mkundead(), morguemon(), squadmon(), and untrap().
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().
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().
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().
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().
Referenced by at_dgn_entrance(), chat_with_leader(), clear_fcorr(), clearpriests(), deferred_goto(), dig(), dodown(), domagicportal(), domagictrap(), down_gate(), find_mapseen(), findgd(), fixup_special(), float_down(), gd_move(), getlev(), goto_level(), histemple_at(), inhishop(), init_dungeons(), interest_mapseen(), Is_branchlev(), Is_special(), leader_speaks(), make_happy_shk(), mk_knox_portal(), paybill(), peffects(), place_branch(), print_mapseen(), recbranch_mapseen(), set_residency(), shkgone(), still_chewing(), use_misc(), use_pick_axe2(), and zap_updown().
References sstairs, stairway::sx, stairway::sy, xdnladder, xdnstair, xupladder, xupstair, ydnladder, ydnstair, yupladder, and yupstair.
Referenced by deadbook(), dig_check(), dospinweb(), invocation_message(), use_bell(), use_trap(), and zap_dig().
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().
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().
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().
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().
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().
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().
STATIC_OVL void print_mapseen | ( | winid | win, |
mapseen * | mptr, | ||
boolean | printdun, | ||
boolean | dump, | ||
boolean | final | ||
) |
dump | if information should be dumped to file |
final | if game is finished |
References ADDNTOBUF, align_gname(), Amask2align, ATR_BOLD, ATR_INVERSE, mapseen::br, br_string2(), BUFSZ, COMMA, mapseen::custom, depth(), dungeon::depth_start, d_level::dlevel, dungeon::dname, d_level::dnum, dump_definition_list_dd(), dump_definition_list_dt(), dump_definition_list_end(), dump_definition_list_start(), dump_html(), dump_text(), dungeons, dungeon::dunlev_ureached, branch::end1_up, branch::end2, eos(), mapseen::feat, highc(), In_endgame, INTEREST, Is_astralevel, Is_special(), knox_level, mapseen::lev, Msa2amask, on_level(), PREFIX, s_level::proto, putstr, quest_dnum, shop_string(), sokoban_dnum, Sprintf, TAB, align::type, u, you::ualign, you::uz, and wizard.
Referenced by dooverview().
void recalc_mapseen | ( | ) |
References ALTAR, altarmask, Amask2msa, COLNO, mapseen::feat, find_mapseen(), FOUNTAIN, IN_SIGHT, inhishop(), Levitation, levl, min, MSA_NONE, MSR_SEEN, ROOMOFFSET, mapseen::rooms, rooms, ROWNO, mkroom::rtype, shop_keeper(), SHOPBASE, SINK, TEMPLE, THRONE, TREE, u, you::urooms, you::ux, you::uy, you::uz, and viz_array.
Referenced by dooverview(), goto_level(), and vision_recalc().
References mapseen::br, d_level::dnum, branch::end1, branch::end2, find_mapseen(), branch::next, and on_level().
Referenced by goto_level().
void remdun_mapseen | ( | int | dnum ) |
References mapseenchn, and mapseen::next.
Referenced by expulsion().
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().
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().
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().
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().
void u_on_dnstairs | ( | ) |
References u_on_newpos(), u_on_sstairs(), xdnstair, and ydnstair.
Referenced by goto_level().
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().
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().
void u_on_upstairs | ( | ) |
References u_on_newpos(), u_on_sstairs(), xupstair, and yupstair.
Referenced by goto_level(), and newgame().
Referenced by insert_branch().
mapseen* mapseenchn = (struct mapseen *)0 |
Referenced by remdun_mapseen().
int n_dgns |
Referenced by arti_invoke(), deepest_lev_reached(), dname_to_dnum(), init_dungeons(), ledger_to_dnum(), and mk_knox_portal().