#include "hack.h"
#include "lev.h"
Defines | |
#define | LSF_SHOW 0x1 |
#define | LSF_NEEDS_FIXUP 0x2 |
#define | mon_is_local(mon) ((mon)->mx > 0) |
Functions | |
STATIC_DCL void | FDECL (write_ls,(int, light_source *)) |
STATIC_DCL int | FDECL (maybe_write_ls,(int, int, BOOLEAN_P)) |
void | new_light_source (xchar x, xchar y, int range, int type, genericptr_t id) |
void | del_light_source (int type, genericptr_t id) |
void | do_light_sources (char **cs_rows) |
struct monst * | find_mid (unsigned nid, unsigned fmflags) |
void | save_light_sources (int fd, int mode, int range) |
void | restore_light_sources (int fd) |
void | relink_light_sources (boolean ghostly) |
STATIC_OVL int | maybe_write_ls (int fd, int range, boolean write_it) |
STATIC_OVL void | write_ls (int fd, light_source *ls) |
void | obj_move_light_source (struct obj *src, struct obj *dest) |
boolean | any_light_source () |
void | snuff_light_source (int x, int y) |
boolean | obj_sheds_light (struct obj *obj) |
boolean | obj_is_burning (struct obj *obj) |
void | obj_split_light_source (struct obj *src, struct obj *dest) |
void | obj_merge_light_sources (struct obj *src, struct obj *dest) |
int | candle_light_range (struct obj *obj) |
Variables | |
static light_source * | light_base = 0 |
char | circle_data [] |
char | circle_start [] |
#define LSF_NEEDS_FIXUP 0x2 |
Referenced by del_light_source(), relink_light_sources(), and write_ls().
#define LSF_SHOW 0x1 |
Referenced by do_light_sources().
Referenced by maybe_write_ls(), and save_light_sources().
int candle_light_range | ( | struct obj * | obj ) |
References CANDELABRUM_OF_INVOCATION, Is_candle, and obj::quan.
Referenced by begin_burn(), obj_merge_light_sources(), and obj_split_light_source().
void del_light_source | ( | int | type, |
genericptr_t | id | ||
) |
References LS_MONSTER, LS_OBJECT, LSF_NEEDS_FIXUP, ls_t::next, and vision_full_recalc.
Referenced by cleanup_burn(), dealloc_obj(), end_burn(), m_detach(), newcham(), polyself(), rehumanize(), and replmon().
void do_light_sources | ( | char ** | cs_rows ) |
References circle_ptr, clear_path(), COLNO, COULD_SEE, ls_t::flags, get_mon_location(), get_obj_location(), ls_t::id, LS_MONSTER, LS_OBJECT, LSF_SHOW, ls_t::next, ls_t::range, ROWNO, TEMP_LIT, ls_t::type, u, you::ux, you::uy, ls_t::x, and ls_t::y.
Referenced by vision_recalc().
STATIC_DCL int FDECL | ( | maybe_write_ls | , |
(int, int, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | write_ls | , |
(int, light_source *) | |||
) |
struct monst* find_mid | ( | unsigned | nid, |
unsigned | fmflags | ||
) | [read] |
References DEADMONSTER, FM_FMON, FM_MIGRATE, FM_MYDOGS, fmon, monst::m_id, migrating_mons, mydogs, monst::nmon, and youmonst.
Referenced by relink_light_sources(), revive(), run_regions(), and write_ls().
STATIC_OVL int maybe_write_ls | ( | int | fd, |
int | range, | ||
boolean | write_it | ||
) |
References ls_t::id, LS_MONSTER, LS_OBJECT, mon_is_local, ls_t::next, obj_is_local(), RANGE_LEVEL, ls_t::type, and write_ls().
Referenced by save_light_sources().
void new_light_source | ( | xchar | x, |
xchar | y, | ||
int | range, | ||
int | type, | ||
genericptr_t | id | ||
) |
References ls_t::flags, ls_t::id, light_base, MAX_RADIUS, ls_t::next, ls_t::range, ls_t::type, vision_full_recalc, ls_t::x, and ls_t::y.
Referenced by begin_burn(), clone_mon(), makemon(), newcham(), polyself(), and replmon().
References artifact_light(), ignitable, and MAGIC_LAMP.
Referenced by drop_upon_death(), in_container(), obj_sheds_light(), and snuff_light_source().
References candle_light_range(), end_burn(), ls_t::id, LS_OBJECT, ls_t::next, ls_t::range, TRUE, ls_t::type, and vision_full_recalc.
Referenced by merged(), and use_candle().
References ls_t::id, LS_OBJECT, ls_t::next, and ls_t::type.
Referenced by realloc_obj().
References obj_is_burning().
Referenced by dealloc_obj(), mpickobj(), splitobj(), and throwit().
References candle_light_range(), ls_t::id, Is_candle, light_base, LS_OBJECT, ls_t::next, ls_t::range, ls_t::type, and vision_full_recalc.
Referenced by splitobj().
void relink_light_sources | ( | boolean | ghostly ) |
References find_mid(), find_oid(), ls_t::flags, FM_EVERYWHERE, ls_t::id, if(), lookup_id_mapping(), LS_MONSTER, LS_OBJECT, LSF_NEEDS_FIXUP, ls_t::next, and ls_t::type.
Referenced by getlev(), and restgamestate().
void restore_light_sources | ( | int | fd ) |
References light_base, and mread().
Referenced by getlev(), and restgamestate().
void save_light_sources | ( | int | fd, |
int | mode, | ||
int | range | ||
) |
References bwrite(), FALSE, ls_t::id, LS_MONSTER, LS_OBJECT, maybe_write_ls(), mon_is_local, ls_t::next, obj_is_local(), perform_bwrite, RANGE_LEVEL, release_data, TRUE, and ls_t::type.
Referenced by savegamestate(), and savelev().
void snuff_light_source | ( | int | x, |
int | y | ||
) |
References artifact_light(), end_burn(), ls_t::id, if(), LS_OBJECT, MAGIC_LAMP, ls_t::next, obj_is_burning(), obj::otyp, ls_t::type, ls_t::x, and ls_t::y.
Referenced by mpickobj(), and set_lit().
STATIC_OVL void write_ls | ( | int | fd, |
light_source * | ls | ||
) |
References bwrite(), find_mid(), find_oid(), ls_t::flags, FM_EVERYWHERE, LS_MONSTER, LS_OBJECT, LSF_NEEDS_FIXUP, monst::m_id, obj::o_id, otmp, and ls_t::type.
Referenced by maybe_write_ls().
char circle_data[] |
char circle_start[] |
light_source* light_base = 0 [static] |
Referenced by new_light_source(), obj_split_light_source(), and restore_light_sources().