#include "hack.h"
#include "lev.h"
Data Structures | |
struct | wseg |
Defines | |
#define | newseg() (struct wseg *) alloc(sizeof(struct wseg)) |
#define | dealloc_seg(wseg) free((genericptr_t) (wseg)) |
Functions | |
STATIC_DCL void | FDECL (toss_wsegs,(struct wseg *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (shrink_worm,(int)) |
STATIC_DCL void | FDECL (random_dir,(XCHAR_P, XCHAR_P, xchar *, xchar *)) |
STATIC_DCL struct wseg * | FDECL (create_worm_tail,(int)) |
int | get_wormno () |
void | initworm (struct monst *worm, int wseg_count) |
STATIC_OVL void | toss_wsegs (struct wseg *curr, boolean display_update) |
STATIC_OVL void | shrink_worm (int wnum) |
void | worm_move (struct monst *worm) |
void | worm_nomove (struct monst *worm) |
void | wormgone (struct monst *worm) |
void | wormhitu (struct monst *worm) |
void | cutoff (struct monst *worm, struct wseg *tail) |
void | cutworm (struct monst *worm, xchar x, xchar y, struct obj *weap) |
void | see_wsegs (struct monst *worm) |
void | detect_wsegs (struct monst *worm, boolean use_detection_glyph) |
void | save_worm (int fd, int mode) |
void | rest_worm (int fd) |
void | place_wsegs (struct monst *worm) |
void | remove_worm (struct monst *worm) |
void | place_worm_tail_randomly (struct monst *worm, xchar x, xchar y) |
STATIC_OVL void | random_dir (xchar x, xchar y, xchar *nx, xchar *ny) |
int | count_wsegs (struct monst *mtmp) |
STATIC_OVL struct wseg * | create_worm_tail (int num_segs) |
boolean | worm_known (struct monst *worm) |
void | flip_worm_segs_vertical (struct monst *worm, int y) |
void | flip_worm_segs_horizontal (struct monst *worm, int x) |
Variables | |
struct wseg * | wheads [MAX_NUM_WORMS] = DUMMY |
struct wseg * | wtails [MAX_NUM_WORMS] = DUMMY |
long | wgrowtime [MAX_NUM_WORMS] = DUMMY |
#define dealloc_seg | ( | wseg ) | free((genericptr_t) (wseg)) |
Referenced by save_worm(), and toss_wsegs().
Referenced by create_worm_tail(), initworm(), rest_worm(), and worm_move().
int count_wsegs | ( | struct monst * | mtmp ) |
References wseg::nseg.
Referenced by digactualhole(), keepdogs(), makemon(), migrate_to_level(), mintrap(), and newcham().
STATIC_OVL struct wseg* create_worm_tail | ( | int | num_segs ) | [read] |
References newseg, wseg::nseg, wseg::wx, and wseg::wy.
Referenced by initworm().
References flags, flag::mon_moving, mon_nam(), pline(), toss_wsegs(), and TRUE.
Referenced by cutworm().
References clone_mon(), cutoff(), d(), flags, get_wormno(), is_blade, monst::m_lev, max, monst::mhp, monst::mhpmax, flag::mon_moving, mon_nam(), Monnam(), wseg::nseg, place_wsegs(), pline(), remove_monster(), rn2(), rnd(), shrink_worm(), wseg::wx, and wseg::wy.
Referenced by known_hitum(), and thitmonst().
References detected_monnum_to_glyph, monnum_to_glyph, wseg::nseg, PM_LONG_WORM_TAIL, show_glyph(), what_mon, wseg::wx, and wseg::wy.
Referenced by monster_detect().
STATIC_DCL void FDECL | ( | shrink_worm | , |
(int) | |||
) |
STATIC_DCL struct wseg* FDECL | ( | create_worm_tail | , |
(int) | |||
) | [read] |
STATIC_DCL void FDECL | ( | toss_wsegs | , |
(struct wseg *, BOOLEAN_P) | |||
) |
void flip_worm_segs_horizontal | ( | struct monst * | worm, |
int | x | ||
) |
References wseg::nseg, and wseg::wx.
Referenced by flip_level().
void flip_worm_segs_vertical | ( | struct monst * | worm, |
int | y | ||
) |
References wseg::nseg, and wseg::wy.
Referenced by flip_level().
int get_wormno | ( | ) |
References MAX_NUM_WORMS.
Referenced by cutworm(), makemon(), mon_arrive(), and newcham().
void initworm | ( | struct monst * | worm, |
int | wseg_count | ||
) |
References create_worm_tail(), newseg, wseg::nseg, wseg::wx, and wseg::wy.
Referenced by makemon(), mon_arrive(), and newcham().
References FALSE, goodpos(), newsym(), wseg::nseg, place_worm_seg, random_dir(), toss_wsegs(), wseg::wx, and wseg::wy.
Referenced by makemon(), newcham(), and rloc_to().
void place_wsegs | ( | struct monst * | worm ) |
References wseg::nseg, place_worm_seg, wseg::wx, and wseg::wy.
Referenced by cutworm(), getlev(), and replmon().
References COLNO, rn2(), and ROWNO.
Referenced by place_worm_tail_randomly().
void remove_worm | ( | struct monst * | worm ) |
References newsym(), wseg::nseg, remove_monster(), wseg::wx, and wseg::wy.
Referenced by mnearto(), movebubbles(), and rloc_to().
void rest_worm | ( | int | fd ) |
References MAX_NUM_WORMS, mread(), newseg, wseg::nseg, wseg::wx, and wseg::wy.
Referenced by getlev().
void save_worm | ( | int | fd, |
int | mode | ||
) |
References bwrite(), dealloc_seg, MAX_NUM_WORMS, wseg::nseg, perform_bwrite, release_data, wseg::wx, and wseg::wy.
Referenced by savelev().
void see_wsegs | ( | struct monst * | worm ) |
References newsym(), wseg::nseg, wseg::wx, and wseg::wy.
Referenced by m_move(), mon_set_minvis(), and see_monsters().
STATIC_OVL void shrink_worm | ( | int | wnum ) |
References wseg::nseg, toss_wsegs(), and TRUE.
Referenced by cutworm(), worm_move(), and worm_nomove().
References dealloc_seg, newsym(), wseg::nseg, and remove_monster().
Referenced by cutoff(), place_worm_tail_randomly(), shrink_worm(), and wormgone().
References cansee, FALSE, wseg::nseg, TRUE, wseg::wx, and wseg::wy.
Referenced by lookat(), and monkilled().
void worm_move | ( | struct monst * | worm ) |
References MHPMAX, moves, newseg, newsym(), wseg::nseg, place_worm_seg, rn1, rnd(), shrink_worm(), wseg::wx, and wseg::wy.
Referenced by m_move(), mattacku(), use_defensive(), and use_misc().
void worm_nomove | ( | struct monst * | worm ) |
References shrink_worm().
Referenced by m_move().
void wormgone | ( | struct monst * | worm ) |
References toss_wsegs(), and TRUE.
Referenced by keepdogs(), m_detach(), migrate_to_level(), and newcham().
void wormhitu | ( | struct monst * | worm ) |
References distu, mattacku(), wseg::nseg, wseg::wx, and wseg::wy.
long wgrowtime[MAX_NUM_WORMS] = DUMMY |