#include "hack.h"
#include "sp_lev.h"
#include "lev.h"
Defines | |
#define | x_maze_min 2 |
#define | y_maze_min 2 |
#define | INVPOS_X_MARGIN (6 - 2) |
#define | INVPOS_Y_MARGIN (5 - 2) |
#define | INVPOS_DISTANCE 11 |
#define | register |
#define | CONS_OBJ 0 |
#define | CONS_MON 1 |
#define | CONS_HERO 2 |
#define | CONS_TRAP 3 |
#define | bxmin (xmin + 1) |
#define | bymin (ymin + 1) |
#define | bxmax (xmax - 1) |
#define | bymax (ymax - 1) |
Functions | |
STATIC_DCL boolean | FDECL (iswall,(int, int)) |
STATIC_DCL boolean | FDECL (iswall_or_stone,(int, int)) |
STATIC_DCL boolean | FDECL (is_solid,(int, int)) |
STATIC_DCL int | FDECL (extend_spine,(int[3][3], int, int, int)) |
STATIC_DCL boolean | FDECL (okay,(int, int, int)) |
STATIC_DCL void | FDECL (maze0xy,(coord *)) |
STATIC_DCL boolean | FDECL (put_lregion_here,(XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, BOOLEAN_P, d_level *)) |
STATIC_DCL void | NDECL (fixup_special) |
STATIC_DCL void | FDECL (move,(int *, int *, int)) |
STATIC_DCL void | NDECL (setup_waterlevel) |
STATIC_DCL void | NDECL (unsetup_waterlevel) |
STATIC_OVL boolean | iswall (int x, int y) |
STATIC_OVL boolean | iswall_or_stone (int x, int y) |
STATIC_OVL boolean | is_solid (int x, int y) |
STATIC_OVL int | extend_spine (locale, int wall_there, int dx, int dy) |
void | wallification (int x1, int y1, int x2, int y2) |
void | wall_extends (int x1, int y1, int x2, int y2) |
STATIC_OVL boolean | okay (int x, int y, int dir) |
STATIC_OVL void | maze0xy (coord *cc) |
boolean | bad_location (xchar x, xchar y, xchar lx, xchar ly, xchar hx, xchar hy) |
void | place_lregion (xchar lx, xchar ly, xchar hx, xchar hy, xchar nlx, xchar nly, xchar nhx, xchar nhy, xchar rtype, d_level *lev) |
STATIC_OVL boolean | put_lregion_here (xchar x, xchar y, xchar nlx, xchar nly, xchar nhx, xchar nhy, xchar rtype, boolean oneshot, d_level *lev) |
STATIC_OVL void | fixup_special () |
void | makemaz (const char *s) |
void | walkfrom (int x, int y, schar typ) |
STATIC_OVL void | move (int *x, int *y, int dir) |
void | mazexy (coord *cc) |
void | bound_digging () |
void | mkportal (xchar x, xchar y, xchar todnum, xchar todlevel) |
STATIC_DCL void | NDECL (set_wportal) |
STATIC_DCL void | FDECL (mk_bubble,(int, int, int)) |
STATIC_DCL void | FDECL (mv_bubble,(struct bubble *, int, int, BOOLEAN_P)) |
void | movebubbles () |
void | water_friction () |
void | save_waterlevel (int fd, int mode) |
void | restore_waterlevel (int fd) |
const char * | waterbody_name (xchar x, xchar y) |
STATIC_OVL void | set_wportal () |
STATIC_OVL void | setup_waterlevel () |
STATIC_OVL void | unsetup_waterlevel () |
STATIC_OVL void | mk_bubble (int x, int y, int n) |
STATIC_OVL void | mv_bubble (struct bubble *b, int dx, int dy, boolean ini) |
Variables | |
char * | lev_message |
lev_region * | lregions |
int | num_lregions |
char | SpLev_Map [COLNO][ROWNO] |
static boolean | was_waterlevel |
static struct bubble * | bbubbles |
static struct bubble * | ebubbles |
static struct trap * | wportal |
static int | xmin |
static int | ymin |
static int | xmax |
static int | ymax |
#define bxmax (xmax - 1) |
Referenced by mk_bubble(), mv_bubble(), and setup_waterlevel().
#define bxmin (xmin + 1) |
Referenced by mv_bubble(), and setup_waterlevel().
#define bymax (ymax - 1) |
Referenced by mk_bubble(), mv_bubble(), and setup_waterlevel().
#define bymin (ymin + 1) |
Referenced by mv_bubble(), and setup_waterlevel().
#define CONS_HERO 2 |
Referenced by movebubbles(), and mv_bubble().
#define CONS_MON 1 |
Referenced by movebubbles(), and mv_bubble().
#define CONS_OBJ 0 |
Referenced by movebubbles(), and mv_bubble().
#define CONS_TRAP 3 |
Referenced by movebubbles(), and mv_bubble().
#define INVPOS_DISTANCE 11 |
Referenced by makemaz().
#define INVPOS_X_MARGIN (6 - 2) |
Referenced by makemaz().
#define INVPOS_Y_MARGIN (5 - 2) |
Referenced by makemaz().
#define register |
#define x_maze_min 2 |
#define y_maze_min 2 |
References AIR, CORR, dlevel_t::flags, level, levl, occupied(), ROOM, rm::typ, and within_bounded_area.
Referenced by put_lregion_here().
void bound_digging | ( | ) |
STATIC_OVL int extend_spine | ( | locale | , |
int | wall_there, | ||
int | dx, | ||
int | dy | ||
) |
STATIC_DCL int FDECL | ( | extend_spine | , |
(int[3][3], int, int, int) | |||
) |
STATIC_DCL void FDECL | ( | mv_bubble | , |
(struct bubble *, int, int, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | move | , |
(int *, int *, int) | |||
) |
STATIC_DCL boolean FDECL | ( | iswall_or_stone | , |
(int, int) | |||
) |
STATIC_DCL boolean FDECL | ( | okay | , |
(int, int, int) | |||
) |
STATIC_DCL void FDECL | ( | maze0xy | , |
(coord *) | |||
) |
STATIC_DCL boolean FDECL | ( | iswall | , |
(int, int) | |||
) |
STATIC_DCL boolean FDECL | ( | is_solid | , |
(int, int) | |||
) |
STATIC_DCL boolean FDECL | ( | put_lregion_here | , |
(XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, BOOLEAN_P, d_level *) | |||
) |
STATIC_DCL void FDECL | ( | mk_bubble | , |
(int, int, int) | |||
) |
STATIC_OVL void fixup_special | ( | ) |
References AMULET_OF_ESP, AMULET_OF_LIFE_SAVING, AMULET_OF_REFLECTION, BAG_OF_HOLDING, BURN, CLOAK_OF_DISPLACEMENT, CLOAK_OF_MAGIC_RESISTANCE, obj::corpsenm, create_secret_door(), lev_region::delarea, s_level::dlevel, d_level::dlevel, dndest, dunlev(), engr::engr_txt, engr::engr_type, engr::engr_x, engr::engr_y, FALSE, find_level(), dlevel_t::flags, fmon, goodpos(), head_engr, dest_area::hx, dest_area::hy, In_sokoban, lev_region::inarea, index, Is_branchlev(), Is_knox, Is_medusa_level, is_pool(), Is_sanctum, is_solid(), Is_waterlevel, Is_wiz1_level, LANDMINE, lev_message, level, LR_BRANCH, LR_DOWNSTAIR, LR_DOWNTELE, LR_PORTAL, LR_TELE, LR_UPSTAIR, LR_UPTELE, lregions, mkroom::lx, dest_area::lx, mkroom::ly, dest_area::ly, maketrap(), mk_tt_object(), mkcorpstat(), mkgold(), mksobj_at(), mongone(), mons, MORGUE, MR_STONE, dest_area::nhx, dest_area::nhy, dest_area::nlx, dest_area::nly, monst::nmon, num_lregions, engr::nxt_engr, on_level(), orcus_level, OROOM, otmp, obj::owt, place_lregion(), pline(), pm_resistance, poly_when_stoned(), rn1, rn2(), lev_region::rname, rnd(), rndmonnum(), rooms, mkroom::rtype, lev_region::rtype, search_special(), setup_waterlevel(), somex(), somey(), SPIKED_PIT, STATUE, str_or_len::str, STRANGE_OBJECT, TEMPLE, TRUE, u, unsetup_waterlevel(), updest, you::uz, W_ANY, W_EAST, W_WEST, weight(), lev_region::x1, lev_region::x2, lev_region::y1, and lev_region::y2.
Referenced by makemaz().
STATIC_OVL boolean is_solid | ( | int | x, |
int | y | ||
) |
References IS_STWALL, isok(), and levl.
Referenced by fixup_special(), and wallification().
STATIC_OVL boolean iswall | ( | int | x, |
int | y | ||
) |
STATIC_OVL boolean iswall_or_stone | ( | int | x, |
int | y | ||
) |
void makemaz | ( | const char * | s ) |
References BOULDER, distmin(), dmonsfree(), d_level::dnum, dungeons, dunlev(), dunlevs_in_dungeon(), DUST, FALSE, fixup_special(), dlevel_t::flags, GEM_CLASS, getenv, HWALL, index, inv_pos, Invocation_lev(), INVPOS_DISTANCE, INVPOS_X_MARGIN, INVPOS_Y_MARGIN, Is_branchlev(), Is_special(), LEV_EXT, level, levl, load_special(), make_engr_at(), makemon(), maze0xy(), mazexy(), mkgold(), mkobj_at(), mksobj_at(), mkstairs(), mktrap(), mons, NO_MM_FLAGS, occupied(), place_branch(), PM_ARCHEOLOGIST, PM_MINOTAUR, dungeon::proto, rindex, rn1, rn2(), rnd(), s_level::rndlevs, Role_if, SPACE_POS, Sprintf, STONE, Strcat, Strcpy, TRUE, u, you::uz, walkfrom(), wallification(), wizard, nhcoord::x, x_maze_max, x_maze_min, xupstair, nhcoord::y, y_maze_max, y_maze_min, and yupstair.
Referenced by makelevel().
STATIC_OVL void maze0xy | ( | coord * | cc ) |
References rn2(), nhcoord::x, x_maze_max, and y_maze_max.
Referenced by makemaz().
void mazexy | ( | coord * | cc ) |
References CORR, levl, rn2(), ROOM, WALLIFIED_MAZE, nhcoord::x, x_maze_max, and y_maze_max.
Referenced by find_branch_room(), getlev(), makemaz(), mkfount(), and mktrap().
STATIC_OVL void mk_bubble | ( | int | x, |
int | y, | ||
int | n | ||
) |
References bubble::bm, bxmax, bymax, bubble::cons, bubble::dx, bubble::dy, ebubbles, mv_bubble(), bubble::next, bubble::prev, rn2(), SIZE, TRUE, bubble::x, and bubble::y.
Referenced by setup_waterlevel().
References d_level::dlevel, d_level::dnum, trap::dst, dungeons, MAGIC_PORTAL, maketrap(), and pline().
Referenced by place_branch(), and put_lregion_here().
STATIC_OVL void move | ( | int * | x, |
int * | y, | ||
int | dir | ||
) |
void movebubbles | ( | ) |
References block_point(), bubble::bm, cmap_to_glyph, bubble::cons, CONS_HERO, CONS_MON, CONS_OBJ, CONS_TRAP, bubble::dx, bubble::dy, FALSE, isok(), level, levl, container::list, m_at, mon, MON_AT, mv_bubble(), monst::mx, monst::my, newsym(), container::next, bubble::next, OBJ_AT, dlevel_t::objects, otmp, obj::ox, obj::oy, placebc(), bubble::prev, Punished, remove_monster(), remove_object(), remove_worm(), rn2(), S_water, set_wportal(), t_at(), u, unplacebc(), you::ux, you::uy, vision_full_recalc, vision_recalc(), WATER, container::what, container::x, bubble::x, container::y, and bubble::y.
Referenced by goto_level(), and moveloop().
References AIR, bxmax, bxmin, bymax, bymin, CONS_HERO, CONS_MON, CONS_OBJ, CONS_TRAP, levl, container::list, m_at, mnearto(), mnexto(), mon, MON_AT, newsym(), container::next, otmp, place_object(), pline(), rn2(), sgn(), TRUE, trap::tx, trap::ty, u, unblock_point(), you::ux, you::uy, container::what, container::x, bubble::x, container::y, and bubble::y.
Referenced by mk_bubble(), movebubbles(), and restore_waterlevel().
STATIC_DCL void NDECL | ( | set_wportal | ) |
STATIC_DCL void NDECL | ( | setup_waterlevel | ) |
STATIC_DCL void NDECL | ( | unsetup_waterlevel | ) |
STATIC_DCL void NDECL | ( | fixup_special | ) |
STATIC_OVL boolean okay | ( | int | x, |
int | y, | ||
int | dir | ||
) |
References FALSE, levl, move(), TRUE, rm::typ, x_maze_max, and y_maze_max.
Referenced by walkfrom().
void place_lregion | ( | xchar | lx, |
xchar | ly, | ||
xchar | hx, | ||
xchar | hy, | ||
xchar | nlx, | ||
xchar | nly, | ||
xchar | nhx, | ||
xchar | nhy, | ||
xchar | rtype, | ||
d_level * | lev | ||
) |
References COLNO, Is_branchlev(), LR_BRANCH, nroom, place_branch(), put_lregion_here(), rn1, ROWNO, TRUE, u, and you::uz.
Referenced by fixup_special(), and goto_level().
STATIC_OVL boolean put_lregion_here | ( | xchar | x, |
xchar | y, | ||
xchar | nlx, | ||
xchar | nly, | ||
xchar | nhx, | ||
xchar | nhy, | ||
xchar | rtype, | ||
boolean | oneshot, | ||
d_level * | lev | ||
) |
References bad_location(), deltrap(), d_level::dlevel, d_level::dnum, FALSE, Is_branchlev(), LR_BRANCH, LR_DOWNSTAIR, LR_DOWNTELE, LR_PORTAL, LR_TELE, LR_UPSTAIR, LR_UPTELE, m_at, MAGIC_PORTAL, mkportal(), mkstairs(), MON_AT, place_branch(), rloc(), t_at(), TRUE, u, u_on_newpos(), and you::uz.
Referenced by place_lregion().
void restore_waterlevel | ( | int | fd ) |
References Is_waterlevel, mread(), mv_bubble(), bubble::next, bubble::prev, set_wportal(), TRUE, u, and you::uz.
Referenced by restgamestate().
void save_waterlevel | ( | int | fd, |
int | mode | ||
) |
References bwrite(), Is_waterlevel, bubble::next, perform_bwrite, release_data, u, unsetup_waterlevel(), and you::uz.
Referenced by savegamestate().
STATIC_OVL void set_wportal | ( | ) |
References ftrap, MAGIC_PORTAL, trap::ntrap, and wportal.
Referenced by movebubbles(), and restore_waterlevel().
STATIC_OVL void setup_waterlevel | ( | ) |
References bxmax, bxmin, bymax, bymin, cmap_to_glyph, rm::glyph, levl, mk_bubble(), rn2(), S_water, xmax, and ymax.
Referenced by fixup_special().
STATIC_OVL void unsetup_waterlevel | ( | ) |
References bubble::next.
Referenced by fixup_special(), and save_waterlevel().
void walkfrom | ( | int | x, |
int | y, | ||
schar | typ | ||
) |
void wall_extends | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
References BLCORNER, BRCORNER, COLNO, CROSSWALL, DBWALL, extend_spine(), HWALL, IS_WALL, iswall(), iswall_or_stone(), levl, ROWNO, TDWALL, TLCORNER, TLWALL, TRCORNER, TRWALL, TUWALL, rm::typ, and VWALL.
Referenced by flip_level(), and wallification().
void wallification | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
References COLNO, DBWALL, is_solid(), IS_WALL, levl, ROWNO, STONE, rm::typ, and wall_extends().
Referenced by do_room_or_subroom(), makemaz(), and sp_level_coder().
void water_friction | ( | ) |
References DB_ICE, DB_MOAT, DB_UNDER, DRAWBRIDGE_UP, drawbridgemask, ICE, Is_juiblex_level, is_lava(), Is_medusa_level, Is_waterlevel, isok(), levl, POOL, rm::typ, u, you::uz, and WATER.
Referenced by boulder_hits_pool(), and dodip().
Referenced by mk_bubble().
char* lev_message |
Referenced by fixup_special().
Referenced by fixup_special(), and spo_levregion().
int num_lregions |
Referenced by fixup_special(), and flip_level().
char SpLev_Map[COLNO][ROWNO] |
Referenced by sp_level_coder(), and walkfrom().
boolean was_waterlevel [static] |
Referenced by set_wportal().
int xmax |
Referenced by bound_digging(), enexto_core_range(), mkcavearea(), mkinvokearea(), and setup_waterlevel().
int xmin [static] |
Referenced by bound_digging(), enexto_core_range(), mkcavearea(), and mkinvokearea().
int ymax |
Referenced by bound_digging(), check_room(), enexto_core_range(), mkcavearea(), mkinvokearea(), and setup_waterlevel().
int ymin |
Referenced by bound_digging(), enexto_core_range(), mkcavearea(), and mkinvokearea().