version 1.86 | | version 1.87 |
---|
| | |
extern void update_buttons(mapstruct *m); | | extern void update_buttons(mapstruct *m); |
extern void use_trigger(object *op); | | extern void use_trigger(object *op); |
extern void animate_turning(object *op); | | extern void animate_turning(object *op); |
extern int check_altar_sacrifice(object *altar, object *sacrifice); | | extern int check_altar_sacrifice(const object *altar, const object *sacrifice); |
extern int operate_altar(object *altar, object **sacrifice); | | extern int operate_altar(object *altar, object **sacrifice); |
extern void trigger_move(object *op, int state); | | extern void trigger_move(object *op, int state); |
extern int check_trigger(object *op, object *cause); | | extern int check_trigger(object *op, object *cause); |
extern void add_button_link(object *button, mapstruct *map, int connected); | | extern void add_button_link(object *button, mapstruct *map, int connected); |
extern void remove_button_link(object *op); | | extern void remove_button_link(object *op); |
extern objectlink *get_button_links(object *button); | | extern objectlink *get_button_links(const object *button); |
extern int get_button_value(object *button); | | extern int get_button_value(const object *button); |
extern void do_mood_floor(object *op, object *op2); | | extern void do_mood_floor(object *op, object *op2); |
extern object *check_inv_recursive(object *op, object *trig); | | extern object *check_inv_recursive(object *op, const object *trig); |
extern void check_inv(object *op, object *trig); | | extern void check_inv(object *op, object *trig); |
extern void verify_button_links(mapstruct *map); | | extern void verify_button_links(const mapstruct *map); |
/* exp.c */ | | /* exp.c */ |
extern int new_exp(object *ob); | | extern int new_exp(const object *ob); |
extern int has_ability(object *ob); | | extern int has_ability(const object *ob); |
extern void init_experience(void); | | extern void init_experience(void); |
extern void dump_experience(void); | | extern void dump_experience(void); |
/* friend.c */ | | /* friend.c */ |
| | |
extern void remove_friendly_object(object *op); | | extern void remove_friendly_object(object *op); |
extern void dump_friendly_objects(void); | | extern void dump_friendly_objects(void); |
extern void clean_friendly_list(void); | | extern void clean_friendly_list(void); |
extern int is_friendly(object *op); | | extern int is_friendly(const object *op); |
/* glue.c */ | | /* glue.c */ |
extern void fatal(int err); | | extern void fatal(int err); |
/* holy.c */ | | /* holy.c */ |
| | |
extern void init_attackmess(void); | | extern void init_attackmess(void); |
/* item.c */ | | /* item.c */ |
extern int get_power_from_ench(int ench); | | extern int get_power_from_ench(int ench); |
extern int calc_item_power(object *op, int flag); | | extern int calc_item_power(const object *op, int flag); |
extern const typedata *get_typedata(int itemtype); | | extern const typedata *get_typedata(int itemtype); |
extern const typedata *get_typedata_by_name(const char *name); | | extern const typedata *get_typedata_by_name(const char *name); |
extern char *describe_resistance(object *op, int newline); | | extern char *describe_resistance(const object *op, int newline); |
extern char *query_weight(object *op); | | extern char *query_weight(const object *op); |
extern char *get_levelnumber(int i); | | extern char *get_levelnumber(int i); |
extern char *get_number(int i); | | extern char *get_number(int i); |
extern char *ring_desc(object *op); | | extern char *ring_desc(const object *op); |
extern const char *query_short_name(object *op); | | extern const char *query_short_name(const object *op); |
extern char *query_name(object *op); | | extern char *query_name(const object *op); |
extern const char *query_base_name(object *op, int plural); | | extern const char *query_base_name(const object *op, int plural); |
extern char *describe_item(object *op, object *owner); | | extern char *describe_item(const object *op, object *owner); |
extern int is_magical(object *op); | | extern int is_magical(const object *op); |
extern int need_identify(object *op); | | extern int need_identify(const object *op); |
extern void identify(object *op); | | extern void identify(object *op); |
/* links.c */ | | /* links.c */ |
extern objectlink *get_objectlink(void); | | extern objectlink *get_objectlink(void); |
| | |
/* living.c */ | | /* living.c */ |
extern void set_attr_value(living *stats, int attr, sint8 value); | | extern void set_attr_value(living *stats, int attr, sint8 value); |
extern void change_attr_value(living *stats, int attr, sint8 value); | | extern void change_attr_value(living *stats, int attr, sint8 value); |
extern sint8 get_attr_value(living *stats, int attr); | | extern sint8 get_attr_value(const living *stats, int attr); |
extern void check_stat_bounds(living *stats); | | extern void check_stat_bounds(living *stats); |
extern int change_abil(object *op, object *tmp); | | extern int change_abil(object *op, object *tmp); |
extern void drain_stat(object *op); | | extern void drain_stat(object *op); |
| | |
extern void remove_statbonus(object *op); | | extern void remove_statbonus(object *op); |
extern void add_statbonus(object *op); | | extern void add_statbonus(object *op); |
extern void fix_player(object *op); | | extern void fix_player(object *op); |
extern int allowed_class(object *op); | | extern int allowed_class(const object *op); |
extern void set_dragon_name(object *pl, object *abil, object *skin); | | extern void set_dragon_name(object *pl, const object *abil, const object *skin); |
extern void dragon_level_gain(object *who); | | extern void dragon_level_gain(object *who); |
extern object *give_skill_by_name(object *op, const char *skill_name); | | extern object *give_skill_by_name(object *op, const char *skill_name); |
extern void player_lvl_adj(object *who, object *op); | | extern void player_lvl_adj(object *who, object *op); |
extern sint64 level_exp(int level, double expmul); | | extern sint64 level_exp(int level, double expmul); |
extern void calc_perm_exp(object *op); | | extern void calc_perm_exp(object *op); |
extern sint64 check_exp_loss(object *op, sint64 exp); | | extern sint64 check_exp_loss(const object *op, sint64 exp); |
extern sint64 check_exp_adjust(object *op, sint64 exp); | | extern sint64 check_exp_adjust(const object *op, sint64 exp); |
extern void change_exp(object *op, sint64 exp, const char *skill_name, int flag); | | extern void change_exp(object *op, sint64 exp, const char *skill_name, int flag); |
extern void apply_death_exp_penalty(object *op); | | extern void apply_death_exp_penalty(object *op); |
extern int did_make_save(object *op, int level, int bonus); | | extern int did_make_save(const object *op, int level, int bonus); |
/* logger.c */ | | /* logger.c */ |
extern void LOG(LogLevel logLevel, const char *format, ...); | | extern void LOG(LogLevel logLevel, const char *format, ...); |
/* los.c */ | | /* los.c */ |
| | |
extern void init_block(void); | | extern void init_block(void); |
extern void clear_los(object *op); | | extern void clear_los(object *op); |
extern void expand_sight(object *op); | | extern void expand_sight(object *op); |
extern int has_carried_lights(object *op); | | extern int has_carried_lights(const object *op); |
extern void expand_lighted_sight(object *op); | | extern void expand_lighted_sight(object *op); |
extern void blinded_sight(object *op); | | extern void blinded_sight(object *op); |
extern void update_los(object *op); | | extern void update_los(object *op); |
extern void update_all_map_los(mapstruct *map); | | extern void update_all_map_los(mapstruct *map); |
extern void update_all_los(mapstruct *map, int x, int y); | | extern void update_all_los(const mapstruct *map, int x, int y); |
extern void print_los(object *op); | | extern void print_los(object *op); |
extern void make_sure_seen(object *op); | | extern void make_sure_seen(const object *op); |
extern void make_sure_not_seen(object *op); | | extern void make_sure_not_seen(const object *op); |
/* map.c */ | | /* map.c */ |
extern mapstruct *has_been_loaded(const char *name); | | extern mapstruct *has_been_loaded(const char *name); |
extern const char *create_pathname(const char *name); | | extern const char *create_pathname(const char *name); |
extern const char *create_overlay_pathname(const char *name); | | extern const char *create_overlay_pathname(const char *name); |
extern const char *create_template_pathname(const char *name); | | extern const char *create_template_pathname(const char *name); |
extern int check_path(const char *name, int prepend_dir); | | extern int check_path(const char *name, int prepend_dir); |
extern void dump_map(mapstruct *m); | | extern void dump_map(const mapstruct *m); |
extern void dump_all_maps(void); | | extern void dump_all_maps(void); |
extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny); | | extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny); |
extern int blocked_link(object *ob, mapstruct *m, int sx, int sy); | | extern int blocked_link(object *ob, mapstruct *m, int sx, int sy); |
extern int ob_blocked(object *ob, mapstruct *m, sint16 x, sint16 y); | | extern int ob_blocked(const object *ob, mapstruct *m, sint16 x, sint16 y); |
extern void fix_container(object *container); | | extern void fix_container(object *container); |
extern void load_objects(mapstruct *m, FILE *fp, int mapflags); | | extern void load_objects(mapstruct *m, FILE *fp, int mapflags); |
extern void save_objects(mapstruct *m, FILE *fp, FILE *fp2, int flag); | | extern void save_objects(mapstruct *m, FILE *fp, FILE *fp2, int flag); |
| | |
extern void dump_object(object *op); | | extern void dump_object(object *op); |
extern void dump_me(object *op, char *outstr); | | extern void dump_me(object *op, char *outstr); |
extern void dump_all_objects(void); | | extern void dump_all_objects(void); |
extern object *get_nearest_part(object *op, object *pl); | | extern object *get_nearest_part(object *op, const object *pl); |
extern object *find_object(tag_t i); | | extern object *find_object(tag_t i); |
extern object *find_object_name(char *str); | | extern object *find_object_name(const char *str); |
extern void free_all_object_data(void); | | extern void free_all_object_data(void); |
extern object *get_owner(object *op); | | extern object *get_owner(object *op); |
extern void clear_owner(object *op); | | extern void clear_owner(object *op); |
| | |
extern object *merge_ob(object *op, object *top); | | extern object *merge_ob(object *op, object *top); |
extern object *insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y); | | extern object *insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y); |
extern object *insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag); | | extern object *insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag); |
extern void replace_insert_ob_in_map(char *arch_string, object *op); | | extern void replace_insert_ob_in_map(const char *arch_string, object *op); |
extern object *get_split_ob(object *orig_ob, uint32 nr); | | extern object *get_split_ob(object *orig_ob, uint32 nr); |
extern object *decrease_ob_nr(object *op, uint32 i); | | extern object *decrease_ob_nr(object *op, uint32 i); |
extern void add_weight(object *op, signed long weight); | | extern void add_weight(object *op, signed long weight); |
extern object *insert_ob_in_ob(object *op, object *where); | | extern object *insert_ob_in_ob(object *op, object *where); |
extern int check_move_on(object *op, object *originator); | | extern int check_move_on(object *op, object *originator); |
extern object *present_arch(archetype *at, mapstruct *m, int x, int y); | | extern object *present_arch(const archetype *at, mapstruct *m, int x, int y); |
extern object *present(unsigned char type, mapstruct *m, int x, int y); | | extern object *present(unsigned char type, mapstruct *m, int x, int y); |
extern object *present_in_ob(unsigned char type, object *op); | | extern object *present_in_ob(unsigned char type, const object *op); |
extern object *present_in_ob_by_name(int type, char *str, object *op); | | extern object *present_in_ob_by_name(int type, const char *str, const object *op); |
extern object *present_arch_in_ob(archetype *at, object *op); | | extern object *present_arch_in_ob(const archetype *at, const object *op); |
extern void flag_inv(object *op, int flag); | | extern void flag_inv(object *op, int flag); |
extern void unflag_inv(object *op, int flag); | | extern void unflag_inv(object *op, int flag); |
extern void set_cheat(object *op); | | extern void set_cheat(object *op); |
extern int find_free_spot(object *ob, mapstruct *m, int x, int y, int start, int stop); | | extern int find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop); |
extern int find_first_free_spot(object *ob, mapstruct *m, int x, int y); | | extern int find_first_free_spot(const object *ob, mapstruct *m, int x, int y); |
extern void get_search_arr(int *search_arr); | | extern void get_search_arr(int *search_arr); |
extern int find_dir(mapstruct *m, int x, int y, object *exclude); | | extern int find_dir(mapstruct *m, int x, int y, object *exclude); |
extern int distance(object *ob1, object *ob2); | | extern int distance(const object *ob1, const object *ob2); |
extern int find_dir_2(int x, int y); | | extern int find_dir_2(int x, int y); |
extern int absdir(int d); | | extern int absdir(int d); |
extern int dirdiff(int dir1, int dir2); | | extern int dirdiff(int dir1, int dir2); |
extern int can_see_monsterP(mapstruct *m, int x, int y, int dir); | | extern int can_see_monsterP(mapstruct *m, int x, int y, int dir); |
extern int can_pick(object *who, object *item); | | extern int can_pick(const object *who, const object *item); |
extern object *object_create_clone(object *asrc); | | extern object *object_create_clone(object *asrc); |
extern int was_destroyed(object *op, tag_t old_tag); | | extern int was_destroyed(const object *op, tag_t old_tag); |
extern object *load_object_str(char *obstr); | | extern object *load_object_str(const char *obstr); |
extern object *find_obj_by_type_subtype(object *who, int type, int subtype); | | extern object *find_obj_by_type_subtype(const object *who, int type, int subtype); |
extern key_value *get_ob_key_link(object *ob, const char *key); | | extern key_value *get_ob_key_link(const object *ob, const char *key); |
extern const char *get_ob_key_value(object *op, const char *const key); | | extern const char *get_ob_key_value(const object *op, const char *const key); |
extern int set_ob_key_value_s(object *op, const char *canonical_key, const char *value, int add_key); | | extern int set_ob_key_value_s(object *op, const char *canonical_key, const char *value, int add_key); |
extern int set_ob_key_value(object *op, const char *key, const char *value, int add_key); | | extern int set_ob_key_value(object *op, const char *key, const char *value, int add_key); |
| | /* path.c */ |
| | extern char *path_combine(const char *src, const char *dst); |
| | extern void path_normalize(char *path); |
| | extern char *path_combine_and_normalize(const char *src, const char *dst); |
/* porting.c */ | | /* porting.c */ |
extern char *tempnam_local(const char *dir, const char *pfx); | | extern char *tempnam_local(const char *dir, const char *pfx); |
extern void remove_directory(const char *path); | | extern void remove_directory(const char *path); |
| | |
/* player.c */ | | /* player.c */ |
extern void free_player(player *pl); | | extern void free_player(player *pl); |
extern int atnr_is_dragon_enabled(int attacknr); | | extern int atnr_is_dragon_enabled(int attacknr); |
extern int is_dragon_pl(object *op); | | extern int is_dragon_pl(const object *op); |
/* quest.c */ | | /* quest.c */ |
extern int quest_is_quest_marker(object *marker, int task); | | extern int quest_is_quest_marker(const object *marker, int task); |
extern int quest_is_in_progress(object *marker, int task); | | extern int quest_is_in_progress(const object *marker, int task); |
extern int quest_is_completed(object *marker, int task); | | extern int quest_is_completed(const object *marker, int task); |
extern const char *quest_get_name(object *marker); | | extern const char *quest_get_name(const object *marker); |
extern object *quest_get_player_quest(object *pl, const char *name, const char *name_pl); | | extern object *quest_get_player_quest(const object *pl, const char *name, const char *name_pl); |
extern object *quest_get_override(object *ob, object *pl); | | extern object *quest_get_override(const object *ob, const object *pl); |
extern const char *quest_get_override_slaying(object *ob, object *pl); | | extern const char *quest_get_override_slaying(const object *ob, const object *pl); |
extern const char *quest_get_override_msg(object *ob, object *pl); | | extern const char *quest_get_override_msg(const object *ob, const object *pl); |
extern void quest_apply_items(object *wrapper, player *pl); | | extern void quest_apply_items(object *wrapper, player *pl); |
extern int quest_on_activate(object *ob, player *pl); | | extern int quest_on_activate(object *ob, player *pl); |
extern int quest_is_override_compatible(object *marker, object *pl); | | extern int quest_is_override_compatible(const object *marker, const object *pl); |
/* re-cmp.c */ | | /* re-cmp.c */ |
extern const char *re_cmp(const char *str, const char *regexp); | | extern const char *re_cmp(const char *str, const char *regexp); |
/* readable.c */ | | /* readable.c */ |
| | |
extern void init_readable(void); | | extern void init_readable(void); |
extern void change_book(object *book, int msgtype); | | extern void change_book(object *book, int msgtype); |
extern object *get_random_mon(int level); | | extern object *get_random_mon(int level); |
extern char *mon_desc(object *mon); | | extern char *mon_desc(const object *mon); |
extern object *get_next_mon(object *tmp); | | extern object *get_next_mon(object *tmp); |
extern char *mon_info_msg(int level, int booksize); | | extern char *mon_info_msg(int level, int booksize); |
extern char *artifact_msg(int level, int booksize); | | extern char *artifact_msg(int level, int booksize); |
| | |
extern void init_formulae(void); | | extern void init_formulae(void); |
extern void check_formulae(void); | | extern void check_formulae(void); |
extern void dump_alchemy(void); | | extern void dump_alchemy(void); |
extern archetype *find_treasure_by_name(treasure *t, const char *name, int depth); | | extern archetype *find_treasure_by_name(const treasure *t, const char *name, int depth); |
extern long find_ingred_cost(const char *name); | | extern long find_ingred_cost(const char *name); |
extern void dump_alchemy_costs(void); | | extern void dump_alchemy_costs(void); |
extern const char *ingred_name(const char *name); | | extern const char *ingred_name(const char *name); |
extern int strtoint(const char *buf); | | extern int strtoint(const char *buf); |
extern artifact *locate_recipe_artifact(recipe *rp, size_t idx); | | extern artifact *locate_recipe_artifact(const recipe *rp, size_t idx); |
extern int numb_ingred(const char *buf); | | extern int numb_ingred(const char *buf); |
extern recipelist *get_random_recipelist(void); | | extern recipelist *get_random_recipelist(void); |
extern recipe *get_random_recipe(recipelist *rpl); | | extern recipe *get_random_recipe(recipelist *rpl); |
| | |
/* region.c */ | | /* region.c */ |
extern region *get_region_by_name(const char *region_name); | | extern region *get_region_by_name(const char *region_name); |
extern region *get_region_by_map(mapstruct *m); | | extern region *get_region_by_map(mapstruct *m); |
extern const char *get_name_of_region_for_map(mapstruct *m); | | extern const char *get_name_of_region_for_map(const mapstruct *m); |
extern region *get_region_from_string(const char *name); | | extern region *get_region_from_string(const char *name); |
extern int region_is_child_of_region(region *child, region *r); | | extern int region_is_child_of_region(const region *child, const region *r); |
extern const char *get_region_longname(region *r); | | extern const char *get_region_longname(const region *r); |
| | extern const char *get_region_msg(const region *r); |
extern object *get_jail_exit(object *op); | | extern object *get_jail_exit(object *op); |
extern const char *get_region_msg(region *r); | | |
extern void init_regions(void); | | extern void init_regions(void); |
extern region *get_region_struct(void); | | extern region *get_region_struct(void); |
extern void parse_regions(FILE *fp); | | extern void parse_regions(FILE *fp); |
| | |
extern void create_one_treasure(treasurelist *tl, object *op, int flag, int difficulty, int tries); | | extern void create_one_treasure(treasurelist *tl, object *op, int flag, int difficulty, int tries); |
extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries); | | extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries); |
extern object *generate_treasure(treasurelist *t, int difficulty); | | extern object *generate_treasure(treasurelist *t, int difficulty); |
extern int level_for_item(object *op, int difficulty, int retmult); | | extern int level_for_item(const object *op, int difficulty, int retmult); |
extern int magic_from_difficulty(int difficulty); | | extern int magic_from_difficulty(int difficulty); |
extern void set_abs_magic(object *op, int magic); | | extern void set_abs_magic(object *op, int magic); |
extern void set_ring_bonus(object *op, int bonus); | | extern void set_ring_bonus(object *op, int bonus); |
| | |
extern void free_artifactlist(artifactlist *al); | | extern void free_artifactlist(artifactlist *al); |
extern void free_all_treasures(void); | | extern void free_all_treasures(void); |
/* utils.c */ | | /* utils.c */ |
extern int random_roll(int min, int max, object *op, int goodbad); | | extern int random_roll(int min, int max, const object *op, int goodbad); |
extern sint64 random_roll64(sint64 min, sint64 max, object *op, int goodbad); | | extern sint64 random_roll64(sint64 min, sint64 max, const object *op, int goodbad); |
extern int die_roll(int num, int size, object *op, int goodbad); | | extern int die_roll(int num, int size, const object *op, int goodbad); |
extern int rndm(int min, int max); | | extern int rndm(int min, int max); |
extern void decay_objects(mapstruct *m); | | extern void decay_objects(mapstruct *m); |
extern materialtype_t *name_to_material(const char *name); | | extern materialtype_t *name_to_material(const char *name); |
extern void transmute_materialname(object *op, object *change); | | extern void transmute_materialname(object *op, const object *change); |
extern void set_materialname(object *op, int difficulty, materialtype_t *nmt); | | extern void set_materialname(object *op, int difficulty, materialtype_t *nmt); |
extern void strip_media_tag(char *message); | | extern void strip_media_tag(char *message); |
extern const char *strrstr(const char *haystack, const char *needle); | | extern const char *strrstr(const char *haystack, const char *needle); |
| | |
extern int yyerror(char *s); | | extern int yyerror(char *s); |
extern int load_object(FILE *fp, object *op, int bufstate, int map_flags); | | extern int load_object(FILE *fp, object *op, int bufstate, int map_flags); |
extern int set_variable(object *op, char *buf); | | extern int set_variable(object *op, char *buf); |
extern void save_double(char *buf, char *name, double v); | | |
extern void init_vars(void); | | extern void init_vars(void); |
extern char *get_ob_diff(object *op, object *op2); | | extern char *get_ob_diff(object *op, object *op2); |
extern void save_object(FILE *fp, object *op, int flag); | | extern void save_object(FILE *fp, object *op, int flag); |