Defines | Functions | Variables

dig.c File Reference

#include "hack.h"
#include "edog.h"
Include dependency graph for dig.c:

Defines

#define DIGTYP_UNDIGGABLE   0
#define DIGTYP_ROCK   1
#define DIGTYP_STATUE   2
#define DIGTYP_BOULDER   3
#define DIGTYP_DOOR   4
#define DIGTYP_TREE   5
#define BY_YOU   (&youmonst)
#define BY_OBJECT   ((struct monst *)0)

Functions

STATIC_DCL boolean NDECL (rm_waslit)
STATIC_DCL void FDECL (mkcavepos,(XCHAR_P, XCHAR_P, int, BOOLEAN_P, BOOLEAN_P))
STATIC_DCL void FDECL (mkcavearea,(BOOLEAN_P))
STATIC_DCL int FDECL (dig_typ,(struct obj *, XCHAR_P, XCHAR_P))
STATIC_DCL int NDECL (dig)
STATIC_DCL schar FDECL (fillholetyp,(int, int))
STATIC_DCL void NDECL (dig_up_grave)
STATIC_OVL boolean rm_waslit ()
STATIC_OVL void mkcavepos (xchar x, xchar y, int dist, boolean waslit, boolean rockit)
STATIC_OVL void mkcavearea (boolean rockit)
STATIC_OVL int dig_typ (struct obj *otmp, xchar x, xchar y)
boolean is_digging ()
boolean dig_check (struct monst *madeby, boolean verbose, int x, int y)
STATIC_OVL int dig ()
int holetime ()
STATIC_OVL schar fillholetyp (int x, int y)
void digactualhole (int x, int y, struct monst *madeby, int ttyp)
boolean dighole (boolean pit_only)
STATIC_OVL void dig_up_grave ()
int use_pick_axe (struct obj *obj)
int use_pick_axe2 (struct obj *obj)
void watch_dig (struct monst *mtmp, xchar x, xchar y, boolean zap)
boolean mdig_tunnel (struct monst *mtmp)
void zap_dig ()
struct objbury_an_obj (struct obj *otmp)
void bury_objs (int x, int y)
void unearth_objs (int x, int y)
void rot_organic (genericptr_t arg, long timeout)
void rot_corpse (genericptr_t arg, long timeout)

Variables

static NEARDATA boolean did_dig_msg

Define Documentation

#define BY_OBJECT   ((struct monst *)0)

Referenced by dig_check(), and digactualhole().

#define BY_YOU   (&youmonst)

Referenced by dig(), dig_check(), digactualhole(), and dighole().

#define DIGTYP_BOULDER   3

Referenced by dig_typ().

#define DIGTYP_DOOR   4

Referenced by dig(), and dig_typ().

#define DIGTYP_ROCK   1

Referenced by dig(), dig_typ(), and use_pick_axe2().

#define DIGTYP_STATUE   2

Referenced by dig_typ().

#define DIGTYP_TREE   5

Referenced by dig(), and dig_typ().

#define DIGTYP_UNDIGGABLE   0

Function Documentation

struct obj* bury_an_obj ( struct obj otmp ) [read]

References add_to_buried(), CORPSE, end_burn(), is_ice(), is_organic, LEASH, o_unleash(), obfree(), obj_extract_self(), obj_resists(), pline(), POT_OIL, POTION_CLASS, rnd(), ROCK, ROT_ORGANIC, start_timer(), TIMER_OBJECT, TRUE, uball, uchain, unpunish(), and xname().

Referenced by bury_objs(), create_object(), and rot_organic().

Here is the call graph for this function:

Here is the caller graph for this function:

void bury_objs ( int  x,
int  y 
)

References bury_an_obj(), del_engr_at(), level, newsym(), dlevel_t::objects, otmp, and pline().

Referenced by boulder_hits_pool(), dospinweb(), flooreffects(), moverock(), and zap_over_floor().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int dig (  )
boolean dig_check ( struct monst madeby,
boolean  verbose,
int  x,
int  y 
)

References BOULDER, BY_OBJECT, BY_YOU, Can_dig_down(), FALSE, Is_airlevel, IS_ALTAR, Is_astralevel, is_axe, is_lava(), is_pool(), IS_ROCK, Is_sanctum, IS_THRONE, Is_waterlevel, levl, MAGIC_PORTAL, On_stairs(), SDOOR, sobj_at(), surface(), t_at(), TRUE, u, uwep, you::uz, W_NONDIGGABLE, wall_info, xdnladder, and xupladder.

Referenced by dig(), and do_break_wand().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int dig_typ ( struct obj otmp,
xchar  x,
xchar  y 
)

References BOULDER, closed_door(), DIGTYP_BOULDER, DIGTYP_DOOR, DIGTYP_ROCK, DIGTYP_STATUE, DIGTYP_TREE, DIGTYP_UNDIGGABLE, dlevel_t::flags, is_pick, IS_ROCK, IS_TREE, IS_WALL, level, levl, sobj_at(), and STATUE.

Referenced by dig(), use_pick_axe(), and use_pick_axe2().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void dig_up_grave (  )

References A_LAWFUL, A_WIS, adjalign(), obj::age, Blind, CORPSE, del_engr_at(), exercise(), FALSE, Hallucination, levl, makemon(), mk_tt_object(), mkclass(), newsym(), NO_MM_FLAGS, otmp, pline(), PM_ARCHEOLOGIST, PM_SAMURAI, align::record, rn2(), Role_if, ROOM, S_MUMMY, S_ZOMBIE, sgn(), align::type, u, you::ualign, you::ux, and you::uy.

Referenced by dighole().

Here is the call graph for this function:

Here is the caller graph for this function:

void digactualhole ( int  x,
int  y,
struct monst madeby,
int  ttyp 
)
boolean dighole ( boolean  pit_only )
STATIC_DCL void FDECL ( mkcavepos  ,
(XCHAR_P, XCHAR_P, int, BOOLEAN_P, BOOLEAN_P)   
)
STATIC_DCL int FDECL ( dig_typ  ,
(struct obj *, XCHAR_P, XCHAR_P)   
)
STATIC_DCL void FDECL ( mkcavearea  ,
(BOOLEAN_P)   
)
STATIC_DCL schar FDECL ( fillholetyp  ,
(int, int)   
)
STATIC_OVL schar fillholetyp ( int  x,
int  y 
)

References COLNO, DB_LAVA, DB_MOAT, DB_UNDER, DRAWBRIDGE_UP, drawbridgemask, LAVAPOOL, levl, max, min, MOAT, POOL, rn2(), ROOM, and ROWNO.

Referenced by dighole().

Here is the call graph for this function:

Here is the caller graph for this function:

int holetime (  )

References dig(), digging, dig_info::effort, u, and you::ushops.

Referenced by shk_move().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean is_digging (  )

References dig(), FALSE, and TRUE.

Referenced by watch_dig(), and watch_on_duty().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean mdig_tunnel ( struct monst mtmp )
STATIC_OVL void mkcavearea ( boolean  rockit )

References CORR, delay_output, display_nhwindow, flush_screen(), levl, mkcavepos(), newsym(), pline(), rm_waslit(), ROOM, TRUE, u, you::ux, you::uy, vision_full_recalc, WIN_MESSAGE, xmax, xmin, ymax, and ymin.

Referenced by dig().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void mkcavepos ( xchar  x,
xchar  y,
int  dist,
boolean  waslit,
boolean  rockit 
)

References Blind, COULD_SEE, monst::data, FALSE, feel_location(), IN_SIGHT, IS_ROCK, isok(), levl, m_at, newsym(), passes_walls, rloc(), ROOM, rm::seenv, STONE, t_at(), TRUE, rm::typ, unblock_point(), and viz_array.

Referenced by mkcavearea().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL boolean NDECL ( rm_waslit   )
STATIC_DCL int NDECL ( dig   )
STATIC_DCL void NDECL ( dig_up_grave   )
STATIC_OVL boolean rm_waslit (  )

References FALSE, isok(), levl, ROOM, TRUE, u, you::ux, and you::uy.

Referenced by mkcavearea().

Here is the call graph for this function:

Here is the caller graph for this function:

void rot_corpse ( genericptr_t  arg,
long  timeout 
)
void rot_organic ( genericptr_t  arg,
long  timeout 
)

References bury_an_obj(), obj::cobj, Has_contents, obfree(), obj_extract_self(), obj::ox, and obj::oy.

Referenced by rot_corpse().

Here is the call graph for this function:

Here is the caller graph for this function:

void unearth_objs ( int  x,
int  y 
)

References dlevel_t::buriedobjlist, del_engr_at(), level, newsym(), obj::nobj, obj_extract_self(), otmp, obj::ox, obj::oy, place_object(), pline(), ROT_ORGANIC, stackobj(), stop_timer(), and obj::timed.

Referenced by dighole(), maketrap(), and melt_ice().

Here is the call graph for this function:

Here is the caller graph for this function:

int use_pick_axe ( struct obj obj )

References dig_typ(), DIGTYP_UNDIGGABLE, you::dx, you::dy, you::dz, getdir(), iflags, is_pick, isok(), movecmd(), ndir, instance_flags::num_pad, pline(), QBUFSZ, sdir, Sprintf, TT_WEB, u, use_pick_axe2(), you::utrap, you::utraptype, uwep, you::ux, you::uy, and wield_tool().

Referenced by doapply().

Here is the call graph for this function:

Here is the caller graph for this function:

int use_pick_axe2 ( struct obj obj )
void watch_dig ( struct monst mtmp,
xchar  x,
xchar  y,
boolean  zap 
)
void zap_dig (  )

Variable Documentation

NEARDATA boolean did_dig_msg [static]

Referenced by dig(), and use_pick_axe2().