Functions | Variables

detect.c File Reference

#include "hack.h"
#include "artifact.h"
Include dependency graph for detect.c:

Functions

STATIC_DCL void FDECL (do_dknown_of,(struct obj *))
STATIC_DCL boolean FDECL (check_map_spot,(int, int, CHAR_P, unsigned))
STATIC_DCL boolean FDECL (clear_stale_map,(CHAR_P, unsigned))
STATIC_DCL void FDECL (sense_trap,(struct trap *, XCHAR_P, XCHAR_P, int))
STATIC_DCL void FDECL (show_map_spot,(int, int))
STATIC_PTR void FDECL (findone,(int, int, genericptr_t))
STATIC_PTR void FDECL (openone,(int, int, genericptr_t))
struct objo_in (struct obj *obj, char oclass)
struct objo_material (struct obj *obj, unsigned material)
STATIC_OVL void do_dknown_of (struct obj *obj)
STATIC_OVL boolean check_map_spot (int x, int y, char oclass, unsigned material)
STATIC_OVL boolean clear_stale_map (char oclass, unsigned material)
int gold_detect (struct obj *sobj)
int food_detect (struct obj *sobj)
int object_detect (struct obj *detector, int class)
int monster_detect (struct obj *otmp, int mclass)
STATIC_OVL void sense_trap (struct trap *trap, xchar x, xchar y, int src_cursed)
int trap_detect (struct obj *sobj)
const char * level_distance (d_level *where)
void use_crystal_ball (struct obj *obj)
STATIC_OVL void show_map_spot (int x, int y)
void do_mapping ()
void do_vicinity_map ()
void cvt_sdoor_to_door (struct rm *lev)
STATIC_PTR void findone (int zx, int zy, genericptr_t num)
STATIC_PTR void openone (int zx, int zy, genericptr_t num)
int findit ()
int openit ()
void find_trap (struct trap *trap)
int dosearch0 (int aflag)
int dosearch ()
void sokoban_detect ()

Variables

boolean known
struct {
   const char *   what
   d_level *   where
level_detects []

Function Documentation

STATIC_OVL boolean check_map_spot ( int  x,
int  y,
char  oclass,
unsigned  material 
)

References ALL_CLASSES, COIN_CLASS, FALSE, glyph_at(), glyph_is_object, glyph_to_obj, GOLD, level, m_at, monst::mgold, monst::minvent, obj::nobj, o_in(), o_material(), objects, dlevel_t::objects, otmp, and TRUE.

Referenced by clear_stale_map().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean clear_stale_map ( char  oclass,
unsigned  material 
)

References check_map_spot(), COLNO, FALSE, ROWNO, TRUE, and unmap_object().

Referenced by food_detect(), gold_detect(), and object_detect().

Here is the call graph for this function:

Here is the caller graph for this function:

void cvt_sdoor_to_door ( struct rm lev )

References D_CLOSED, D_LOCKED, D_NODOOR, DOOR, Is_rogue_level, u, you::uz, and WM_MASK.

Referenced by dig(), dokick(), dosearch0(), findone(), mdig_tunnel(), openone(), seffects(), stock_room(), and use_stethoscope().

Here is the caller graph for this function:

STATIC_OVL void do_dknown_of ( struct obj obj )

References obj::cobj, Has_contents, obj::nobj, and otmp.

Referenced by object_detect().

Here is the caller graph for this function:

void do_mapping (  )

References A_WIS, COLNO, display_nhwindow, docrt(), exercise(), dlevel_t::flags, flush_screen(), level, ROWNO, show_map_spot(), TRUE, u, Underwater, and WIN_MAP.

Referenced by dosit(), and seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

void do_vicinity_map (  )

References COLNO, display_nhwindow, docrt(), dlevel_t::flags, flush_screen(), level, ROWNO, show_map_spot(), TRUE, u, Underwater, you::ux, you::uy, and WIN_MAP.

Referenced by moveloop(), and spelleffects().

Here is the call graph for this function:

Here is the caller graph for this function:

int dosearch (  )

References dosearch0().

Here is the call graph for this function:

int dosearch0 ( int  aflag )
STATIC_DCL void FDECL ( sense_trap  ,
(struct trap *, XCHAR_P, XCHAR_P, int)   
)
STATIC_DCL void FDECL ( show_map_spot  ,
(int, int)   
)
STATIC_DCL boolean FDECL ( check_map_spot  ,
(int, int, CHAR_P, unsigned)   
)
STATIC_DCL void FDECL ( do_dknown_of  ,
(struct obj *)   
)
STATIC_DCL boolean FDECL ( clear_stale_map  ,
(CHAR_P, unsigned)   
)
STATIC_PTR void FDECL ( findone  ,
(int, int, genericptr_t  
)
STATIC_PTR void FDECL ( openone  ,
(int, int, genericptr_t  
)
void find_trap ( struct trap trap )

References A_WIS, an(), Blind, cls(), defsyms, display_nhwindow, display_self, docrt(), exercise(), FALSE, feel_location(), levl, map_trap(), newsym(), trap_to_defsym, trap_to_glyph, TRUE, what_trap, and WIN_MAP.

Referenced by dosearch0(), and kick_object().

Here is the call graph for this function:

Here is the caller graph for this function:

int findit (  )

References BOLT_LIM, do_clear_area(), findone(), u, you::ux, and you::uy.

Referenced by use_bell(), and zapnodir().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_PTR void findone ( int  zx,
int  zy,
genericptr_t  num 
)

References canspotmon, CORR, cvt_sdoor_to_door(), monst::data, glyph_is_invisible, is_hider, levl, monst::m_ap_type, m_at, magic_map_background(), map_invisible(), permonst::mlet, newsym(), S_EEL, SCORR, SDOOR, seemimic(), STATUE_TRAP, t_at(), unblock_point(), and unmap_object().

Referenced by findit().

Here is the call graph for this function:

Here is the caller graph for this function:

int food_detect ( struct obj sobj )
int gold_detect ( struct obj sobj )
const char* level_distance ( d_level where )

References depth(), d_level::dnum, rn2(), u, and you::uz.

Referenced by use_crystal_ball().

Here is the call graph for this function:

Here is the caller graph for this function:

int monster_detect ( struct obj otmp,
int  mclass 
)
struct obj* o_in ( struct obj obj,
char  oclass 
) [read]

References obj::cobj, Has_contents, obj::nobj, obj::oclass, and otmp.

Referenced by check_map_spot(), food_detect(), gold_detect(), and object_detect().

Here is the caller graph for this function:

struct obj* o_material ( struct obj obj,
unsigned  material 
) [read]

References obj::cobj, Has_contents, obj::nobj, objects, otmp, and obj::otyp.

Referenced by check_map_spot(), and gold_detect().

Here is the caller graph for this function:

int object_detect ( struct obj detector,
int  class 
)
int openit (  )

References Blind, BOLT_LIM, monst::data, do_clear_area(), expels(), is_animal, Monnam(), openone(), pline(), TRUE, u, you::ustuck, you::ux, and you::uy.

Referenced by use_bell().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_PTR void openone ( int  zx,
int  zy,
genericptr_t  num 
)

References b_trapped(), cansee, CORR, cvt_sdoor_to_door(), D_CLOSED, D_ISOPEN, D_LOCKED, D_NODOOR, D_TRAPPED, distu, DOOR, doormask, find_drawbridge(), flags, Is_box, level, levl, newsym(), OBJ_AT, dlevel_t::objects, open_drawbridge(), otmp, SCORR, SDOOR, flag::soundok, STATUE_TRAP, t_at(), unblock_point(), and wake_nearto().

Referenced by openit().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void sense_trap ( struct trap trap,
xchar  x,
xchar  y,
int  src_cursed 
)

References BEAR_TRAP, obj::corpsenm, GOLD_PIECE, Hallucination, map_object(), map_trap(), obj::otyp, obj::ox, obj::oy, random_monster, random_object, trap::tx, trap::ty, trap::x, and trap::y.

Referenced by trap_detect().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void show_map_spot ( int  x,
int  y 
)

References Confusion, CORR, dlevel_t::flags, rm::glyph, glyph_is_cmap, glyph_is_object, glyph_is_trap, glyph_to_cmap, level, levl, magic_map_background(), newsym(), rn2(), ROOM, SCORR, rm::seenv, SVALL, rm::typ, and unblock_point().

Referenced by do_mapping(), and do_vicinity_map().

Here is the call graph for this function:

Here is the caller graph for this function:

void sokoban_detect (  )

References BOULDER, COLNO, CORR, instance_flags::dark_room, DOOR, ftrap, iflags, IS_WALL, level, levl, map_background(), map_object(), map_trap(), trap::ntrap, dlevel_t::objects, obj::otyp, ROWNO, SCORR, SDOOR, and SVALL.

Referenced by sp_level_coder().

Here is the call graph for this function:

Here is the caller graph for this function:

int trap_detect ( struct obj sobj )
void use_crystal_ball ( struct obj obj )

Variable Documentation

struct { ... } level_detects[] [static]

Referenced by use_crystal_ball().

const char* what