Go to the documentation of this file.
128 extern const char *
i18n(
const object *
who,
const char *code);
162 extern void change_exp(
object *
op, int64_t exp,
const char *skill_name,
int flag);
165 extern void share_exp(
object *
op, int64_t exp,
const char *skill,
int flag);
218 extern
int on_same_map(const
object *op1, const
object *op2);
225 extern
char *
ob_describe(const
object *
op, const
object *observer,
int use_media_tags,
char *
buf,
size_t size);
255 extern
void object_copy(const
object *src_ob,
object *dest_ob);
275 extern
object *
object_split(
object *orig_ob, uint32_t nr,
char *err,
size_t size);
296 extern
int dirdiff(
int dir1,
int dir2);
338 extern
int isqrt(
int n);
355 extern const
char *
re_cmp(const
char *
str, const
char *regexp);
357 extern
int nstrtok(const
char *buf1, const
char *buf2);
358 extern
char *
strtoktolin(const
char *buf1, const
char *buf2,
char *retbuf,
size_t size);
413 extern
long usec_elapsed(struct timespec first, struct timespec second);
422 extern
long timespec_diff(struct timespec *end, struct timespec *start);
439 extern int64_t
random_roll64(int64_t min, int64_t
max, const
object *
op,
int goodbad);
440 extern
int die_roll(
int num,
int size, const
object *
op,
int goodbad);
441 extern
int rndm(
int min,
int max);
447 extern
void replace(const
char *src, const
char *
key, const
char *replacement,
char *
result,
size_t resultsize);
453 extern
size_t split_string(
char *
str,
char *array[],
size_t array_size,
char sep);
470 extern
void yyfree(
void *ptr);
471 extern
int load_object(FILE *fp,
object *
op,
int bufstate,
int map_flags,
bool artifact_init);
int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy)
void clear_friendly_list(void)
void path_normalize(char *path)
void share_exp(object *op, int64_t exp, const char *skill, int flag)
void object_remove_from_active_list(object *op)
void yyset_out(FILE *out_str)
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
recipelist * get_formulalist(int i)
int get_dex_bonus(int stat)
void object_unset_flag_inv(object *op, int flag)
const char * get_periodofday(const int index)
void object_add_weight(object *op, signed long weight)
void clear_los(player *pl)
mapstruct * get_empty_map(int sizex, int sizey)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
method_ret ob_process(object *op)
object * object_find_by_flag_applied(const object *who, int flag)
void query_short_name(const object *op, char *buf, size_t size)
int dirdiff(int dir1, int dir2)
unsigned int tick_length(float seconds)
StringBuffer * stringbuffer_new(void)
int object_set_value(object *op, const char *key, const char *value, int add_key)
bool object_value_set_shared(const object *op, sstring key)
void register_describe(int ob_type, describe_func method)
const Face * try_find_face(const char *name, const Face *error)
void fix_object(object *op)
void tailor_readable_ob(object *book, int msg_type)
int object_can_pick(const object *who, const object *item)
void free_player(player *pl)
const char * player_get_own_title(const struct player *pl)
int player_has_own_title(const struct player *pl)
void free_objectlinkpt(oblinkpt *obp)
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
const char * get_region_longname(const region *r)
void write_todclock(void)
void transmute_materialname(object *op, const object *change)
int calculate_difficulty(mapstruct *m)
method_ret(* trigger_func)(object *, object *, int)
void create_template_pathname(const char *name, char *buf, size_t size)
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
void init_msgfile(FILE *file, const char *filename)
const Face * find_face(const char *name)
void free_experience(void)
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
void query_base_name(const object *op, int plural, char *buf, size_t size)
void init_attackmess(BufferReader *reader, const char *filename)
object * object_find_by_type_applied(const object *who, int type)
const char * i18n(const object *who, const char *code)
void dump_arch(archetype *at, StringBuffer *sb)
object * object_find_by_type(const object *who, int type)
void animate_turning(object *op)
const Face * get_face_by_id(uint16_t id)
mapstruct * ready_map_name(const char *name, int flags)
char * path_combine(const char *src, const char *dst, char *path, size_t size)
void dump_experience(void)
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
int is_type_valid(uint8_t type)
int nstrtok(const char *buf1, const char *buf2)
int object_count_free(void)
size_t get_faces_count(void)
object * arch_present_in_ob(const archetype *at, const object *op)
void init_regions(BufferReader *reader, const char *filename)
int object_can_merge(object *ob1, object *ob2)
void make_sure_seen(const object *op)
void player_get_title(const struct player *pl, char *buf, size_t bufsize)
const object * find_god(const char *name)
void object_replace_insert_in_map(const char *arch_string, object *op)
float get_speed_bonus(int stat)
language_t i18n_get_language_by_code(const char *code)
void object_update_speed(object *op)
#define PRINTF_ARGS(x, y)
int out_of_map(mapstruct *m, int x, int y)
int object_matches_string(object *pl, object *op, const char *name)
void object_dump_all(void)
void query_weight(const object *op, char *buf, size_t size)
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
int is_identified(const object *op)
int get_randomized_dir(int dir)
void set_tick_duration(long t)
const char * recipe_get_difficulty_string(int difficulty)
void treasure_free(treasure *t)
void clear_player(player *pl)
int64_t level_exp(int level, double expmul)
method_ret(* process_func)(object *)
int remove_depletion(object *op, int level)
object * check_inv_recursive(object *op, const object *trig)
void drain_specific_stat(object *op, int deplete_stats)
int load_object_from_reader(BufferReader *reader, object *op, int map_flags, bool arch_init, bool artifact_init)
int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval)
void apply_death_exp_penalty(object *op)
int get_button_value(const object *button)
void get_search_arr(int *search_arr)
int calc_item_power(const object *op)
static const flag_definition flags[]
archetype * find_archetype_by_object_type_name(int type, const char *name)
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
object * object_find_by_flag(const object *who, int flag)
void make_list_like(char *input)
treasurelist * find_treasurelist(const char *name)
void object_update(object *op, int action)
void check_inv(object *op, object *trig)
object * get_random_mon(int level)
void treasure_remove_item(treasurelist *list, int position)
void object_free_all_data(void)
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
archetype * get_archetype_by_type_subtype(int type, int subtype)
long usec_elapsed(struct timespec first, struct timespec second)
void object_give_identified_properties(object *op)
void add_statbonus(object *op)
void set_materialname(object *op)
int adjust_dir(int dir, int destination_dir)
int object_check_move_on(object *op, object *originator)
void yyset_in(FILE *in_str)
int load_object(FILE *fp, object *op, int bufstate, int map_flags, bool artifact_init)
client_spell * get_client_spell_state(player *pl, object *spell)
const artifact * find_artifact(const object *op, const char *name)
int is_wraith_pl(object *op)
void void init_block(void)
void free_all_recipes(void)
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
void free_objectlink(objectlink *ol)
void decay_objects(mapstruct *m)
void generate_artifact(object *op, int difficulty)
void make_path_to_file(const char *filename)
const char * object_get_value(const object *op, const char *const key)
void create_overlay_pathname(const char *name, char *buf, size_t size)
sstring stringbuffer_finish_shared(StringBuffer *sb)
const object * get_rand_god(void)
void free_charlinks(linked_char *lc)
void update_all_los(const mapstruct *map, int x, int y)
void yyset_lineno(int line_number)
void clean_tmp_map(mapstruct *m)
void object_free_drop_inventory(object *ob)
object * object_find_by_type2(const object *who, int type1, int type2)
const char * get_colorname(uint8_t index)
const typedata * get_typedata_by_name(const char *name)
method_ret ob_trigger(object *op, object *cause, int state)
int exp_level(int64_t exp)
uint32_t get_weight_limit(int stat)
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
const char * re_cmp(const char *str, const char *regexp)
sstring get_message_body(const GeneralMessage *message)
const char * get_name_of_region_for_map(const mapstruct *m)
uint8_t find_color(const char *name)
void yyset_debug(int bdebug)
void update_all_map_los(mapstruct *map)
void set_dragon_name(object *pl, const object *abil, const object *skin)
mapstruct * has_been_loaded(const char *name)
static event_registration m
int64_t new_exp(const object *ob)
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
int find_smooth(const Face *face, const Face **smoothed)
int is_valid_faceset(int fsn)
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
int load_png_file(FILE *file, const char *full_path)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy)
bool check_formulae(void)
object * create_singularity(const char *name)
int object_count_active(void)
void update_los(object *op)
Animations * find_animation(const char *name)
int allowed_class(const object *op)
void add_button_link(object *button, mapstruct *map, int connected)
artifactlist * get_empty_artifactlist(void)
void object_clear_owner(object *op)
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
artifact * get_empty_artifact(void)
void(* describe_func)(const object *, const object *, int use_media_tags, char *buf, size_t size)
void update_buttons(mapstruct *m)
void object_remove(object *op)
void register_trigger(int ob_type, trigger_func method)
object * object_find_by_tag_global(tag_t i)
int die_roll(int num, int size, const object *op, int goodbad)
int object_count_used(void)
int region_is_child_of_region(const region *child, const region *r)
object * object_find_by_name(const object *who, const char *name)
const GeneralMessage * get_message_from_identifier(const char *identifier)
object * object_get_player_container(object *op)
void object_merge_spell(object *op, int16_t x, int16_t y)
const char * get_region_msg(const region *r)
treasure * treasure_insert(treasurelist *list, int position)
uint16_t artifact_get_face(const artifact *art)
object * arch_to_object(archetype *at)
int load_face_file(FILE *file, const char *full_path)
void yypop_buffer_state(void)
int legal_artifact_combination(const object *op, const artifact *art)
object * get_next_friend(object *current)
oblinkpt * get_objectlinkpt(void)
void give_artifact_abilities(object *op, const object *artifact)
int get_face_fallback(int faceset, uint16_t imageno)
void print_monsters(void)
void dump_artifacts(void)
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void dump_animations(void)
object * object_insert_in_map(object *op, mapstruct *m, object *originator, int flag)
void free_map(mapstruct *m)
int get_learn_spell(int stat)
void init_ob_types(ob_methods *base_type)
recipe * get_random_recipe(recipelist *rpl)
char * create_pathname(const char *name, char *buf, size_t size)
void free_all_readable(void)
int is_identifiable_type(const object *op)
size_t stringbuffer_length(StringBuffer *sb)
const char * get_month_name(const int index)
void change_luck(object *op, int value)
archetype * get_archetype_by_skill_name(const char *skill, int type)
object * object_insert_in_ob(object *op, object *where)
int8_t get_attr_value(const living *stats, int attr)
int strtoint(const char *buf)
int object_distance(const object *ob1, const object *ob2)
archetype * find_archetype_by_object_name(const char *name)
language_t i18n_find_language_by_code(const char *code)
const char * time_format_time(const timeofday_t *tod, char *buf, size_t bufsize)
void add_abilities(object *op, const object *change)
void apply_anim_suffix(object *who, const char *suffix)
void object_copy_with_inv(const object *src_ob, object *dest_ob, bool update_speed)
void object_free_inventory(object *ob)
object * object_find_by_arch_name(const object *who, const char *name)
void animation_load_block(FILE *file, const char *full_path, const char *animation_name)
int save_object(FILE *fp, object *op, int flag)
int is_old_wraith_pl(object *op)
void fatal(enum fatal_error err) __attribute__((noreturn))
long timespec_diff(struct timespec *end, struct timespec *start)
const artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
void dump_map(const mapstruct *m)
archetype * get_archetype_struct(void)
void object_set_flag_inv(object *op, int flag)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
object * object_new(void)
char * stringbuffer_finish(StringBuffer *sb)
void object_reset(object *op)
mapstruct * get_linked_map(void)
struct face_sets * fallback
void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator)
void get_levelnumber(int i, char *buf, size_t size)
key_value * object_get_key_value(const object *ob, const char *key)
void load_treasures(void)
int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad)
void get_tod(timeofday_t *tod)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
int get_power_from_ench(int ench)
void update_position(mapstruct *m, int x, int y)
void write_book_archive(void)
void change_attr_value(living *stats, int attr, int8_t value)
const Face * get_message_face(const GeneralMessage *message)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
method_ret(* move_on_func)(object *, object *, object *)
void map_remove_unique_files(const mapstruct *map)
object * object_find_by_type_and_race(const object *who, int type, const char *race)
void animate_object(object *op, int dir)
void init_experience(void)
void remove_directory(const char *path)
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
void dump_all_archetypes(void)
int get_thaco_bonus(int stat)
void yyrestart(FILE *input_file)
const char * map_get_path(const object *item)
void stringbuffer_delete(StringBuffer *sb)
mapstruct * mapfile_load(const char *map, int flags)
void dump_monster_treasure(const char *name)
void object_handle_death_animation(object *op)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void dump_alchemy_costs(void)
objectlink * get_friends_of(const object *owner)
object * object_get_owner(object *op)
void first_arch_pass(FILE *fp, const char *filename)
int set_variable(object *op, const char *buf)
archetype * get_next_archetype(archetype *current)
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
void set_abs_magic(object *op, int magic)
int64_t check_exp_adjust(const object *op, int64_t exp)
bool object_value_set(const object *op, const char *const key)
static ob_methods base_type
void object_set_enemy(object *op, object *enemy)
void replace_unprintable_chars(char *buf)
object * object_find_by_type_subtype(const object *who, int type, int subtype)
void calc_perm_exp(object *op)
int is_magical(const object *op)
treasure * get_empty_treasure()
object * object_create_arch(archetype *at)
int did_make_save(const object *op, int level, int bonus)
void object_clear(object *op)
void push_button(object *op)
const char * get_weekday(const int index)
long get_sleep_remaining(void)
method_ret ob_apply(object *op, object *applier, int aflags)
object * give_skill_by_name(object *op, const char *skill_name)
void trigger_connected(objectlink *ol, object *cause, const int state)
object * object_get_env_recursive(object *op)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
int atnr_is_dragon_enabled(int attacknr)
void object_free_key_values(object *op)
const typedef char * sstring
const char * get_god_for_race(const char *race)
int get_fear_bonus(int stat)
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
region * get_region_by_map(mapstruct *m)
void LOG(LogLevel logLevel, const char *format,...) PRINTF_ARGS(2
void register_move_on(int ob_type, move_on_func method)
int is_dragon_pl(const object *op)
void object_update_turn_face(object *op)
int change_abil(object *op, object *tmp)
const Face * recipe_get_face(const recipe *rp)
int on_same_map(const object *op1, const object *op2)
void remove_friendly_object(object *op)
void artifact_compute_chance_for_item(const object *op, const artifact *art, int *numerator, int *denominator)
const typedata * get_typedata(int itemtype)
void clean_object(object *op)
object * object_present_in_ob(uint8_t type, const object *op)
object * object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags)
int operate_altar(object *altar, object **sacrifice)
void register_process(int ob_type, process_func method)
region * get_region_by_name(const char *region_name)
void player_set_dragon_title(struct player *pl, int level, const char *attack, int skin_resist)
void object_sub_weight(object *op, signed long weight)
int check_trigger(object *op, object *cause)
void player_set_own_title(struct player *pl, const char *title)
object * object_find_by_type_and_skill(const object *who, int type, const char *skill)
void i18n_list_languages(object *who)
objectlink * get_objectlink(void)
int64_t check_exp_loss(const object *op, int64_t exp)
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
void object_copy(const object *src_ob, object *dest_ob)
sstring i18n_get_language_code(language_t language)
object * identify(object *op)
void set_attr_value(living *stats, int attr, int8_t value)
int random_roll(int min, int max, const object *op, int goodbad)
void dump_friendly_objects(void)
int get_cleric_chance(int stat)
void stringbuffer_append_string(StringBuffer *sb, const char *str)
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
void delete_map(mapstruct *m)
int object_matches_pickup_mode(const object *item, int mode)
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
void object_set_msg(object *op, const char *msg)
void register_apply(int ob_type, apply_func method)
void free_all_artifacts(void)
sstring get_message_title(const GeneralMessage *message)
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
void object_copy_no_speed(const object *src_ob, object *dest_ob)
object * object_find_by_type_and_name(const object *who, int type, const char *name)
void object_set_cheat(object *op)
int get_cha_bonus(int stat)
signed long object_sum_weight(object *op)
recipe * find_recipe_for_tool(const char *tool, recipe *from)
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
object * object_decrease_nrof(object *op, uint32_t i)
void object_fix_multipart(object *tmp)
void tick_game_time(void)
void object_set_owner(object *op, object *owner)
object * object_find_by_tag(const object *who, tag_t tag)
object * create_archetype_by_object_name(const char *name)
int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy)
int has_ability(const object *ob)
object * generate_treasure(treasurelist *t, int difficulty)
object * get_jail_exit(object *op)
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
int check_path(const char *name, int prepend_dir)
void object_copy_owner(object *op, object *clone)
archetype * find_archetype(const char *name)
method_ret ob_move_on(object *op, object *victim, object *originator)
void load_image_info(FILE *file, const char *filename)
void add_friendly_object(object *op)
int has_carried_lights(const object *op)
const char * destination_dir
void set_map_reset_time(mapstruct *map)
const char * get_season_name(const int index)
void object_dump(const object *op, StringBuffer *sb)
object * object_create_clone(object *asrc)
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
void strip_endline(char *buf)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
object * create_archetype(const char *name)
void dump_abilities(void)
int save_map(mapstruct *m, int flag)
int get_turn_bonus(int stat)
archetype * try_find_archetype(const char *name)
Animations * try_find_animation(const char *name)
void free_dialog_information(object *op)
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
materialtype_t * name_to_material(const char *name)
int get_dam_bonus(int stat)
void remove_statbonus(object *op)
object * object_merge(object *op, object *top)
void init_archetype_pointers(void)
void use_trigger(object *op)
region * get_region_from_string(const char *name)
void time_info(object *op)
void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end)
void clean_friendly_list(void)
void print_los(object *op)
void init_formulae(BufferReader *reader, const char *filename)
void link_player_skills(object *op)
const readable_message_type * get_readable_message_type(object *readable)
int find_dir_2(int x, int y)
int rndm(int min, int max)
object * object_find_by_name_global(const char *str)
void remove_button_link(object *op)
int change_map_light(mapstruct *m, int change)
void free_arch(archetype *at)
region * get_region_struct(void)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
void drain_stat(object *op)
void make_sure_not_seen(const object *op)
void query_name(const object *op, char *buf, size_t size)
void save_object_in_sb(StringBuffer *sb, object *op, const int flag)
void player_lvl_adj(object *who, object *op)
size_t split_string(char *str, char *array[], size_t array_size, char sep)
artifactlist * find_artifactlist(int type)
int is_friendly(const object *op)
void update_button(object *op)
method_ret(* apply_func)(object *, object *, int)
void object_free(object *ob, int flags)