Data Structures | Defines | Functions | Variables

dbridge.c File Reference

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

Data Structures

struct  entity

Defines

#define ENTITIES   2
#define is_u(etmp)   (etmp->emon == &youmonst)
#define e_canseemon(etmp)   (is_u(etmp) ? (boolean)TRUE : canseemon(etmp->emon))
#define mk_message(dest)   ((dest & 1) ? "" : (char *)0)
#define mk_corpse(dest)   ((dest & 2) ? AD_DGST : AD_PHYS)

Functions

STATIC_DCL void FDECL (get_wall_for_db,(int *, int *))
STATIC_DCL struct entityFDECL (e_at,(int, int))
STATIC_DCL void FDECL (m_to_e,(struct monst *, int, int, struct entity *))
STATIC_DCL void FDECL (u_to_e,(struct entity *))
STATIC_DCL void FDECL (set_entity,(int, int, struct entity *))
STATIC_DCL const char * FDECL (e_nam,(struct entity *))
STATIC_DCL const char * FDECL (E_phrase,(struct entity *, const char *))
STATIC_DCL boolean FDECL (e_survives_at,(struct entity *, int, int))
STATIC_DCL void FDECL (e_died,(struct entity *, int, int))
STATIC_DCL boolean FDECL (automiss,(struct entity *))
STATIC_DCL boolean FDECL (e_missed,(struct entity *, BOOLEAN_P))
STATIC_DCL boolean FDECL (e_jumps,(struct entity *))
STATIC_DCL void FDECL (do_entity,(struct entity *))
boolean is_pool (int x, int y)
boolean is_lava (int x, int y)
boolean is_ice (int x, int y)
int is_drawbridge_wall (int x, int y)
boolean is_db_wall (int x, int y)
boolean find_drawbridge (int *x, int *y)
STATIC_OVL void get_wall_for_db (int *x, int *y)
boolean create_drawbridge (int x, int y, int dir, boolean flag)
STATIC_OVL struct entitye_at (int x, int y)
STATIC_OVL void m_to_e (struct monst *mtmp, int x, int y, struct entity *etmp)
STATIC_OVL void u_to_e (struct entity *etmp)
STATIC_OVL void set_entity (int x, int y, struct entity *etmp)
STATIC_OVL const char * e_nam (struct entity *etmp)
STATIC_OVL const char * E_phrase (struct entity *etmp, const char *verb)
STATIC_OVL boolean e_survives_at (struct entity *etmp, int x, int y)
STATIC_OVL void e_died (struct entity *etmp, int dest, int how)
STATIC_OVL boolean automiss (struct entity *etmp)
STATIC_OVL boolean e_missed (struct entity *etmp, boolean chunks)
STATIC_OVL boolean e_jumps (struct entity *etmp)
STATIC_OVL void do_entity (struct entity *etmp)
boolean close_drawbridge (int x, int y)
void open_drawbridge (int x, int y)
void destroy_drawbridge (int x, int y)

Variables

static NEARDATA struct entity occupants [ENTITIES]

Define Documentation

#define e_canseemon (   etmp )    (is_u(etmp) ? (boolean)TRUE : canseemon(etmp->emon))

Referenced by destroy_drawbridge(), and do_entity().

#define ENTITIES   2

Referenced by e_at(), and e_died().

#define is_u (   etmp )    (etmp->emon == &youmonst)
#define mk_corpse (   dest )    ((dest & 2) ? AD_DGST : AD_PHYS)

Referenced by e_died().

#define mk_message (   dest )    ((dest & 1) ? "" : (char *)0)

Referenced by e_died().


Function Documentation

STATIC_OVL boolean automiss ( struct entity etmp )

References is_u, noncorporeal, passes_walls, and Passes_walls.

Referenced by destroy_drawbridge(), do_entity(), and e_missed().

Here is the caller graph for this function:

boolean close_drawbridge ( int  x,
int  y 
)

Close the drawbridge located at x,y

Returns:
TRUE when drawbridge got closed, FALSE otherwise

References block_point(), cansee, DB_DIR, DB_EAST, DB_NORTH, DB_SOUTH, DB_WEST, DBWALL, delallobj(), deltrap(), distu, do_entity(), DRAWBRIDGE_DOWN, DRAWBRIDGE_UP, FALSE, flags, get_wall_for_db(), hugemonst, levl, m_at, newsym(), OBJ_AT, occupants, pline(), revive_nasty(), rn2(), set_entity(), flag::soundok, t_at(), TRUE, rm::typ, u, Underwater, you::ux, you::uy, W_NONDIGGABLE, trap::x, and trap::y.

Referenced by bhit(), do_play_instrument(), and zap_updown().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean create_drawbridge ( int  x,
int  y,
int  dir,
boolean  flag 
)

References D_NODOOR, DB_EAST, DB_LAVA, DB_NORTH, DB_SOUTH, DB_WEST, DBWALL, DOOR, DRAWBRIDGE_DOWN, DRAWBRIDGE_UP, FALSE, horiz, IS_WALL, LAVAPOOL, levl, TRUE, rm::typ, and W_NONDIGGABLE.

Referenced by spo_drawbridge().

Here is the caller graph for this function:

void destroy_drawbridge ( int  x,
int  y 
)
STATIC_OVL void do_entity ( struct entity etmp )
STATIC_OVL struct entity* e_at ( int  x,
int  y 
) [read]

References entity::edata, ENTITIES, entity::ex, entity::ey, occupants, pline(), and wait_synch.

Referenced by do_entity().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void e_died ( struct entity etmp,
int  dest,
int  how 
)
STATIC_OVL boolean e_jumps ( struct entity etmp )

References Confusion, E_phrase(), FALSE, Fumbling, is_db_wall(), is_u, pline(), rnd(), Sleeping, Stunned, and TRUE.

Referenced by do_entity().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean e_missed ( struct entity etmp,
boolean  chunks 
)

References automiss(), FALSE, is_db_wall(), is_floater, is_flyer, is_pool(), is_u, Levitation, pline(), rnd(), Sleeping, and TRUE.

Referenced by destroy_drawbridge(), and do_entity().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL const char* e_nam ( struct entity etmp )

References is_u, and mon_nam().

Referenced by do_entity().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL const char* E_phrase ( struct entity etmp,
const char *  verb 
)

References is_u, Monnam(), Strcat, Strcpy, and vtense().

Referenced by destroy_drawbridge(), do_entity(), and e_jumps().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean e_survives_at ( struct entity etmp,
int  x,
int  y 
)

References Amphibious, Flying, is_db_wall(), is_floater, is_flyer, is_lava(), is_pool(), is_swimmer, is_u, Levitation, likes_lava, noncorporeal, passes_walls, Passes_walls, Swimming, TRUE, and Wwalking.

Referenced by do_entity(), and e_died().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL boolean FDECL ( e_survives_at  ,
(struct entity *, int, int)   
)
STATIC_DCL void FDECL ( u_to_e  ,
(struct entity *)   
)
STATIC_DCL void FDECL ( e_died  ,
(struct entity *, int, int)   
)
STATIC_DCL boolean FDECL ( e_missed  ,
(struct entity *, BOOLEAN_P)   
)
STATIC_DCL void FDECL ( get_wall_for_db  ,
(int *, int *)   
)
STATIC_DCL void FDECL ( set_entity  ,
(int, int, struct entity *)   
)
STATIC_DCL boolean FDECL ( automiss  ,
(struct entity *)   
)
STATIC_DCL struct entity* FDECL ( e_at  ,
(int, int)   
) [read]
STATIC_DCL void FDECL ( do_entity  ,
(struct entity *)   
)
STATIC_DCL boolean FDECL ( e_jumps  ,
(struct entity *)   
)
STATIC_DCL void FDECL ( m_to_e  ,
(struct monst *, int, int, struct entity *)   
)
STATIC_DCL const char* FDECL ( e_nam  ,
(struct entity *)   
)
STATIC_DCL const char* FDECL ( E_phrase  ,
(struct entity *, const char *)   
)
boolean find_drawbridge ( int *  x,
int*  y 
)

References DB_EAST, DB_NORTH, DB_SOUTH, DB_WEST, FALSE, IS_DRAWBRIDGE, is_drawbridge_wall(), levl, TRUE, and rm::typ.

Referenced by bhit(), digactualhole(), dighole(), do_entity(), do_play_instrument(), dokick(), mbhit(), openone(), and zap_updown().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void get_wall_for_db ( int *  x,
int*  y 
)

References DB_DIR, DB_EAST, DB_NORTH, DB_SOUTH, DB_WEST, drawbridgemask, and levl.

Referenced by close_drawbridge(), destroy_drawbridge(), do_entity(), and open_drawbridge().

Here is the caller graph for this function:

boolean is_db_wall ( int  x,
int  y 
)

References DBWALL, levl, and rm::typ.

Referenced by bhit(), do_entity(), e_jumps(), e_missed(), e_survives_at(), test_move(), and zap_updown().

Here is the caller graph for this function:

int is_drawbridge_wall ( int  x,
int  y 
)
boolean is_ice ( int  x,
int  y 
)
boolean is_lava ( int  x,
int  y 
)
boolean is_pool ( int  x,
int  y 
)
STATIC_OVL void m_to_e ( struct monst mtmp,
int  x,
int  y,
struct entity etmp 
)

References entity::edata, entity::emon, entity::ex, entity::ey, mons, and PM_LONG_WORM_TAIL.

Referenced by set_entity().

Here is the caller graph for this function:

void open_drawbridge ( int  x,
int  y 
)
STATIC_OVL void set_entity ( int  x,
int  y,
struct entity etmp 
)

References entity::edata, m_at, m_to_e(), MON_AT, u, u_to_e(), you::ux, and you::uy.

Referenced by close_drawbridge(), destroy_drawbridge(), and open_drawbridge().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void u_to_e ( struct entity etmp )

References monst::data, entity::emon, u, you::ux, you::uy, and youmonst.

Referenced by set_entity().

Here is the caller graph for this function:


Variable Documentation

NEARDATA struct entity occupants[ENTITIES] [static]