Defines | Functions | Variables

sp_lev.c File Reference

#include "hack.h"
#include "dlb.h"
#include "sp_lev.h"
#include "rect.h"
#include "epri.h"
#include "eshk.h"
Include dependency graph for sp_lev.c:

Defines

#define LEFT   1
#define H_LEFT   2
#define CENTER   3
#define H_RIGHT   4
#define RIGHT   5
#define TOP   1
#define BOTTOM   5
#define XLIM   4
#define YLIM   3
#define Fread   (void)dlb_fread
#define Fgetc   (schar)dlb_fgetc
#define Free(ptr)   if(ptr) free((genericptr_t) (ptr))
#define SPLEV_STACK_RESERVE   128
#define OV_typ(o)   (o->spovartyp)
#define OV_i(o)   (o->vardata.l)
#define OV_s(o)   (o->vardata.str)
#define OV_pop_i(x)   (x = splev_stack_getdat(coder, SPOVAR_INT))
#define OV_pop_c(x)   (x = splev_stack_getdat(coder, SPOVAR_COORD))
#define OV_pop_r(x)   (x = splev_stack_getdat(coder, SPOVAR_REGION))
#define OV_pop_s(x)   (x = splev_stack_getdat(coder, SPOVAR_STRING))
#define OV_pop(x)   (x = splev_stack_getdat_any(coder))
#define OV_pop_typ(x, typ)   (x = splev_stack_getdat(coder, typ))
#define opvar_free(ov)   { if (ov) { opvar_free_x(ov); ov = NULL; } else impossible("opvar_free(), %s", __FUNCTION__); }
#define DRY   0x1
#define WET   0x2
#define SEL_FLOOD_STACK   (COLNO*ROWNO)
#define SEL_FLOOD(nx, ny)   {if (idx<SEL_FLOOD_STACK) { dx[idx]=(nx); dy[idx]=(ny); idx++; } else panic("floodfill stack overrun");}

Functions

void FDECL (mkmap,(lev_init *))
STATIC_DCL void FDECL (get_room_loc,(schar *, schar *, struct mkroom *))
STATIC_DCL void FDECL (get_free_room_loc,(schar *, schar *, struct mkroom *))
STATIC_DCL void FDECL (create_trap,(trap *, struct mkroom *))
STATIC_DCL int FDECL (noncoalignment,(ALIGNTYP_P))
STATIC_DCL void FDECL (create_monster,(monster *, struct mkroom *))
STATIC_DCL void FDECL (create_object,(object *, struct mkroom *))
STATIC_DCL void FDECL (create_engraving,(engraving *, struct mkroom *))
STATIC_DCL void FDECL (create_stairs,(stair *, struct mkroom *))
STATIC_DCL void FDECL (create_altar,(altar *, struct mkroom *))
STATIC_DCL void FDECL (create_gold,(gold *, struct mkroom *))
STATIC_DCL void FDECL (create_feature,(int, int, struct mkroom *, int))
STATIC_DCL boolean FDECL (search_door,(struct mkroom *, xchar *, xchar *, XCHAR_P, int))
STATIC_DCL void NDECL (fix_stair_rooms)
STATIC_DCL void FDECL (create_corridor,(corridor *))
STATIC_DCL void NDECL (count_features)
STATIC_DCL boolean FDECL (create_subroom,(struct mkroom *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P))
STATIC_DCL void FDECL (set_wall_property,(XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, int))
STATIC_DCL int NDECL (rnddoor)
STATIC_DCL int NDECL (rndtrap)
STATIC_DCL void FDECL (get_location,(schar *, schar *, int, struct mkroom *))
STATIC_DCL void FDECL (light_region,(region *))
STATIC_DCL void FDECL (load_one_monster,(dlb *, monster *))
STATIC_DCL void FDECL (load_one_object,(dlb *, object *))
STATIC_DCL void FDECL (load_one_engraving,(dlb *, engraving *))
STATIC_DCL void FDECL (maze1xy,(coord *, int))
STATIC_DCL boolean FDECL (sp_level_loader,(dlb *, sp_lev *))
STATIC_DCL void FDECL (create_door,(room_door *, struct mkroom *))
STATIC_DCL struct mkroomFDECL (build_room,(room *, struct mkroom *))
void splev_stack_init (struct splevstack *st)
void splev_stack_done (struct splevstack *st)
void splev_stack_push (struct splevstack *st, struct opvar *v)
struct opvarsplev_stack_pop (struct splevstack *st)
struct opvaropvar_new_str (char *s)
struct opvaropvar_new_int (long i)
struct opvaropvar_new_coord (int x, int y)
void opvar_free_x (struct opvar *ov)
struct opvaropvar_clone (struct opvar *ov)
struct opvaropvar_var_conversion (struct sp_coder *coder, struct opvar *ov)
struct splev_varopvar_var_defined (struct sp_coder *coder, char *name)
struct opvarsplev_stack_getdat (struct sp_coder *coder, xchar typ)
struct opvarsplev_stack_getdat_any (struct sp_coder *coder)
void variable_list_del (struct splev_var *varlist)
void lvlfill_maze_grid (int x1, int y1, int x2, int y2, schar filling)
void lvlfill_solid (schar filling, schar lit)
void flip_drawbridge_horizontal (struct rm *lev)
void flip_drawbridge_vertical (struct rm *lev)
void flip_level (int flp)
void flip_level_rnd (int flp)
STATIC_OVL void set_wall_property (xchar x1, xchar y1, xchar x2, xchar y2, int prop)
STATIC_OVL void shuffle_alignments ()
STATIC_OVL void count_features ()
void remove_boundary_syms ()
void fill_rooms ()
STATIC_OVL int rnddoor ()
STATIC_OVL int rndtrap ()
STATIC_DCL boolean FDECL (is_ok_location,(SCHAR_P, SCHAR_P, int))
STATIC_OVL void get_location (schar *x, schar *y, int humidity, struct mkroom *croom)
STATIC_OVL boolean is_ok_location (schar x, schar y, int humidity)
STATIC_OVL void get_room_loc (schar *x, schar *y, struct mkroom *croom)
STATIC_OVL void get_free_room_loc (schar *x, schar *y, struct mkroom *croom)
boolean check_room (xchar *lowx, xchar *ddx, xchar *lowy, xchar *ddy, boolean vault)
boolean create_room (xchar x, xchar y, xchar w, xchar h, xchar xal, xchar yal, xchar rtype, xchar rlit)
STATIC_OVL boolean create_subroom (struct mkroom *proom, xchar x, xchar y, xchar w, xchar h, xchar rtype, xchar rlit)
STATIC_OVL void create_door (room_door *dd, struct mkroom *broom)
void create_secret_door (struct mkroom *croom, xchar walls)
STATIC_OVL void create_trap (trap *t, struct mkroom *croom)
STATIC_OVL void spill_terrain (spill *sp, struct mkroom *croom)
STATIC_OVL int noncoalignment (aligntyp alignment)
STATIC_OVL void create_monster (monster *m, struct mkroom *croom)
STATIC_OVL void create_object (object *o, struct mkroom *croom)
STATIC_OVL void create_engraving (engraving *e, struct mkroom *croom)
STATIC_OVL void create_stairs (stair *s, struct mkroom *croom)
STATIC_OVL void create_altar (altar *a, struct mkroom *croom)
STATIC_OVL void create_gold (gold *g, struct mkroom *croom)
STATIC_OVL void create_feature (int fx, int fy, struct mkroom *croom, int typ)
void replace_terrain (replaceterrain *terr, struct mkroom *croom)
void set_terrain (terrain *terr, struct mkroom *croom)
STATIC_OVL boolean search_door (struct mkroom *croom, xchar *x, xchar *y, xchar wall, int cnt)
boolean dig_corridor (coord *org, coord *dest, boolean nxcor, schar ftyp, schar btyp)
STATIC_OVL void fix_stair_rooms ()
STATIC_OVL void create_corridor (corridor *c)
void fill_room (struct mkroom *croom, boolean prefilled)
STATIC_OVL struct mkroombuild_room (room *r, struct mkroom *mkr)
STATIC_OVL void light_region (region *tmpregion)
STATIC_OVL void load_one_monster (dlb *fd, monster *m)
STATIC_OVL void load_one_object (dlb *fd, object *o)
STATIC_OVL void load_one_engraving (dlb *fd, engraving *e)
STATIC_OVL void load_one_room (dlb *fd, room *r)
void wallify_map (int x1, int y1, int x2, int y2)
STATIC_OVL void maze1xy (coord *m, int humidity)
STATIC_OVL void fill_empty_maze ()
STATIC_OVL boolean sp_level_loader (dlb *fd, sp_lev *lvl)
STATIC_OVL boolean sp_level_free (sp_lev *lvl)
void splev_initlev (lev_init *linit)
struct sp_frameframe_new (long execptr)
void frame_del (struct sp_frame *frame)
void spo_frame_push (struct sp_coder *coder)
void spo_frame_pop (struct sp_coder *coder)
long sp_code_jmpaddr (long curpos, long jmpaddr)
void spo_call (struct sp_coder *coder)
void spo_return (struct sp_coder *coder)
void spo_end_moninvent (struct sp_coder *coder)
void spo_pop_container (struct sp_coder *coder)
void spo_message (struct sp_coder *coder)
void spo_monster (struct sp_coder *coder)
void spo_object (struct sp_coder *coder)
void spo_level_flags (struct sp_coder *coder)
void spo_initlevel (struct sp_coder *coder)
void spo_mon_generation (struct sp_coder *coder)
void spo_level_sounds (struct sp_coder *coder)
void spo_engraving (struct sp_coder *coder)
void spo_room (struct sp_coder *coder)
void spo_endroom (struct sp_coder *coder)
void spo_stair (struct sp_coder *coder)
void spo_ladder (struct sp_coder *coder)
void spo_grave (struct sp_coder *coder)
void spo_altar (struct sp_coder *coder)
void spo_wallwalk (struct sp_coder *coder)
void spo_trap (struct sp_coder *coder)
void spo_gold (struct sp_coder *coder)
void spo_corridor (struct sp_coder *coder)
struct opvarselection_opvar (char *nbuf)
char selection_getpoint (int x, int y, struct opvar *ov)
void selection_setpoint (int x, int y, struct opvar *ov, char c)
struct opvarselection_logical_oper (struct opvar *s1, struct opvar *s2, char oper)
void selection_filter_percent (struct opvar *ov, int percent)
int selection_rndcoord (struct opvar *ov, schar *x, schar *y)
void selection_do_grow (struct opvar *ov, int dir)
void selection_floodfill (struct opvar *ov, int x, int y)
void selection_do_ellipse (struct opvar *ov, int xc, int yc, int a, int b, int filled)
void selection_do_line (schar x1, schar y1, schar x2, schar y2, struct opvar *ov)
void selection_do_randline (schar x1, schar y1, schar x2, schar y2, schar rough, schar rec, struct opvar *ov)
void selection_iterate (struct opvar *ov, func, genericptr_t arg)
void sel_set_ter (int x, int y, genericptr_t arg)
void sel_set_feature (int x, int y, genericptr_t arg)
void sel_set_door (int dx, int dy, genericptr_t arg)
void spo_door (struct sp_coder *coder)
void spo_feature (struct sp_coder *coder)
void spo_terrain (struct sp_coder *coder)
void spo_replace_terrain (struct sp_coder *coder)
void spo_spill (struct sp_coder *coder)
void spo_levregion (struct sp_coder *coder)
void spo_region (struct sp_coder *coder)
void spo_drawbridge (struct sp_coder *coder)
void spo_mazewalk (struct sp_coder *coder)
void spo_wall_property (struct sp_coder *coder)
void spo_room_door (struct sp_coder *coder)
void spo_wallify (struct sp_coder *coder)
void spo_map (struct sp_coder *coder)
void spo_jmp (struct sp_coder *coder, sp_lev *lvl)
void spo_conditional_jump (struct sp_coder *coder, sp_lev *lvl)
void spo_var_init (struct sp_coder *coder)
void spo_shuffle_array (struct sp_coder *coder)
STATIC_OVL boolean sp_level_coder (sp_lev *lvl)
boolean load_special (char *name) const

Variables

struct engrhead_engr
int min_rx
int max_rx
int min_ry
int max_ry
char SpLev_Map [COLNO][ROWNO]
static aligntyp ralign [3] = { AM_CHAOTIC, AM_NEUTRAL, AM_LAWFUL }
static NEARDATA xchar xstart
static NEARDATA xchar ystart
static NEARDATA char xsize
static NEARDATA char ysize
char * lev_message = 0
lev_regionlregions = 0
int num_lregions = 0
struct objcontainer_obj [MAX_CONTAINMENT]
int container_idx = 0
struct monstinvent_carrying_monster = NULL

Define Documentation

#define BOTTOM   5

Referenced by create_room(), and spo_map().

#define CENTER   3

Referenced by create_room(), and spo_map().

#define DRY   0x1
#define Fgetc   (schar)dlb_fgetc
#define Fread   (void)dlb_fread
#define Free (   ptr )    if(ptr) free((genericptr_t) (ptr))
#define H_LEFT   2

Referenced by spo_map().

#define H_RIGHT   4

Referenced by spo_map().

#define LEFT   1

Referenced by create_room(), and spo_map().

#define opvar_free (   ov )    { if (ov) { opvar_free_x(ov); ov = NULL; } else impossible("opvar_free(), %s", __FUNCTION__); }
#define OV_i (   o )    (o->vardata.l)
#define OV_pop (   x )    (x = splev_stack_getdat_any(coder))
#define OV_pop_c (   x )    (x = splev_stack_getdat(coder, SPOVAR_COORD))
#define OV_pop_i (   x )    (x = splev_stack_getdat(coder, SPOVAR_INT))
#define OV_pop_r (   x )    (x = splev_stack_getdat(coder, SPOVAR_REGION))
#define OV_pop_s (   x )    (x = splev_stack_getdat(coder, SPOVAR_STRING))
#define OV_pop_typ (   x,
  typ 
)    (x = splev_stack_getdat(coder, typ))
#define OV_s (   o )    (o->vardata.str)
#define OV_typ (   o )    (o->spovartyp)
#define RIGHT   5

Referenced by create_room(), and spo_map().

#define SEL_FLOOD (   nx,
  ny 
)    {if (idx<SEL_FLOOD_STACK) { dx[idx]=(nx); dy[idx]=(ny); idx++; } else panic("floodfill stack overrun");}

Referenced by selection_floodfill().

#define SEL_FLOOD_STACK   (COLNO*ROWNO)

Referenced by selection_floodfill().

#define SPLEV_STACK_RESERVE   128
#define TOP   1

Referenced by create_room(), and spo_map().

#define WET   0x2
#define XLIM   4

Referenced by check_room(), and create_room().

#define YLIM   3

Referenced by check_room(), and create_room().


Function Documentation

STATIC_OVL struct mkroom* build_room ( room r,
struct mkroom mkr 
) [read]

References create_room(), create_subroom(), FALSE, mkroom::needfill, nroom, nsubroom, OROOM, mkroom::rlit, rn2(), rooms, mkroom::rtype, subrooms, and topologize().

Referenced by spo_room().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean check_room ( xchar lowx,
xchar ddx,
xchar lowy,
xchar ddy,
boolean  vault 
)

References COLNO, FALSE, levl, rn2(), ROWNO, TRUE, rm::typ, XLIM, YLIM, and ymax.

Referenced by create_room(), makelevel(), and mk_split_room().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void count_features (  )

References COLNO, dlevel_t::flags, FOUNTAIN, level, levl, levelflags::nfountains, levelflags::nsinks, ROWNO, and SINK.

Referenced by sp_level_coder().

Here is the caller graph for this function:

STATIC_OVL void create_altar ( altar a,
struct mkroom croom 
)
STATIC_OVL void create_corridor ( corridor c )

References CORR, dig_corridor(), FALSE, fix_stair_rooms(), makecorridors(), rooms, search_door(), STONE, W_EAST, W_NORTH, W_SOUTH, W_WEST, nhcoord::x, and nhcoord::y.

Referenced by spo_corridor().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_door ( room_door dd,
struct mkroom broom 
)

References add_door(), D_CLOSED, D_ISOPEN, D_LOCKED, D_NODOOR, D_TRAPPED, DOOR, mkroom::hx, mkroom::hy, IS_ROCK, levl, mkroom::lx, mkroom::ly, okdoor(), rn2(), SDOOR, rm::typ, W_EAST, W_NORTH, W_SOUTH, and W_WEST.

Referenced by spo_room_door().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_engraving ( engraving e,
struct mkroom croom 
)

References DRY, get_location(), and make_engr_at().

Referenced by spo_engraving().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_feature ( int  fx,
int  fy,
struct mkroom croom,
int  typ 
)

References DRY, get_location(), IS_FURNITURE, and levl.

Here is the call graph for this function:

STATIC_OVL void create_gold ( gold g,
struct mkroom croom 
)

References DRY, get_location(), mkgold(), and rnd().

Referenced by spo_gold().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_monster ( monster m,
struct mkroom croom 
)
STATIC_OVL void create_object ( object o,
struct mkroom croom 
)
boolean create_room ( xchar  x,
xchar  y,
xchar  w,
xchar  h,
xchar  xal,
xchar  yal,
xchar  rtype,
xchar  rlit 
)

References add_room(), BOTTOM, CENTER, check_room(), COLNO, depth(), FALSE, get_rect(), nhrect::hx, nhrect::hy, LEFT, mkroom::lx, nhrect::lx, mkroom::ly, nhrect::ly, nroom, OROOM, RIGHT, rn1, rn2(), rnd(), rnd_rect(), rooms, ROWNO, smeq, split_rects(), TOP, TRUE, u, you::uz, VAULT, XLIM, and YLIM.

Referenced by build_room(), and makerooms().

Here is the call graph for this function:

Here is the caller graph for this function:

void create_secret_door ( struct mkroom croom,
xchar  walls 
)

References add_door(), D_CLOSED, levl, okdoor(), rn1, rn2(), SDOOR, W_EAST, W_NORTH, W_SOUTH, and W_WEST.

Referenced by fixup_special().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_stairs ( stair s,
struct mkroom croom 
)

References DRY, get_location(), and mkstairs().

Here is the call graph for this function:

STATIC_OVL boolean create_subroom ( struct mkroom proom,
xchar  x,
xchar  y,
xchar  w,
xchar  h,
xchar  rtype,
xchar  rlit 
)

References add_subroom(), depth(), FALSE, mkroom::hx, OROOM, rn2(), rnd(), TRUE, u, and you::uz.

Referenced by build_room().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_trap ( trap t,
struct mkroom croom 
)

References DRY, get_free_room_loc(), get_location(), LADDER, levl, mktrap(), STAIRS, rm::typ, nhcoord::x, and nhcoord::y.

Referenced by spo_trap().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean dig_corridor ( coord org,
coord dest,
boolean  nxcor,
schar  ftyp,
schar  btyp 
)

References BOULDER, COLNO, CORR, FALSE, levl, mksobj_at(), rn2(), ROWNO, SCORR, TRUE, and rm::typ.

Referenced by create_corridor(), join(), and join_map().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void FDECL ( create_engraving  ,
(engraving *, struct mkroom *)   
)
STATIC_DCL void FDECL ( get_room_loc  ,
(schar *, schar *, struct mkroom *)   
)
STATIC_DCL void FDECL ( create_trap  ,
(trap *, struct mkroom *)   
)
STATIC_DCL boolean FDECL ( create_subroom  ,
(struct mkroom *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)   
)
STATIC_DCL void FDECL ( create_stairs  ,
(stair *, struct mkroom *)   
)
STATIC_DCL void FDECL ( set_wall_property  ,
(XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, int)   
)
STATIC_DCL int FDECL ( noncoalignment  ,
(ALIGNTYP_P)   
)
STATIC_DCL void FDECL ( create_altar  ,
(altar *, struct mkroom *)   
)
STATIC_DCL void FDECL ( get_location  ,
(schar *, schar *, int, struct mkroom *)   
)
STATIC_DCL void FDECL ( create_gold  ,
(gold *, struct mkroom *)   
)
STATIC_DCL void FDECL ( light_region  ,
(region *)   
)
STATIC_DCL void FDECL ( load_one_monster  ,
(dlb *, monster *)   
)
STATIC_DCL void FDECL ( get_free_room_loc  ,
(schar *, schar *, struct mkroom *)   
)
STATIC_DCL void FDECL ( create_feature  ,
(int, int, struct mkroom *, int)   
)
STATIC_DCL void FDECL ( load_one_object  ,
(dlb *, object *)   
)
STATIC_DCL void FDECL ( load_one_engraving  ,
(dlb *, engraving *)   
)
STATIC_DCL void FDECL ( create_monster  ,
(monster *, struct mkroom *)   
)
STATIC_DCL boolean FDECL ( search_door  ,
(struct mkroom *, xchar *, xchar *, XCHAR_P, int)   
)
STATIC_DCL void FDECL ( maze1xy  ,
(coord *, int)   
)
STATIC_DCL boolean FDECL ( sp_level_loader  ,
(dlb *, sp_lev *)   
)
STATIC_DCL void FDECL ( create_door  ,
(room_door *, struct mkroom *)   
)
STATIC_DCL boolean FDECL ( is_ok_location  ,
(SCHAR_P, SCHAR_P, int)   
)
STATIC_DCL struct mkroom* FDECL ( build_room  ,
(room *, struct mkroom *)   
) [read]
void FDECL ( mkmap  ,
(lev_init *)   
)
STATIC_DCL void FDECL ( create_object  ,
(object *, struct mkroom *)   
)
STATIC_DCL void FDECL ( create_corridor  ,
(corridor *)   
)
STATIC_OVL void fill_empty_maze (  )

References BOULDER, DRY, FALSE, GEM_CLASS, HOLE, makemon(), maketrap(), maze1xy(), mkgold(), mkobj_at(), mksobj_at(), mons, NO_MM_FLAGS, PIT, PM_MINOTAUR, RANDOM_CLASS, rn2(), rnd(), rndtrap(), sobj_at(), SPIKED_PIT, TRAPDOOR, TRUE, WET, nhcoord::x, x_maze_max, nhcoord::y, and y_maze_max.

Referenced by spo_mazewalk().

Here is the call graph for this function:

Here is the caller graph for this function:

void fill_room ( struct mkroom croom,
boolean  prefilled 
)

References BARRACKS, BEEHIVE, COURT, depth(), fill_zoo(), dlevel_t::flags, GARDEN, mkroom::hx, mkroom::hy, LEMUREPIT, level, mkgold(), MORGUE, OROOM, rn1, SHOPBASE, stock_room(), SWAMP, TEMPLE, TRUE, u, you::uz, VAULT, and ZOO.

Referenced by fill_rooms(), and makelevel().

Here is the call graph for this function:

Here is the caller graph for this function:

void fill_rooms (  )

References FALSE, fill_room(), m, mkroom::needfill, nroom, mkroom::nsubrooms, rooms, and mkroom::sbrooms.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void fix_stair_rooms (  )

References dnstairs_room, mkroom::hx, mkroom::hy, mkroom::lx, mkroom::ly, nroom, rooms, upstairs_room, xdnstair, xupstair, ydnstair, and yupstair.

Referenced by create_corridor().

Here is the caller graph for this function:

void flip_drawbridge_horizontal ( struct rm lev )

References DB_DIR, DB_EAST, DB_WEST, and IS_DRAWBRIDGE.

Referenced by flip_level().

Here is the caller graph for this function:

void flip_drawbridge_vertical ( struct rm lev )

References DB_DIR, DB_NORTH, DB_SOUTH, and IS_DRAWBRIDGE.

Referenced by flip_level().

Here is the caller graph for this function:

void flip_level ( int  flp )
void flip_level_rnd ( int  flp )

References flip_level(), and rn2().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void frame_del ( struct sp_frame frame )

References Free, splev_stack_done(), and variable_list_del().

Referenced by sp_level_coder(), spo_frame_pop(), and spo_return().

Here is the call graph for this function:

Here is the caller graph for this function:

struct sp_frame* frame_new ( long  execptr ) [read]

References sp_frame::n_opcode, sp_frame::next, splev_stack_init(), sp_frame::stack, and sp_frame::variables.

Referenced by sp_level_coder(), spo_call(), and spo_frame_push().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void get_free_room_loc ( schar x,
schar y,
struct mkroom croom 
)

References DRY, get_location(), get_room_loc(), levl, and ROOM.

Referenced by create_altar(), and create_trap().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void get_location ( schar x,
schar y,
int  humidity,
struct mkroom croom 
)
STATIC_OVL void get_room_loc ( schar x,
schar y,
struct mkroom croom 
)

References mkroom::hx, mkroom::hy, mkroom::lx, mkroom::ly, rn2(), somexy(), nhcoord::x, and nhcoord::y.

Referenced by get_free_room_loc().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean is_ok_location ( schar  x,
schar  y,
int  humidity 
)

References AIR, CLOUD, CORR, DRY, FALSE, ICE, is_lava(), is_pool(), Is_waterlevel, levl, ROOM, TRUE, u, you::uz, and WET.

Referenced by get_location(), and maze1xy().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void light_region ( region tmpregion )

References COLNO, LAVAPOOL, levl, max, min, region::rlit, ROWNO, and rm::typ.

Referenced by spo_region().

Here is the caller graph for this function:

STATIC_OVL void load_one_engraving ( dlb *  fd,
engraving e 
)

References Fread.

STATIC_OVL void load_one_monster ( dlb *  fd,
monster m 
)

References Fread.

STATIC_OVL void load_one_object ( dlb *  fd,
object o 
)

References Fread.

STATIC_OVL void load_one_room ( dlb *  fd,
room r 
)

References Fread.

boolean load_special ( char *  name ) const

References check_version(), dlb, dlb_fclose, dlb_fopen, FALSE, Fread, RDBMODE, sp_level_coder(), sp_level_free(), sp_level_loader(), and TRUE.

Referenced by makemaz().

Here is the call graph for this function:

Here is the caller graph for this function:

void lvlfill_maze_grid ( int  x1,
int  y1,
int  x2,
int  y2,
schar  filling 
)

References levl, and STONE.

Referenced by splev_initlev().

Here is the caller graph for this function:

void lvlfill_solid ( schar  filling,
schar  lit 
)

References SET_TYPLIT, x_maze_max, and y_maze_max.

Referenced by splev_initlev().

Here is the caller graph for this function:

STATIC_OVL void maze1xy ( coord m,
int  humidity 
)

References is_ok_location(), rn1, x_maze_max, and y_maze_max.

Referenced by fill_empty_maze().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void NDECL ( count_features   )
STATIC_DCL int NDECL ( rnddoor   )
STATIC_DCL int NDECL ( rndtrap   )
STATIC_DCL void NDECL ( fix_stair_rooms   )
STATIC_OVL int noncoalignment ( aligntyp  alignment )

References rn2().

Referenced by create_altar(), and create_monster().

Here is the call graph for this function:

Here is the caller graph for this function:

struct opvar* opvar_clone ( struct opvar ov ) [read]
void opvar_free_x ( struct opvar ov )
struct opvar* opvar_new_coord ( int  x,
int  y 
) [read]

References opvar::l, SP_COORD_PACK, SPOVAR_COORD, opvar::spovartyp, and opvar::vardata.

Referenced by sp_level_coder().

Here is the caller graph for this function:

struct opvar* opvar_new_int ( long  i ) [read]

References opvar::l, SPOVAR_INT, opvar::spovartyp, and opvar::vardata.

Referenced by sp_level_coder().

Here is the caller graph for this function:

struct opvar* opvar_new_str ( char *  s ) [read]

References SPOVAR_STRING, opvar::spovartyp, opvar::str, and opvar::vardata.

Referenced by selection_opvar(), and sp_level_coder().

Here is the caller graph for this function:

struct opvar* opvar_var_conversion ( struct sp_coder coder,
struct opvar ov 
) [read]
struct splev_var* opvar_var_defined ( struct sp_coder coder,
char *  name 
) [read]

References splev_var::name, and splev_var::next.

Referenced by spo_shuffle_array(), and spo_var_init().

Here is the caller graph for this function:

void remove_boundary_syms (  )

References COLNO, CROSSWALL, FALSE, levl, ROOM, ROWNO, TRUE, x_maze_max, and y_maze_max.

Referenced by sp_level_coder().

Here is the caller graph for this function:

void replace_terrain ( replaceterrain terr,
struct mkroom croom 
)

References DRY, get_location(), levl, MAX_TYPE, rn2(), SET_TYPLIT, and WET.

Referenced by spo_replace_terrain().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int rnddoor (  )

References rn2().

Referenced by spo_door().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int rndtrap (  )

References Can_dig_down(), dlevel_t::flags, HOLE, In_endgame, level, LEVEL_TELEP, MAGIC_PORTAL, NO_TRAP, rnd(), ROCKTRAP, ROLLING_BOULDER_TRAP, TELEP_TRAP, TRAPDOOR, TRAPNUM, u, and you::uz.

Referenced by fill_empty_maze().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean search_door ( struct mkroom croom,
xchar x,
xchar y,
xchar  wall,
int  cnt 
)

References FALSE, IS_DOOR, levl, SDOOR, TRUE, W_EAST, W_NORTH, W_SOUTH, and W_WEST.

Referenced by create_corridor().

Here is the caller graph for this function:

void sel_set_door ( int  dx,
int  dy,
genericptr_t  arg 
)

References add_door(), D_CLOSED, D_SECRET, DOOR, doorindex, DOORMAX, mkroom::hx, mkroom::hy, IS_DOOR, levl, mkroom::lx, mkroom::ly, rooms, and SDOOR.

Referenced by spo_door().

Here is the call graph for this function:

Here is the caller graph for this function:

void sel_set_feature ( int  x,
int  y,
genericptr_t  arg 
)

References IS_FURNITURE, and levl.

Referenced by spo_feature().

Here is the caller graph for this function:

void sel_set_ter ( int  x,
int  y,
genericptr_t  arg 
)

References D_CLOSED, IS_DOOR, IS_WALL, levl, SDOOR, SET_TYPLIT, terrain::ter, and terrain::tlit.

Referenced by spo_terrain().

Here is the caller graph for this function:

void selection_do_ellipse ( struct opvar ov,
int  xc,
int  yc,
int  a,
int  b,
int  filled 
)

References selection_setpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void selection_do_grow ( struct opvar ov,
int  dir 
)

References COLNO, ROWNO, selection_getpoint(), selection_setpoint(), SPOVAR_SEL, W_EAST, W_NORTH, W_SOUTH, and W_WEST.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void selection_do_line ( schar  x1,
schar  y1,
schar  x2,
schar  y2,
struct opvar ov 
)

References d(), and selection_setpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void selection_do_randline ( schar  x1,
schar  y1,
schar  x2,
schar  y2,
schar  rough,
schar  rec,
struct opvar ov 
)

References COLNO, max, ROWNO, and selection_setpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void selection_filter_percent ( struct opvar ov,
int  percent 
)

References COLNO, rn2(), ROWNO, selection_getpoint(), and selection_setpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void selection_floodfill ( struct opvar ov,
int  x,
int  y 
)

References isok(), levl, opvar_free, SEL_FLOOD, SEL_FLOOD_STACK, selection_getpoint(), selection_opvar(), and selection_setpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

char selection_getpoint ( int  x,
int  y,
struct opvar ov 
)
void selection_iterate ( struct opvar ov,
func  ,
genericptr_t  arg 
)

References COLNO, ROWNO, and selection_getpoint().

Referenced by spo_door(), spo_feature(), and spo_terrain().

Here is the call graph for this function:

Here is the caller graph for this function:

struct opvar* selection_logical_oper ( struct opvar s1,
struct opvar s2,
char  oper 
) [read]

References COLNO, ROWNO, selection_getpoint(), selection_opvar(), and selection_setpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

struct opvar* selection_opvar ( char *  nbuf ) [read]

References COLNO, opvar_new_str(), ROWNO, SPOVAR_SEL, and opvar::spovartyp.

Referenced by selection_floodfill(), selection_logical_oper(), and sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

int selection_rndcoord ( struct opvar ov,
schar x,
schar y 
)

References COLNO, isok(), rn2(), ROWNO, and selection_getpoint().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void selection_setpoint ( int  x,
int  y,
struct opvar ov,
char  c 
)
void set_terrain ( terrain terr,
struct mkroom croom 
)

References D_CLOSED, DRY, get_location(), IS_DOOR, IS_WALL, levl, MAX_TYPE, SDOOR, SET_TYPLIT, and WET.

Here is the call graph for this function:

STATIC_OVL void set_wall_property ( xchar  x1,
xchar  y1,
xchar  x2,
xchar  y2,
int  prop 
)

References IS_STWALL, and levl.

Referenced by spo_wall_property().

Here is the caller graph for this function:

STATIC_OVL void shuffle_alignments (  )

References rn2().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

long sp_code_jmpaddr ( long  curpos,
long  jmpaddr 
)

Referenced by spo_call(), spo_conditional_jump(), and spo_jmp().

Here is the caller graph for this function:

STATIC_OVL boolean sp_level_coder ( sp_lev lvl )

References sp_coder::allow_flips, COLNO, count_features(), sp_coder::croom, d(), dirs, DRY, sp_coder::exit_script, sp_coder::failed_room, FALSE, fill_rooms(), dlevel_t::flags, flip_level_rnd(), sp_coder::frame, frame_del(), frame_new(), get_location(), In_V_tower(), Is_astralevel, Is_knox, Is_minetown_level, Is_oracle_level, Is_stronghold, Is_town_level, isok(), level, sp_coder::lvl_is_joined, max, MAX_CONTAINMENT, MAX_NESTED_ROOMS, min, sp_frame::n_opcode, sp_coder::n_subroom, sp_frame::next, sp_coder::opcode, sp_coder::opdat, opvar_clone(), opvar_free, opvar_new_coord(), opvar_new_int(), opvar_new_str(), OV_i, OV_pop, OV_pop_c, OV_pop_i, OV_pop_r, OV_pop_typ, OV_s, OV_typ, sp_coder::premapped, remove_boundary_syms(), rn2(), ROWNO, selection_do_ellipse(), selection_do_grow(), selection_do_line(), selection_do_randline(), selection_filter_percent(), selection_floodfill(), selection_logical_oper(), selection_opvar(), selection_rndcoord(), selection_setpoint(), shuffle_alignments(), sokoban_detect(), SP_COORD_X, SP_COORD_Y, SP_CPUFLAG_EQ, SP_CPUFLAG_GT, SP_CPUFLAG_LT, SP_REGION_X1, SP_REGION_X2, SP_REGION_Y1, SP_REGION_Y2, SPCODER_MAX_RUNTIME, SpLev_Map, splev_stack_pop(), splev_stack_push(), spo_altar(), SPO_ALTAR, spo_call(), SPO_CALL, SPO_CMP, spo_conditional_jump(), SPO_COPY, spo_corridor(), SPO_CORRIDOR, SPO_DEC, SPO_DICE, spo_door(), SPO_DOOR, spo_drawbridge(), SPO_DRAWBRIDGE, spo_end_moninvent(), SPO_END_MONINVENT, spo_endroom(), SPO_ENDROOM, spo_engraving(), SPO_ENGRAVING, SPO_EXIT, spo_feature(), SPO_FOUNTAIN, spo_frame_pop(), SPO_FRAME_POP, spo_frame_push(), SPO_FRAME_PUSH, spo_gold(), SPO_GOLD, spo_grave(), SPO_GRAVE, SPO_INC, spo_initlevel(), SPO_INITLEVEL, SPO_JE, SPO_JG, SPO_JGE, SPO_JL, SPO_JLE, spo_jmp(), SPO_JMP, SPO_JNE, spo_ladder(), SPO_LADDER, spo_level_flags(), SPO_LEVEL_FLAGS, spo_level_sounds(), SPO_LEVEL_SOUNDS, spo_levregion(), SPO_LEVREGION, spo_map(), SPO_MAP, SPO_MATH_ADD, SPO_MATH_DIV, SPO_MATH_MOD, SPO_MATH_MUL, SPO_MATH_SUB, spo_mazewalk(), SPO_MAZEWALK, spo_message(), SPO_MESSAGE, spo_mon_generation(), SPO_MON_GENERATION, spo_monster(), SPO_MONSTER, SPO_NON_DIGGABLE, SPO_NON_PASSWALL, SPO_NULL, spo_object(), SPO_OBJECT, SPO_POOL, SPO_POP, spo_pop_container(), SPO_POP_CONTAINER, SPO_PUSH, spo_region(), SPO_REGION, spo_replace_terrain(), SPO_REPLACETERRAIN, spo_return(), SPO_RETURN, SPO_RN2, spo_room(), SPO_ROOM, spo_room_door(), SPO_ROOM_DOOR, SPO_SEL_ADD, SPO_SEL_ELLIPSE, SPO_SEL_FILLRECT, SPO_SEL_FILTER, SPO_SEL_FLOOD, SPO_SEL_GROW, SPO_SEL_LINE, SPO_SEL_POINT, SPO_SEL_RECT, SPO_SEL_RNDCOORD, SPO_SEL_RNDLINE, spo_shuffle_array(), SPO_SHUFFLE_ARRAY, SPO_SINK, spo_spill(), SPO_SPILL, spo_stair(), SPO_STAIR, SPO_SUBROOM, spo_terrain(), SPO_TERRAIN, spo_trap(), SPO_TRAP, spo_var_init(), SPO_VAR_INIT, spo_wall_property(), spo_wallify(), SPO_WALLIFY, spo_wallwalk(), SPO_WALLWALK, SPOVAR_COORD, SPOVAR_INT, SPOVAR_MAPCHAR, SPOVAR_MONST, SPOVAR_OBJ, SPOVAR_REGION, SPOVAR_SEL, SPOVAR_STRING, sp_frame::stack, sp_coder::stack, sp_coder::tmproomlist, TRUE, u, you::uz, wallification(), WET, xstart, and ystart.

Referenced by load_special().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean sp_level_free ( sp_lev lvl )

References MAX_SP_OPCODES, _opcode::opcode, sp_lev::opcodes, opvar_free, and TRUE.

Referenced by load_special().

Here is the caller graph for this function:

STATIC_OVL boolean sp_level_loader ( dlb *  fd,
sp_lev lvl 
)
STATIC_OVL void spill_terrain ( spill sp,
struct mkroom croom 
)

References DRY, FALSE, get_location(), IS_WALL, isok(), levl, MAX_TYPE, rn2(), SET_TYPLIT, TRUE, rm::typ, W_EAST, W_NORTH, W_SOUTH, W_WEST, and WET.

Referenced by spo_spill().

Here is the call graph for this function:

Here is the caller graph for this function:

void splev_initlev ( lev_init linit )

References lvlfill_maze_grid(), lvlfill_solid(), LVLINIT_MAZEGRID, LVLINIT_MINES, LVLINIT_NONE, LVLINIT_SOLIDFILL, mkmap(), rn2(), x_maze_max, and y_maze_max.

Referenced by spo_initlevel().

Here is the call graph for this function:

Here is the caller graph for this function:

void splev_stack_done ( struct splevstack st )

References Free, SPOVAR_COORD, SPOVAR_INT, SPOVAR_MAPCHAR, SPOVAR_MONST, SPOVAR_NULL, SPOVAR_OBJ, SPOVAR_REGION, SPOVAR_SEL, SPOVAR_STRING, and SPOVAR_VARIABLE.

Referenced by frame_del().

Here is the caller graph for this function:

struct opvar* splev_stack_getdat ( struct sp_coder coder,
xchar  typ 
) [read]

References opvar_var_conversion(), splev_stack_pop(), SPOVAR_VARIABLE, and opvar::spovartyp.

Here is the call graph for this function:

struct opvar* splev_stack_getdat_any ( struct sp_coder coder ) [read]

References opvar_var_conversion(), splev_stack_pop(), SPOVAR_VARIABLE, and opvar::spovartyp.

Here is the call graph for this function:

void splev_stack_init ( struct splevstack st )

References splevstack::depth, and SPLEV_STACK_RESERVE.

Referenced by frame_new().

Here is the caller graph for this function:

struct opvar* splev_stack_pop ( struct splevstack st ) [read]

Referenced by opvar_var_conversion(), sp_level_coder(), splev_stack_getdat(), splev_stack_getdat_any(), spo_call(), and spo_return().

Here is the caller graph for this function:

void splev_stack_push ( struct splevstack st,
struct opvar v 
)

References Free, and SPLEV_STACK_RESERVE.

Referenced by sp_level_coder(), spo_call(), and spo_return().

Here is the caller graph for this function:

void spo_altar ( struct sp_coder coder )

References altar::align, create_altar(), opvar_free, OV_i, OV_pop_c, OV_pop_i, altar::shrine, SP_COORD_X, SP_COORD_Y, altar::x, and altar::y.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_call ( struct sp_coder coder )

References frame_new(), sp_frame::next, opvar_free, OV_i, OV_pop_i, sp_code_jmpaddr(), splev_stack_pop(), splev_stack_push(), and sp_frame::stack.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_conditional_jump ( struct sp_coder coder,
sp_lev lvl 
)

References opvar_free, OV_i, OV_pop_i, sp_code_jmpaddr(), SP_CPUFLAG_EQ, SP_CPUFLAG_GT, SP_CPUFLAG_LT, SPO_JE, SPO_JG, SPO_JGE, SPO_JL, SPO_JLE, and SPO_JNE.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_corridor ( struct sp_coder coder )

References create_corridor(), corridor::dest, corridor::door, opvar_free, OV_i, OV_pop_i, corridor::room, corridor::src, and corridor::wall.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_door ( struct sp_coder coder )

References opvar_free, OV_i, OV_pop_i, OV_pop_typ, rnddoor(), sel_set_door(), selection_iterate(), and SPOVAR_SEL.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_drawbridge ( struct sp_coder coder )

References create_drawbridge(), DRY, get_location(), opvar_free, OV_i, OV_pop_c, OV_pop_i, SP_COORD_X, SP_COORD_Y, and WET.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_end_moninvent ( struct sp_coder coder )

References m_dowear(), and TRUE.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_endroom ( struct sp_coder coder )

References COLNO, sp_coder::n_subroom, and ROWNO.

Referenced by sp_level_coder().

Here is the caller graph for this function:

void spo_engraving ( struct sp_coder coder )

References create_engraving(), engraving::engr, engraving::etype, opvar_free, OV_i, OV_pop_c, OV_pop_i, OV_pop_s, OV_s, SP_COORD_X, SP_COORD_Y, str_or_len::str, txt, engraving::x, and engraving::y.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_feature ( struct sp_coder coder )

References FOUNTAIN, opvar_free, OV_pop_typ, POOL, sel_set_feature(), selection_iterate(), SINK, SPO_FOUNTAIN, SPO_POOL, SPO_SINK, and SPOVAR_SEL.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_frame_pop ( struct sp_coder coder )

References frame_del(), and sp_frame::next.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_frame_push ( struct sp_coder coder )

References frame_new(), and sp_frame::next.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_gold ( struct sp_coder coder )

References gold::amount, create_gold(), opvar_free, OV_i, OV_pop_c, OV_pop_i, SP_COORD_X, SP_COORD_Y, gold::x, and gold::y.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_grave ( struct sp_coder coder )

References del_engr_at(), DRY, get_location(), GRAVE, isok(), levl, make_grave(), opvar_free, OV_i, OV_pop_c, OV_pop_i, OV_pop_s, OV_s, SP_COORD_X, SP_COORD_Y, t_at(), and txt.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_initlevel ( struct sp_coder coder )

References lev_init::bg, lev_init::fg, lev_init::filling, lev_init::init_style, lev_init::joined, lev_init::lit, opvar_free, OV_i, OV_pop_i, lev_init::smoothed, splev_initlev(), and lev_init::walled.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_jmp ( struct sp_coder coder,
sp_lev lvl 
)

References opvar_free, OV_i, OV_pop_i, and sp_code_jmpaddr().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_ladder ( struct sp_coder coder )

References DRY, get_location(), LA_DOWN, LA_UP, LADDER, levl, opvar_free, OV_i, OV_pop_c, OV_pop_i, SP_COORD_X, SP_COORD_Y, trap::x, xdnladder, xupladder, trap::y, ydnladder, and yupladder.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_level_flags ( struct sp_coder coder )

References ARBOREAL, dlevel_t::flags, flags, GRAVEYARD, HARDFLOOR, level, MAZELEVEL, NOFLIPX, NOFLIPY, NOMMAP, NOTELEPORT, opvar_free, OV_i, OV_pop_i, PREMAPPED, SHORTSIGHTED, SHROUD, STORMY, and TRUE.

Referenced by sp_level_coder().

Here is the caller graph for this function:

void spo_level_sounds ( struct sp_coder coder )
void spo_levregion ( struct sp_coder coder )
void spo_map ( struct sp_coder coder )
void spo_mazewalk ( struct sp_coder coder )

References CORR, DRY, fill_empty_maze(), get_location(), IS_DOOR, levl, opvar_free, OV_i, OV_pop_c, OV_pop_i, ROOM, SP_COORD_X, SP_COORD_Y, W_EAST, W_NORTH, W_SOUTH, W_WEST, walkfrom(), and WET.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_message ( struct sp_coder coder )

References Free, opvar_free, OV_pop_s, OV_s, and string_subst().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_mon_generation ( struct sp_coder coder )
void spo_monster ( struct sp_coder coder )
void spo_object ( struct sp_coder coder )
void spo_pop_container ( struct sp_coder coder )

References container_idx.

Referenced by sp_level_coder().

Here is the caller graph for this function:

void spo_region ( struct sp_coder coder )
void spo_replace_terrain ( struct sp_coder coder )
void spo_return ( struct sp_coder coder )

References frame_del(), sp_frame::next, opvar_free, OV_i, OV_pop_i, splev_stack_pop(), splev_stack_push(), and sp_frame::stack.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_room ( struct sp_coder coder )

References build_room(), _room::chance, FALSE, _room::filled, _room::h, MAX_NESTED_ROOMS, opvar_free, OV_i, OV_pop_i, _room::rlit, _room::rtype, TRUE, _room::w, _room::x, _room::xalign, _room::y, and _room::yalign.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_room_door ( struct sp_coder coder )

References create_door(), room_door::mask, opvar_free, OV_i, OV_pop_i, room_door::pos, room_door::secret, and room_door::wall.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_shuffle_array ( struct sp_coder coder )

References splev_var::array_len, splev_var::arrayvalues, splev_var::data, opvar_free, opvar_var_defined(), OV_pop_s, OV_s, and rn2().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_spill ( struct sp_coder coder )

References spill::count, spill::direction, spill::lit, opvar_free, OV_i, OV_pop_c, OV_pop_i, SP_COORD_X, SP_COORD_Y, spill_terrain(), spill::typ, spill::x, and spill::y.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_stair ( struct sp_coder coder )

References deltrap(), DRY, get_location(), mkstairs(), opvar_free, OV_i, OV_pop_c, OV_pop_i, SP_COORD_X, SP_COORD_Y, t_at(), trap::x, and trap::y.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_terrain ( struct sp_coder coder )

References opvar_free, OV_i, OV_pop_typ, sel_set_ter(), selection_iterate(), SP_MAPCHAR_LIT, SP_MAPCHAR_TYP, SPOVAR_MAPCHAR, SPOVAR_SEL, terrain::ter, and terrain::tlit.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_trap ( struct sp_coder coder )

References create_trap(), opvar_free, OV_i, OV_pop_c, OV_pop_i, SP_COORD_X, SP_COORD_Y, trap::type, trap::x, and trap::y.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_var_init ( struct sp_coder coder )
void spo_wall_property ( struct sp_coder coder )

References DRY, get_location(), opvar_free, OV_i, OV_pop_r, set_wall_property(), SP_REGION_X1, SP_REGION_X2, SP_REGION_Y1, SP_REGION_Y2, SPO_NON_DIGGABLE, W_NONDIGGABLE, W_NONPASSWALL, and WET.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_wallify ( struct sp_coder coder )

References opvar_free, OV_i, OV_pop_r, SP_REGION_X1, SP_REGION_X2, SP_REGION_Y1, SP_REGION_Y2, and wallify_map().

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void spo_wallwalk ( struct sp_coder coder )

References DRY, get_location(), MAX_TYPE, opvar_free, OV_i, OV_pop_c, OV_pop_i, OV_pop_typ, SP_COORD_X, SP_COORD_Y, SP_MAPCHAR_LIT, SP_MAPCHAR_TYP, SPOVAR_MAPCHAR, wallwalk_right(), and WET.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

void variable_list_del ( struct splev_var varlist )
void wallify_map ( int  x1,
int  y1,
int  x2,
int  y2 
)

References CROSSWALL, HWALL, IS_ROOM, levl, STONE, rm::typ, and VWALL.


Variable Documentation

int container_idx = 0

Referenced by create_object(), and spo_pop_container().

struct obj* container_obj[MAX_CONTAINMENT]
struct engr* head_engr
char* lev_message = 0

Referenced by fixup_special().

Referenced by fixup_special(), and spo_levregion().

int max_rx

Referenced by join_map().

int max_ry

Referenced by join_map().

int min_rx
int min_ry
int num_lregions = 0

Referenced by fixup_special(), and flip_level().

aligntyp ralign[3] = { AM_CHAOTIC, AM_NEUTRAL, AM_LAWFUL } [static]
char SpLev_Map[COLNO][ROWNO]

Referenced by sp_level_coder(), and walkfrom().

NEARDATA char xsize [static]

Referenced by get_location(), and spo_map().

NEARDATA xchar xstart [static]
NEARDATA char ysize

Referenced by get_location(), and spo_map().

NEARDATA xchar ystart