#include "hack.h"
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 entity * | FDECL (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 entity * | e_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] |
Referenced by destroy_drawbridge(), and do_entity().
#define is_u | ( | etmp ) | (etmp->emon == &youmonst) |
Referenced by automiss(), destroy_drawbridge(), do_entity(), e_died(), e_jumps(), e_missed(), e_nam(), E_phrase(), and e_survives_at().
#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().
References is_u, noncorporeal, passes_walls, and Passes_walls.
Referenced by destroy_drawbridge(), do_entity(), and e_missed().
boolean close_drawbridge | ( | int | x, |
int | y | ||
) |
Close the drawbridge located at x,y
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().
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().
void destroy_drawbridge | ( | int | x, |
int | y | ||
) |
References automiss(), BOULDER, cansee, CRUSHING, D_NODOOR, DB_ICE, DB_LAVA, DB_MOAT, DB_UNDER, deltrap(), do_entity(), does_block(), DOOR, DRAWBRIDGE_UP, e_canseemon, e_died(), e_missed(), E_phrase(), entity::edata, flags, flooreffects(), get_wall_for_db(), Hallucination, ICE, ICED_MOAT, IS_DRAWBRIDGE, is_pool(), Is_stronghold, is_u, KILLED_BY_AN, killer, killer_format, LAVAPOOL, levl, MOAT, newsym(), obj_extract_self(), occupants, otmp, pline(), ROOM, set_entity(), sobj_at(), flag::soundok, t_at(), TRUE, rm::typ, u, you::uevent, unblock_point(), you::uz, and wake_nearto().
Referenced by bhit(), digactualhole(), dighole(), mbhit(), and zap_updown().
STATIC_OVL void do_entity | ( | struct entity * | etmp ) |
References automiss(), BURNING, CRUSHING, DRAWBRIDGE_DOWN, DROWNING, e_at(), e_canseemon, e_died(), e_jumps(), e_missed(), e_nam(), E_phrase(), e_survives_at(), FALSE, find_drawbridge(), flags, get_wall_for_db(), Hallucination, is_db_wall(), IS_DRAWBRIDGE, is_floater, is_flyer, is_lava(), is_pool(), is_u, KILLED_BY_AN, killer, killer_format, levl, NO_KILLER_PREFIX, pline(), remove_monster(), flag::soundok, spoteffects(), TRUE, rm::typ, u, update_monster_region(), you::ux, you::uy, and wait_synch.
Referenced by close_drawbridge(), destroy_drawbridge(), and open_drawbridge().
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().
STATIC_OVL void e_died | ( | struct entity * | etmp, |
int | dest, | ||
int | how | ||
) |
References BURNING, done(), drown(), DROWNING, e_survives_at(), entity::emon, enexto(), ENTITIES, FALSE, flags, Hallucination, is_u, KILLED_BY_AN, killer, killer_format, lava_effects(), mk_corpse, mk_message, flag::mon_moving, monkilled(), occupants, pline(), teleds(), u, you::ux, you::uy, nhcoord::x, xkilled(), and nhcoord::y.
Referenced by destroy_drawbridge(), and do_entity().
References Confusion, E_phrase(), FALSE, Fumbling, is_db_wall(), is_u, pline(), rnd(), Sleeping, Stunned, and TRUE.
Referenced by do_entity().
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().
STATIC_OVL const char* e_nam | ( | struct entity * | etmp ) |
References is_u, and mon_nam().
Referenced by do_entity().
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().
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().
STATIC_DCL void FDECL | ( | u_to_e | , |
(struct entity *) | |||
) |
STATIC_DCL void FDECL | ( | e_died | , |
(struct entity *, int, int) | |||
) |
STATIC_DCL void FDECL | ( | get_wall_for_db | , |
(int *, int *) | |||
) |
STATIC_DCL void FDECL | ( | set_entity | , |
(int, int, struct entity *) | |||
) |
STATIC_DCL struct entity* FDECL | ( | e_at | , |
(int, int) | |||
) | [read] |
STATIC_DCL void FDECL | ( | do_entity | , |
(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().
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().
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().
int is_drawbridge_wall | ( | int | x, |
int | y | ||
) |
References DB_DIR, DB_EAST, DB_NORTH, DB_SOUTH, DB_WEST, DBWALL, DOOR, drawbridgemask, IS_DRAWBRIDGE, levl, and rm::typ.
Referenced by dfeature_at(), digactualhole(), dighole(), do_play_instrument(), dokick(), find_drawbridge(), lookat(), pick_lock(), use_defensive(), and zap_updown().
boolean is_ice | ( | int | x, |
int | y | ||
) |
References DB_ICE, DB_UNDER, DRAWBRIDGE_UP, drawbridgemask, FALSE, ICE, isok(), levl, and TRUE.
Referenced by bury_an_obj(), dfeature_at(), dofiretrap(), domove(), dosit(), engrave(), find_defensive(), kick_object(), mintrap(), obj_timer_checks(), read_engr_at(), slip_or_trip(), spoteffects(), surface(), wipe_engr_at(), zap_over_floor(), and zap_updown().
boolean is_lava | ( | int | x, |
int | y | ||
) |
References DB_LAVA, DB_UNDER, DRAWBRIDGE_UP, drawbridgemask, FALSE, isok(), LAVAPOOL, levl, and TRUE.
Referenced by able_to_loot(), badpos(), bhit(), boulder_hits_pool(), could_reach_item(), dfeature_at(), dig_check(), dighole(), do_entity(), domove(), dopickup(), dosit(), e_survives_at(), engrave(), find_defensive(), float_down(), flooreffects(), floorfood(), goodpos(), is_ok_location(), look_here(), lookaround(), lookat(), mfndpos(), minliquid(), moveloop(), occupied(), pick_lock(), pickup(), polyman(), polymon(), spoteffects(), surface(), test_move(), use_pick_axe2(), use_trap(), waterbody_name(), zap_over_floor(), and zap_updown().
boolean is_pool | ( | int | x, |
int | y | ||
) |
References DB_MOAT, DB_UNDER, DRAWBRIDGE_UP, drawbridgemask, FALSE, isok(), levl, MOAT, POOL, TRUE, and WATER.
Referenced by able_to_loot(), attack_checks(), badpos(), bhit(), Boots_off(), boulder_hits_pool(), could_reach_item(), damageum(), destroy_drawbridge(), dfeature_at(), dig_check(), dighole(), do_entity(), dodip(), dofiretrap(), dog_eat(), dokick(), domove(), dopickup(), dosit(), drag_ball(), drop_ball(), drown(), e_missed(), e_survives_at(), engrave(), feel_location(), fig_transform(), find_defensive(), fixup_special(), float_down(), flooreffects(), floorfood(), goodpos(), hatch_egg(), hitmu(), hitval(), is_ok_location(), kick_object(), look_here(), lookaround(), lookat(), m_move(), make_familiar(), makemon(), mattacku(), melt_ice(), mfndpos(), minliquid(), mkinvpos(), mkroll_launch(), mktrap(), mondied(), moveloop(), mpickstuff(), newcham(), newsym(), occupied(), pick_lock(), pickup(), polyman(), polymon(), polyself(), slip_or_trip(), spoteffects(), surface(), teleds(), test_move(), under_water(), use_defensive(), use_figurine(), use_grapple(), use_pick_axe2(), use_trap(), vision_recalc(), water_friction(), xkilled(), zap_over_floor(), and zap_updown().
References entity::edata, entity::emon, entity::ex, entity::ey, mons, and PM_LONG_WORM_TAIL.
Referenced by set_entity().
void open_drawbridge | ( | int | x, |
int | y | ||
) |
References cansee, D_NODOOR, delallobj(), deltrap(), distu, do_entity(), DOOR, DRAWBRIDGE_DOWN, DRAWBRIDGE_UP, get_wall_for_db(), Is_stronghold, levl, newsym(), occupants, revive_nasty(), set_entity(), t_at(), TRUE, rm::typ, u, you::uevent, unblock_point(), you::uz, trap::x, and trap::y.
Referenced by bhit(), do_play_instrument(), openone(), and zap_updown().
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().
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().
Referenced by close_drawbridge(), destroy_drawbridge(), e_at(), e_died(), and open_drawbridge().