#include "hack.h"
Defines | |
#define | create_vault() create_room(-1, -1, 2, 2, -1, -1, VAULT, TRUE) |
#define | init_vault() vault_x = -1 |
#define | do_vault() (vault_x != -1) |
#define | x_maze_min 2 |
#define | y_maze_min 2 |
Functions | |
STATIC_DCL void | FDECL (mkfount,(int, struct mkroom *)) |
STATIC_DCL void | FDECL (mkaltar,(struct mkroom *)) |
STATIC_DCL void | FDECL (mkgrave,(struct mkroom *)) |
STATIC_DCL void | NDECL (makevtele) |
STATIC_DCL void | NDECL (clear_level_structures) |
STATIC_DCL void | NDECL (makelevel) |
STATIC_DCL void | NDECL (mineralize) |
STATIC_DCL boolean | FDECL (bydoor,(XCHAR_P, XCHAR_P)) |
STATIC_DCL struct mkroom * | FDECL (find_branch_room,(coord *)) |
STATIC_DCL struct mkroom * | FDECL (pos_to_room,(XCHAR_P, XCHAR_P)) |
STATIC_DCL boolean | FDECL (place_niche,(struct mkroom *, int *, int *, int *)) |
STATIC_DCL void | FDECL (makeniche,(int)) |
STATIC_DCL void | NDECL (make_niches) |
STATIC_PTR int | FDECL (CFDECLSPEC do_comp,(const genericptr, const genericptr)) |
STATIC_DCL void | FDECL (dosdoor,(XCHAR_P, XCHAR_P, struct mkroom *, int)) |
STATIC_DCL void | FDECL (join,(int, int, BOOLEAN_P)) |
STATIC_DCL void | FDECL (do_room_or_subroom,(struct mkroom *, int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P, BOOLEAN_P)) |
STATIC_DCL void | NDECL (makerooms) |
STATIC_DCL void | FDECL (finddpos,(coord *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)) |
STATIC_DCL void | FDECL (mkinvpos,(XCHAR_P, XCHAR_P, int)) |
STATIC_DCL void | FDECL (mk_knox_portal,(XCHAR_P, XCHAR_P)) |
STATIC_DCL void | NDECL (place_random_engravings) |
STATIC_PTR int CFDECLSPEC | do_comp (genericptr vx, const genericptr vy) const |
STATIC_OVL void | finddpos (coord *cc, xchar xl, xchar yl, xchar xh, xchar yh) |
void | sort_rooms () |
STATIC_OVL void | do_room_or_subroom (struct mkroom *croom, int lowx, int lowy, int hix, int hiy, boolean lit, schar rtype, boolean special, boolean is_room) |
void | add_room (int lowx, int lowy, int hix, int hiy, boolean lit, schar rtype, boolean special) |
void | add_subroom (struct mkroom *proom, int lowx, int lowy, int hix, int hiy, boolean lit, schar rtype, boolean special) |
void | mk_split_room () |
STATIC_OVL void | makerooms () |
STATIC_OVL void | join (int a, int b, boolean nxcor) |
void | makecorridors (int style) |
void | add_door (int x, int y, struct mkroom *aroom) |
STATIC_OVL void | dosdoor (xchar x, xchar y, struct mkroom *aroom, int type) |
STATIC_OVL boolean | place_niche (struct mkroom *aroom, int *dy, int *xx, int *yy) |
STATIC_OVL void | makeniche (int trap_type) |
void | make_ironbarwalls (int chance) |
STATIC_OVL void | make_niches () |
STATIC_OVL void | makevtele () |
STATIC_OVL void | clear_level_structures () |
STATIC_OVL void | makelevel () |
STATIC_OVL void | mineralize () |
void | wallwalk_right (xchar x, xchar y, schar fgtyp, schar fglit, schar bgtyp, int chance) |
void | mkpoolroom () |
void | mklev () |
void | topologize (struct mkroom *croom) |
STATIC_OVL struct mkroom * | find_branch_room (coord *mp) |
STATIC_OVL struct mkroom * | pos_to_room (xchar x, xchar y) |
void | place_branch (branch *br, xchar x, xchar y) |
STATIC_OVL boolean | bydoor (xchar x, xchar y) |
int | okdoor (xchar x, xchar y) |
void | dodoor (int x, int y, struct mkroom *aroom) |
boolean | occupied (xchar x, xchar y) |
void | mktrap (int num, int mazeflag, struct mkroom *croom, coord *tm) |
void | mkstairs (xchar x, xchar y, char up, struct mkroom *croom) |
STATIC_OVL void | mkfount (int mazeflag, struct mkroom *croom) |
STATIC_OVL void | mkaltar (struct mkroom *croom) |
static void | mkgrave (struct mkroom *croom) |
void | mkinvokearea () |
STATIC_OVL void | mkinvpos (xchar x, xchar y, int dist) |
STATIC_OVL void | mk_knox_portal (xchar x, xchar y) |
void | place_random_engraving (engravings, const int size) const |
void | place_random_engravings () |
Variables | |
static xchar | vault_x |
static xchar | vault_y |
boolean | goldseen |
static boolean | made_branch |
static NEARDATA const char * | trap_engravings [TRAPNUM] |
static const char *const | illuminati_engravings [] |
static const char *const | hhgtg_engravings [] |
#define create_vault | ( | ) | create_room(-1, -1, 2, 2, -1, -1, VAULT, TRUE) |
Referenced by makelevel(), and makerooms().
#define do_vault | ( | ) | (vault_x != -1) |
Referenced by makelevel().
#define init_vault | ( | ) | vault_x = -1 |
Referenced by clear_level_structures().
#define x_maze_min 2 |
Referenced by makemaz(), and mkinvpos().
#define y_maze_min 2 |
Referenced by makemaz(), and mkinvpos().
void add_door | ( | int | x, |
int | y, | ||
struct mkroom * | aroom | ||
) |
References mkroom::doorct, doorindex, doors, mkroom::fdoor, mkroom::hx, nhcoord::x, and nhcoord::y.
Referenced by create_door(), create_secret_door(), dosdoor(), and sel_set_door().
References do_room_or_subroom(), mkroom::hx, nroom, rooms, and TRUE.
Referenced by create_room(), join_map(), makelevel(), mk_split_room(), and spo_region().
void add_subroom | ( | struct mkroom * | proom, |
int | lowx, | ||
int | lowy, | ||
int | hix, | ||
int | hiy, | ||
boolean | lit, | ||
schar | rtype, | ||
boolean | special | ||
) |
References do_room_or_subroom(), FALSE, mkroom::hx, nsubroom, and subrooms.
Referenced by create_subroom().
STATIC_OVL void clear_level_structures | ( | ) |
References dlevel_t::buriedobjlist, clear_regions(), cmap_to_glyph, COLNO, dlevel_t::damagelist, doorindex, FALSE, dlevel_t::flags, mkroom::hx, init_rect(), init_vault, level, levl, dlevel_t::mon_gen, dlevel_t::monlist, dlevel_t::monsters, levelflags::nfountains, nroom, levelflags::nsinks, nsubroom, dlevel_t::objects, dlevel_t::objlist, rooms, ROWNO, S_stone, dlevel_t::sounds, sstairs, subrooms, stairway::sx, stairway::sy, xdnladder, xdnstair, xupladder, xupstair, ydnladder, ydnstair, yupladder, and yupstair.
Referenced by makelevel().
STATIC_PTR int CFDECLSPEC do_comp | ( | genericptr | vx, |
const genericptr | vy | ||
) | const |
References mkroom::lx.
void dodoor | ( | int | x, |
int | y, | ||
struct mkroom * | aroom | ||
) |
References add_door(), D_CLOSED, D_ISOPEN, D_LOCKED, D_NODOOR, D_TRAPPED, DOOR, doormask, FALSE, G_GONE, in_rooms(), IS_WALL, level_difficulty(), levl, makemon(), mkclass(), mvitals::mvflags, NO_MM_FLAGS, PM_GIANT_MIMIC, PM_LARGE_MIMIC, PM_SMALL_MIMIC, rn2(), S_MIMIC, set_mimic_sym(), SHOPBASE, and TRUE.
Referenced by dodoor(), and makeniche().
STATIC_DCL void FDECL | ( | mkfount | , |
(int, struct mkroom *) | |||
) |
STATIC_DCL void FDECL | ( | join | , |
(int, int, BOOLEAN_P) | |||
) |
STATIC_DCL boolean FDECL | ( | bydoor | , |
(XCHAR_P, XCHAR_P) | |||
) |
STATIC_DCL void FDECL | ( | do_room_or_subroom | , |
(struct mkroom *, int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | finddpos | , |
(coord *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P) | |||
) |
STATIC_DCL void FDECL | ( | mkaltar | , |
(struct mkroom *) | |||
) |
STATIC_DCL void FDECL | ( | mkinvpos | , |
(XCHAR_P, XCHAR_P, int) | |||
) |
STATIC_DCL void FDECL | ( | mk_knox_portal | , |
(XCHAR_P, XCHAR_P) | |||
) |
STATIC_DCL struct mkroom* FDECL | ( | pos_to_room | , |
(XCHAR_P, XCHAR_P) | |||
) | [read] |
STATIC_DCL void FDECL | ( | mkgrave | , |
(struct mkroom *) | |||
) |
STATIC_DCL void FDECL | ( | makeniche | , |
(int) | |||
) |
STATIC_PTR int FDECL | ( | CFDECLSPEC | do_comp, |
(const genericptr, const genericptr) | |||
) |
STATIC_DCL void FDECL | ( | dosdoor | , |
(XCHAR_P, XCHAR_P, struct mkroom *, int) | |||
) |
References CORR, dnstairs_room, levl, mazexy(), nroom, occupied(), OROOM, rn2(), ROOM, rooms, mkroom::rtype, somexy(), and upstairs_room.
Referenced by place_branch().
References IS_DOOR, levl, okdoor(), rn2(), SDOOR, and nhcoord::x.
Referenced by join(), and place_niche().
STATIC_OVL void join | ( | int | a, |
int | b, | ||
boolean | nxcor | ||
) |
References CORR, dig_corridor(), dodoor(), doorindex, DOORMAX, finddpos(), dlevel_t::flags, mkroom::hx, mkroom::hy, level, levl, mkroom::lx, mkroom::ly, okdoor(), ROOM, rooms, smeq, STONE, nhcoord::x, and nhcoord::y.
Referenced by makecorridors(), and mkmap().
void make_ironbarwalls | ( | int | chance ) |
STATIC_OVL void make_niches | ( | ) |
References depth(), FALSE, dlevel_t::flags, level, LEVEL_TELEP, makeniche(), NO_TRAP, nroom, rn2(), rnd(), TRAPDOOR, u, and you::uz.
Referenced by makelevel().
void makecorridors | ( | int | style ) |
References mkroom::doorct, FALSE, join(), nroom, rn2(), rooms, smeq, and TRUE.
Referenced by create_corridor(), and makelevel().
STATIC_OVL void makelevel | ( | ) |
References add_room(), ANTHOLE, ARMORY, BARRACKS, BEEHIVE, BUFSZ, check_room(), CHEST, clear_level_structures(), COCKNEST, COURT, create_vault, monst::data, depth(), s_level::dlevel, d_level::dlevel, d_level::dnum, do_vault, dungeons, FALSE, Role::filecode, fill_room(), find_level(), dlevel_t::flags, G_GONE, GARDEN, mkroom::hx, In_hell(), In_mines(), In_quest(), init_dungeons(), Invocation_lev(), IRON_SAFE, Is_botlevel(), Is_branchlev(), IS_FURNITURE, IS_POOL, Is_rogue_level, Is_special(), LARGE_BOX, LEPREHALL, level, level_difficulty(), levl, mkroom::lx, mkroom::ly, make_engr_at(), make_ironbarwalls(), make_niches(), makecorridors(), makemaz(), makemon(), makerooms(), maketrap(), makevtele(), MARK, medusa_level, mk_knox_portal(), mkaltar(), mkcorpstat(), mkfount(), mkgold(), mkgrave(), mkobj_at(), mkroom(), mksobj_at(), mkstairs(), mktrap(), mons, MORGUE, nh_getenv(), NO_MM_FLAGS, nroom, occupied(), oinit(), OROOM, place_branch(), PM_COCKATRICE, PM_GIANT_SPIDER, PM_KILLER_BEE, PM_LEPRECHAUN, PM_RUST_MONSTER, PM_SOLDIER, dungeon::proto, s_level::proto, random_engraving(), rn2(), rnd_rect(), ROOM, rooms, mkroom::rtype, SHOPBASE, somex(), somey(), sort_rooms(), Sprintf, STATUE, Strcat, SWAMP, TEMPLE, TRUE, u, you::uhave, urole, you::uz, VAULT, WEB, wiz1_level, wizard, and ZOO.
Referenced by mklev().
STATIC_OVL void makeniche | ( | int | trap_type ) |
References Can_fall_thru(), CORPSE, CORR, DOOR, mkroom::doorct, doorindex, DOORMAX, dosdoor(), DUST, FALSE, dlevel_t::flags, HOLE, IRONBARS, IS_WALL, level, levl, make_engr_at(), maketrap(), mkclass(), mkcorpstat(), mkobj_at(), mksobj_at(), nroom, OROOM, place_niche(), rn2(), ROCKTRAP, rooms, mkroom::rtype, S_HUMAN, SCORR, SCR_TELEPORTATION, SDOOR, TRAPDOOR, TRUE, rm::typ, u, you::uz, and wipe_engr_at().
Referenced by make_niches(), and makevtele().
STATIC_OVL void makerooms | ( | ) |
References create_room(), create_vault, FALSE, mkroom::hx, mkroom::lx, mkroom::ly, MAXNROFROOMS, nroom, OROOM, rn2(), rnd_rect(), rooms, and TRUE.
Referenced by makelevel().
STATIC_OVL void makevtele | ( | ) |
References makeniche(), and TELEP_TRAP.
Referenced by makelevel().
STATIC_OVL void mineralize | ( | ) |
References add_to_buried(), COLNO, dealloc_obj(), depth(), dunlev(), FALSE, s_level::flags, dlevel_t::flags, GEM_CLASS, GOLD_PIECE, In_endgame, In_hell(), In_mines(), In_quest(), In_V_tower(), Is_oracle_level, Is_rogue_level, Is_special(), KELP_FROND, level, levl, mkobj(), mksobj(), mksobj_at(), MOAT, otmp, obj::otyp, obj::owt, obj::ox, obj::oy, place_object(), POOL, obj::quan, rn2(), rnd(), ROCK, ROWNO, STONE, TRUE, u, you::uz, W_NONDIGGABLE, wall_info, and weight().
Referenced by mklev().
References at_dgn_entrance(), depth(), d_level::dnum, dungeon_branch(), branch::end1, branch::end2, insert_branch(), Is_branchlev(), knox_level, medusa_level, n_dgns, on_level(), oracle_level, place_branch(), pline(), rn2(), TRUE, u, you::uz, wizard, and WIZARD.
Referenced by makelevel().
void mk_split_room | ( | ) |
References add_room(), check_room(), depth(), FALSE, nhrect::hx, mkroom::hx, nhrect::hy, mkroom::hy, nhrect::lx, mkroom::lx, nhrect::ly, mkroom::ly, nroom, OROOM, mkroom::rlit, rn1, rn2(), rnd(), rnd_rect(), rooms, smeq, split_rects(), topologize(), TRUE, u, and you::uz.
STATIC_OVL void mkaltar | ( | struct mkroom * | croom ) |
References A_LAWFUL, Align2amask, ALTAR, bydoor(), levl, m, occupied(), OROOM, rn2(), somexy(), nhcoord::x, and nhcoord::y.
Referenced by makelevel().
STATIC_OVL void mkfount | ( | int | mazeflag, |
struct mkroom * | croom | ||
) |
References bydoor(), dlevel_t::flags, FOUNTAIN, level, levl, m, mazexy(), levelflags::nfountains, occupied(), rn2(), somexy(), nhcoord::x, and nhcoord::y.
Referenced by makelevel().
static void mkgrave | ( | struct mkroom * | croom ) | [static] |
References add_to_buried(), BELL, bydoor(), curse(), FALSE, m, make_grave(), mkgold(), mkobj(), mksobj_at(), occupied(), OROOM, otmp, obj::ox, obj::oy, RANDOM_CLASS, rn2(), somexy(), TRUE, nhcoord::x, and nhcoord::y.
Referenced by makelevel().
void mkinvokearea | ( | ) |
References delay_output, display_nhwindow, flush_screen(), inv_pos, mkinvpos(), mkstairs(), newsym(), TRUE, u, you::ux, you::uy, vision_full_recalc, WIN_MESSAGE, nhcoord::x, xmax, xmin, nhcoord::y, ymax, and ymin.
Referenced by deadbook().
References BOULDER, COULD_SEE, deltrap(), FALSE, FIRE_TRAP, fracture_rock(), IN_SIGHT, is_pool(), levl, maketrap(), MOAT, newsym(), obfree(), obj_extract_self(), otmp, ROOM, rm::seenv, sobj_at(), t_at(), TRUE, rm::typ, unblock_point(), viz_array, within_bounded_area, x_maze_max, x_maze_min, y_maze_max, and y_maze_min.
Referenced by mkinvokearea().
void mklev | ( | ) |
References bound_digging(), FALSE, dlevel_t::flags, getbones(), in_mklev, init_mapseen(), level, makelevel(), mineralize(), nroom, place_random_engravings(), rooms, set_wall_state(), topologize(), TRUE, u, and you::uz.
Referenced by goto_level(), and newgame().
void mkpoolroom | ( | ) |
References mkroom::hx, mkroom::hy, LAVAPOOL, mkroom::lx, mkroom::ly, pick_room(), POOL, POOLROOM, mkroom::rlit, rn2(), ROOM, mkroom::rtype, TRUE, and wallwalk_right().
Referenced by mkroom(), and mkshop().
References dnstairs_room, dunlev(), dunlevs_in_dungeon(), LA_DOWN, LA_UP, levl, STAIRS, u, upstairs_room, you::uz, xdnstair, xupstair, ydnstair, and yupstair.
Referenced by create_stairs(), makelevel(), makemaz(), mkinvokearea(), put_lregion_here(), and spo_stair().
References ARROW_TRAP, BEAR_TRAP, BOULDER, Can_fall_thru(), DART_TRAP, FIRE_TRAP, dlevel_t::flags, HOLE, Inhell, is_pool(), Is_rogue_level, LANDMINE, level, level_difficulty(), LEVEL_TELEP, m, MAGIC_PORTAL, makemon(), maketrap(), mazexy(), mons, NO_MM_FLAGS, NO_TRAP, occupied(), PIT, PM_GIANT_SPIDER, POLY_TRAP, rn2(), rnd(), ROCKTRAP, ROLLING_BOULDER_TRAP, RUST_TRAP, SLP_GAS_TRAP, sobj_at(), somexy(), SPIKED_PIT, STATUE_TRAP, TELEP_TRAP, TRAPDOOR, TRAPNUM, u, you::uz, WEB, nhcoord::x, and nhcoord::y.
Referenced by create_trap(), makelevel(), and makemaz().
STATIC_DCL void NDECL | ( | make_niches | ) |
STATIC_DCL void NDECL | ( | mineralize | ) |
STATIC_DCL void NDECL | ( | makerooms | ) |
STATIC_DCL void NDECL | ( | clear_level_structures | ) |
STATIC_DCL void NDECL | ( | place_random_engravings | ) |
STATIC_DCL void NDECL | ( | makelevel | ) |
STATIC_DCL void NDECL | ( | makevtele | ) |
References invocation_pos(), IS_FURNITURE, is_lava(), is_pool(), levl, and t_at().
Referenced by bad_location(), fill_zoo(), find_branch_room(), goto_level(), makelevel(), makemaz(), mkaltar(), mkfount(), mkgrave(), mktrap(), and place_random_engraving().
References bydoor(), doorindex, DOORMAX, HWALL, levl, and VWALL.
Referenced by create_door(), create_secret_door(), finddpos(), and join().
References assign_level(), BR_NO_END1, BR_NO_END2, BR_PORTAL, d_level::dlevel, d_level::dnum, find_branch_room(), LA_DOWN, LA_UP, levl, m, mkportal(), on_level(), pos_to_room(), sstairs, sstairs_room, STAIRS, stairway::sx, stairway::sy, stairway::tolev, TRUE, u, stairway::up, you::uz, nhcoord::x, and nhcoord::y.
Referenced by makelevel(), makemaz(), mk_knox_portal(), place_lregion(), and put_lregion_here().
References finddpos(), IS_FURNITURE, IS_POOL, isok(), levl, rn2(), STONE, nhcoord::x, and nhcoord::y.
Referenced by makeniche().
void place_random_engraving | ( | engravings | , |
const int | size | ||
) | const |
References BURN, COLNO, Inhell, make_engr_at(), nroom, occupied(), rn2(), rooms, ROWNO, somex(), and somey().
Referenced by place_random_engravings().
void place_random_engravings | ( | ) |
References inside_room(), nroom, and rooms.
Referenced by place_branch().
void sort_rooms | ( | ) |
void topologize | ( | struct mkroom * | croom ) |
References Is_rogue_level, levl, NO_ROOM, mkroom::nsubrooms, OROOM, ROOMOFFSET, rooms, mkroom::rtype, SHARED, TRUE, u, and you::uz.
Referenced by build_room(), mk_split_room(), mklev(), mkshop(), and spo_region().
References bydoor(), isok(), levl, rn2(), SET_TYPLIT, and t_at().
Referenced by mkpoolroom(), and spo_wallwalk().
const char* const hhgtg_engravings[] [static] |
{ "Beeblebrox for President!", "Don't Panic", "Got your towel?", "Time is an illusion. Lunchtime doubly so.", "Oh no, not again.", "Resistance is useless!", "Slartibartfast was here!", "So long, and thanks for all the fish", "Visit Milliways, the Restaurant at the End of the Universe!", "We apologize for the inconvenience", }
const char* const illuminati_engravings[] [static] |
{ "Ewige Blumenkraft!", "Ewige Blumenkraft Und Ewige Schlangenkraft", "fnord", "FUCKUP calculates your odds of ascending as negligibly small", "Hail Eris!", "Jeder Gedanke ist verschenkt, wenn Adam Weishaupt fuer dich denkt", "Novus Ordo Seclorum", "Think for yourself, schmuck", }
boolean made_branch [static] |
NEARDATA const char* trap_engravings[TRAPNUM] [static] |
{ (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, "Vlad was here", "ad aerarium", "ad aerarium", (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, }