#include "hack.h"
#include "lev.h"
Defines | |
#define | NO_CALLBACK (-1) |
#define | INSIDE_GAS_CLOUD 0 |
#define | EXPIRE_GAS_CLOUD 1 |
#define | REVIVE_CTHULHU 2 |
Functions | |
boolean | FDECL (inside_gas_cloud,(genericptr, genericptr)) |
boolean | FDECL (expire_gas_cloud,(genericptr, genericptr)) |
boolean | FDECL (revive_cthulhu,(genericptr, genericptr)) |
boolean | FDECL (inside_rect,(NhRect *, int, int)) |
boolean | FDECL (inside_region,(NhRegion *, int, int)) |
NhRegion * | FDECL (create_region,(NhRect *, int)) |
void | FDECL (add_rect_to_reg,(NhRegion *, NhRect *)) |
void | FDECL (add_mon_to_reg,(NhRegion *, struct monst *)) |
void | FDECL (remove_mon_from_reg,(NhRegion *, struct monst *)) |
boolean | FDECL (mon_in_region,(NhRegion *, struct monst *)) |
void | FDECL (free_region,(NhRegion *)) |
void | FDECL (add_region,(NhRegion *)) |
void | FDECL (remove_region,(NhRegion *)) |
static void | FDECL (reset_region_mids,(NhRegion *)) |
boolean | inside_rect (NhRect *r, int x, int y) |
boolean | inside_region (NhRegion *reg, int x, int y) |
NhRegion * | create_region (NhRect *rects, int nrect) |
void | add_rect_to_reg (NhRegion *reg, NhRect *rect) |
void | add_mon_to_reg (NhRegion *reg, struct monst *mon) |
void | remove_mon_from_reg (NhRegion *reg, struct monst *mon) |
boolean | mon_in_region (NhRegion *reg, struct monst *mon) |
void | free_region (NhRegion *reg) |
void | add_region (NhRegion *reg) |
void | remove_region (NhRegion *reg) |
void | clear_regions () |
void | run_regions () |
boolean | in_out_region (xchar x, xchar y) |
boolean | m_in_out_region (struct monst *mon, xchar x, xchar y) |
void | update_player_regions () |
void | update_monster_region (struct monst *mon) |
NhRegion * | visible_region_at (xchar x, xchar y) |
void | show_region (NhRegion *reg, xchar x, xchar y) |
void | save_regions (int fd, int mode) |
void | rest_regions (int fd, boolean ghostly) |
static void | reset_region_mids (NhRegion *reg) |
boolean | expire_gas_cloud (genericptr_t p1, genericptr_t p2) |
boolean | revive_cthulhu (genericptr_t p1, genericptr_t p2) |
boolean | inside_gas_cloud (genericptr_t p1, genericptr_t p2) |
NhRegion * | create_cthulhu_death_cloud (xchar x, xchar y, int radius, size_t damage, int duration) |
NhRegion * | create_gas_cloud (xchar x, xchar y, int radius, size_t damage, int duration) |
Variables | |
static NhRegion ** | regions |
static int | n_regions = 0 |
static int | max_regions = 0 |
static callback_proc | callbacks [] |
#define EXPIRE_GAS_CLOUD 1 |
Referenced by create_gas_cloud().
#define INSIDE_GAS_CLOUD 0 |
Referenced by create_gas_cloud().
#define NO_CALLBACK (-1) |
Referenced by create_region(), in_out_region(), m_in_out_region(), and run_regions().
#define REVIVE_CTHULHU 2 |
Referenced by create_cthulhu_death_cloud().
References monst::m_id, and MONST_INC.
Referenced by add_region(), m_in_out_region(), and update_monster_region().
References nhrect::hx, nhrect::hy, nhrect::lx, nhrect::ly, and rect.
Referenced by create_gas_cloud().
void add_region | ( | NhRegion * | reg ) |
References add_mon_to_reg(), cansee, clear_hero_inside, inside_region(), isok(), level, max_regions, MON_AT, dlevel_t::monsters, n_regions, newsym(), regions, set_hero_inside, u, you::ux, and you::uy.
Referenced by create_gas_cloud().
void clear_regions | ( | ) |
References free_region(), max_regions, and n_regions.
Referenced by clear_level_structures(), rest_regions(), and save_regions().
References create_gas_cloud(), NhRegion::expire_f, and REVIVE_CTHULHU.
Referenced by cthulhu_dies().
References add_rect_to_reg(), add_region(), NhRegion::arg, cmap_to_glyph, create_region(), NhRegion::expire_f, EXPIRE_GAS_CLOUD, flags, NhRegion::glyph, nhrect::hx, nhrect::hy, in_mklev, NhRegion::inside_f, INSIDE_GAS_CLOUD, nhrect::lx, nhrect::ly, flag::mon_moving, S_cloud, set_heros_fault, TRUE, NhRegion::ttl, and NhRegion::visible.
Referenced by bagotricks(), create_cthulhu_death_cloud(), and seffects().
References NhRegion::arg, NhRegion::attach_2_m, NhRegion::attach_2_u, NhRegion::bounding_box, NhRegion::can_enter_f, NhRegion::can_leave_f, clear_hero_inside, clear_heros_fault, NhRegion::enter_f, NhRegion::enter_msg, NhRegion::expire_f, FALSE, nhrect::hx, nhrect::hy, NhRegion::inside_f, NhRegion::leave_f, NhRegion::leave_msg, nhrect::lx, nhrect::ly, NhRegion::max_monst, NhRegion::monsters, NhRegion::n_monst, NO_CALLBACK, NhRegion::nrects, NhRegion::rects, and NhRegion::ttl.
Referenced by create_gas_cloud().
boolean expire_gas_cloud | ( | genericptr_t | p1, |
genericptr_t | p2 | ||
) |
References NhRegion::arg, FALSE, if(), TRUE, and NhRegion::ttl.
Referenced by revive_cthulhu().
boolean FDECL | ( | inside_gas_cloud | , |
(genericptr, genericptr) | |||
) |
boolean FDECL | ( | expire_gas_cloud | , |
(genericptr, genericptr) | |||
) |
void FDECL | ( | free_region | , |
(NhRegion *) | |||
) |
boolean FDECL | ( | revive_cthulhu | , |
(genericptr, genericptr) | |||
) |
void FDECL | ( | add_region | , |
(NhRegion *) | |||
) |
void FDECL | ( | remove_region | , |
(NhRegion *) | |||
) |
static void FDECL | ( | reset_region_mids | , |
(NhRegion *) | |||
) | [static] |
void free_region | ( | NhRegion * | reg ) |
References NhRegion::attach_2_u, clear_hero_inside, FALSE, hero_inside, inside_region(), n_regions, NO_CALLBACK, pline(), set_hero_inside, and TRUE.
Referenced by domove(), goto_level(), hurtle_step(), and teleok().
boolean inside_gas_cloud | ( | genericptr_t | p1, |
genericptr_t | p2 | ||
) |
References AD_DRST, NhRegion::arg, Blind, body_part(), breathless, Breathless, cansee, monst::data, FALSE, haseyes, heros_fault, if(), killed(), KILLED_BY_AN, losehp(), LUNG, make_blinded(), makeplural(), monst::mhp, monkilled(), Monnam(), monst::mx, monst::my, nonliving, pline(), Poison_resistance, resists_poison, rnd(), setmangry(), Something, TRUE, and youmonst.
References FALSE, inside_rect(), and TRUE.
Referenced by add_region(), in_out_region(), m_in_out_region(), remove_region(), update_monster_region(), update_player_regions(), and visible_region_at().
References add_mon_to_reg(), NhRegion::attach_2_u, FALSE, hero_inside, inside_region(), mon, mon_in_region(), n_regions, NO_CALLBACK, remove_mon_from_reg(), and TRUE.
Referenced by dog_move(), kickdmg(), m_move(), and mhurtle_step().
References FALSE, monst::m_id, and TRUE.
Referenced by m_in_out_region(), and update_monster_region().
References monst::m_id.
Referenced by m_in_out_region(), and update_monster_region().
void remove_region | ( | NhRegion * | reg ) |
References cansee, free_region(), inside_region(), isok(), n_regions, and newsym().
Referenced by rest_regions(), and run_regions().
static void reset_region_mids | ( | NhRegion * | reg ) | [static] |
References lookup_id_mapping(), and NhRegion::n_monst.
Referenced by rest_regions().
void rest_regions | ( | int | fd, |
boolean | ghostly | ||
) |
References clear_hero_inside, clear_heros_fault, clear_regions(), NhRegion::enter_msg, NhRegion::leave_msg, NhRegion::max_monst, max_regions, NhRegion::monsters, moves, mread(), NhRegion::n_monst, n_regions, NhRegion::nrects, NhRegion::rects, remove_region(), reset_region_mids(), and NhRegion::ttl.
Referenced by getlev().
boolean revive_cthulhu | ( | genericptr_t | p1, |
genericptr_t | p2 | ||
) |
References NhRegion::bounding_box, canseemon, enexto(), expire_gas_cloud(), nhrect::hx, nhrect::hy, nhrect::lx, nhrect::ly, makemon(), MM_NOCOUNTBIRTH, Monnam(), mons, NO_MINVENT, pline(), PM_CTHULHU, wakeup(), nhcoord::x, and nhcoord::y.
void run_regions | ( | ) |
References find_mid(), FM_FMON, hero_inside, NhRegion::inside_f, monst::mhp, NhRegion::monsters, NhRegion::n_monst, n_regions, NO_CALLBACK, remove_region(), and NhRegion::ttl.
Referenced by moveloop().
void save_regions | ( | int | fd, |
int | mode | ||
) |
save_regions :
References bwrite(), clear_regions(), NhRegion::enter_msg, NhRegion::leave_msg, moves, NhRegion::n_monst, n_regions, NhRegion::nrects, perform_bwrite, and release_data.
Referenced by savelev().
References show_glyph().
Referenced by newsym().
void update_monster_region | ( | struct monst * | mon ) |
References add_mon_to_reg(), inside_region(), mon_in_region(), n_regions, and remove_mon_from_reg().
Referenced by do_entity(), and rloc_to().
void update_player_regions | ( | ) |
References clear_hero_inside, inside_region(), n_regions, set_hero_inside, u, you::ux, and you::uy.
Referenced by teleds().
References inside_region(), and n_regions.
Referenced by newsym().
callback_proc callbacks[] [static] |
{ #define INSIDE_GAS_CLOUD inside_gas_cloud, #define EXPIRE_GAS_CLOUD expire_gas_cloud, #define REVIVE_CTHULHU revive_cthulhu }
int max_regions = 0 [static] |
Referenced by add_region(), clear_regions(), and rest_regions().
int n_regions = 0 [static] |
Referenced by add_region().