Crossfire Server, Trunk  R22010
libproto.h
Go to the documentation of this file.
1 /* anim.c */
2 extern Animations *find_animation(const char *name);
3 extern Animations *try_find_animation(const char *name);
4 extern void animate_object(object *op, int dir);
5 extern void apply_anim_suffix(object *who, const char *suffix);
6 extern void dump_animations(void);
7 extern void animation_load_block(FILE *file, const char *full_path, const char *animation_name);
8 extern int get_animations_count();
9 /* arch.c */
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 archetype *find_archetype_by_object_name(const char *name);
14 archetype *find_archetype_by_object_type_name(int type, const char *name);
15 archetype *get_archetype_by_skill_name(const char *skill, int type);
16 archetype *get_archetype_by_type_subtype(int type, int subtype);
17 object *create_archetype_by_object_name(const char *name);
18 void dump_arch(archetype *at, StringBuffer *sb);
19 void dump_all_archetypes(void);
20 void free_arch(archetype *at);
21 archetype *get_archetype_struct(void);
22 object *arch_to_object(archetype *at);
23 object *create_singularity(const char *name);
24 object *create_archetype(const char *name);
25 archetype *try_find_archetype(const char *name);
26 archetype *find_archetype(const char *name);
27 object *object_create_arch(archetype *at);
28 archetype *get_next_archetype(archetype *current);
29 void first_arch_pass(FILE *fp, const char *filename);
30 #ifdef __cplusplus
31 }
32 #endif
33 /* arch_types_valid.c */
34 extern int is_type_valid(uint8_t type);
35 /* artifact.c */
36 extern void free_all_artifacts(void);
37 extern void generate_artifact(object *op, int difficulty);
38 extern void give_artifact_abilities(object *op, const object *artifact);
39 extern int legal_artifact_combination(const object *op, const artifact *art);
40 extern void add_abilities(object *op, const object *change);
41 extern void init_artifacts(FILE *file, const char *filename);
42 extern const artifactlist *find_artifactlist(int type);
43 extern const artifact *find_artifact(const object *op, const char *name);
44 extern void dump_artifacts(void);
45 extern unsigned artifact_get_face(const artifact *art);
46 /* button.c */
47 extern void trigger_connected(objectlink *ol, object *cause, const int state);
48 extern void push_button(object *op);
49 extern void update_button(object *op);
50 extern void update_buttons(mapstruct *m);
51 extern void use_trigger(object *op);
52 extern void animate_turning(object *op);
53 extern int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove);
54 extern int operate_altar(object *altar, object **sacrifice);
55 extern int check_trigger(object *op, object *cause);
56 extern void add_button_link(object *button, mapstruct *map, int connected);
57 extern void remove_button_link(object *op);
58 extern int get_button_value(const object *button);
59 extern object *check_inv_recursive(object *op, const object *trig);
60 extern void check_inv(object *op, object *trig);
61 extern void verify_button_links(const mapstruct *map);
62 /* dialog.c */
63 extern void free_dialog_information(object *op);
64 extern int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply);
65 /* exp.c */
66 extern int64_t new_exp(const object *ob);
67 extern int has_ability(const object *ob);
68 extern void init_experience(void);
69 extern void dump_experience(void);
70 extern void free_experience(void);
71 /* friend.c */
72 extern void add_friendly_object(object *op);
73 extern void remove_friendly_object(object *op);
74 extern void dump_friendly_objects(void);
75 extern void clean_friendly_list(void);
76 extern int is_friendly(const object *op);
77 /* glue.c */
78 extern void fatal(enum fatal_error err) __attribute__ ((noreturn));
79 /* holy.c */
80 extern void init_gods(void);
81 extern godlink *get_rand_god(void);
82 extern const object *pntr_to_god_obj(godlink *godlnk);
83 extern int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen);
84 extern void free_all_god(void);
85 extern void dump_gods(void);
86 /* info.c */
87 extern void dump_abilities(void);
88 extern void print_monsters(void);
89 /* image.c */
90 extern int find_smooth(const Face *face, const Face **smoothed);
91 extern int is_valid_faceset(int fsn);
92 extern int get_face_fallback(int faceset, int imageno);
93 extern size_t get_faces_count(void);
94 extern const Face *get_face_by_id(uint16_t id);
95 extern int load_face_file(FILE *file, const char *full_path);
96 extern int load_png_file(FILE *file, const char *full_path);
97 extern void load_image_info(FILE *file, const char *filename);
98 extern const Face *find_face(const char *name);
99 extern const Face *try_find_face(const char *name, const Face *error);
100 extern uint8_t find_color(const char *name);
101 extern const char *get_colorname(uint8_t index);
102 extern void dump_faces(void);
103 extern int get_bitmap_checksum();
104 /* init.c */
105 extern void init_library(void);
106 extern void init_globals(void);
107 extern void free_globals(void);
108 extern void init_objects(void);
109 extern void write_todclock(void);
110 extern void init_attackmess(FILE *file, const char *filename);
111 /* item.c */
112 extern int get_power_from_ench(int ench);
113 extern int calc_item_power(const object *op);
114 extern const typedata *get_typedata(int itemtype);
115 extern const typedata *get_typedata_by_name(const char *name);
116 extern StringBuffer *describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf);
117 extern void query_weight(const object *op, char *buf, size_t size);
118 extern void get_levelnumber(int i, char *buf, size_t size);
119 extern void query_short_name(const object *op, char *buf, size_t size);
120 extern void query_name(const object *op, char *buf, size_t size);
121 extern void query_base_name(const object *op, int plural, char *buf, size_t size);
122 extern StringBuffer *describe_monster(const object *op, int use_media_tags, StringBuffer *buf);
123 extern StringBuffer *describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf);
124 extern int is_magical(const object *op);
125 extern int is_identifiable_type(const object *op);
126 extern int is_identified(const object *op);
127 extern void object_give_identified_properties(object *op);
128 extern object *identify(object *op);
129 /* languages.c */
130 extern const char *i18n(const object *who, const char *code);
131 extern int i18n_find_language_by_code(const char *code);
132 extern int i18n_get_language_by_code(const char *code);
133 extern sstring i18n_get_language_code(int language);
134 extern void i18n_list_languages(object *who);
135 extern void i18n_init(void);
136 extern void i18n_free(void);
137 /* links.c */
138 extern objectlink *get_objectlink(void);
139 extern oblinkpt *get_objectlinkpt(void);
140 extern void free_objectlink(objectlink *ol);
141 extern void free_objectlinkpt(oblinkpt *obp);
142 /* living.c */
143 extern void set_attr_value(living *stats, int attr, int8_t value);
144 extern void change_attr_value(living *stats, int attr, int8_t value);
145 extern int8_t get_attr_value(const living *stats, int attr);
146 extern void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat);
147 extern int change_abil(object *op, object *tmp);
148 extern void drain_stat(object *op);
149 extern void drain_specific_stat(object *op, int deplete_stats);
150 extern int remove_depletion(object *op, int level);
151 extern void change_luck(object *op, int value);
152 extern void remove_statbonus(object *op);
153 extern void add_statbonus(object *op);
154 extern void fix_object(object *op);
155 extern int allowed_class(const object *op);
156 extern void set_dragon_name(object *pl, const object *abil, const object *skin);
157 extern object *give_skill_by_name(object *op, const char *skill_name);
158 extern void player_lvl_adj(object *who, object *op);
159 extern int64_t level_exp(int level, double expmul);
160 extern int exp_level(int64_t exp);
161 extern void calc_perm_exp(object *op);
162 extern int64_t check_exp_loss(const object *op, int64_t exp);
163 extern int64_t check_exp_adjust(const object *op, int64_t exp);
164 extern void change_exp(object *op, int64_t exp, const char *skill_name, int flag);
165 extern void apply_death_exp_penalty(object *op);
166 extern int did_make_save(const object *op, int level, int bonus);
167 extern void share_exp(object *op, int64_t exp, const char *skill, int flag);
168 extern int get_cha_bonus(int stat);
169 extern int get_dex_bonus(int stat);
170 extern int get_thaco_bonus(int stat);
171 extern uint32_t get_weight_limit(int stat);
172 extern int get_learn_spell(int stat);
173 extern int get_cleric_chance(int stat);
174 extern int get_turn_bonus(int stat);
175 extern int get_dam_bonus(int stat);
176 extern float get_speed_bonus(int stat);
177 extern int get_fear_bonus(int stat);
178 extern void init_stats(int reload);
179 /* logger.c */
180 extern void LOG(LogLevel logLevel, const char *format, ...);
181 /* los.c */
182 extern void init_block(void);
183 extern void clear_los(player *pl);
184 extern int has_carried_lights(const object *op);
185 extern void update_los(object *op);
186 extern void update_all_map_los(mapstruct *map);
187 extern void update_all_los(const mapstruct *map, int x, int y);
188 extern void print_los(object *op);
189 extern void make_sure_seen(const object *op);
190 extern void make_sure_not_seen(const object *op);
191 /* map.c */
192 extern mapstruct *has_been_loaded(const char *name);
193 extern char *create_pathname(const char *name, char *buf, size_t size);
194 extern void create_overlay_pathname(const char *name, char *buf, size_t size);
195 extern void create_template_pathname(const char *name, char *buf, size_t size);
196 extern int check_path(const char *name, int prepend_dir);
197 extern void dump_map(const mapstruct *m);
198 extern void dump_all_maps(void);
199 extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny);
200 extern int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy);
201 extern int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y);
202 extern mapstruct *get_linked_map(void);
203 extern mapstruct *get_empty_map(int sizex, int sizey);
204 extern mapstruct *mapfile_load(const char *map, int flags);
205 extern int save_map(mapstruct *m, int flag);
206 extern void clean_object(object *op);
207 extern void free_map(mapstruct *m);
208 extern void delete_map(mapstruct *m);
209 extern mapstruct *ready_map_name(const char *name, int flags);
210 extern int calculate_difficulty(mapstruct *m);
211 extern void clean_tmp_map(mapstruct *m);
212 extern void free_all_maps(void);
213 extern int change_map_light(mapstruct *m, int change);
214 extern void update_position(mapstruct *m, int x, int y);
215 extern void set_map_reset_time(mapstruct *map);
216 extern int out_of_map(mapstruct *m, int x, int y);
218 extern int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags);
219 extern int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags);
220 extern int on_same_map(const object *op1, const object *op2);
221 extern object *map_find_by_flag(mapstruct *map, int x, int y, int flag);
222 extern void map_remove_unique_files(const mapstruct *map);
223 extern const char *map_get_path(const object *item);
224 /* ob_methods.c */
225 extern method_ret ob_apply(object *op, object *applier, int aflags);
226 extern method_ret ob_process(object *op);
227 extern char *ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size);
228 extern method_ret ob_move_on(object *op, object *victim, object *originator);
229 extern method_ret ob_trigger(object *op, object *cause, int state);
230 /* ob_types.c */
231 extern void init_ob_method_struct(ob_methods *methods, ob_methods *fallback);
232 extern void init_ob_types(ob_methods *base_type);
233 extern void register_apply(int ob_type, apply_func method);
234 extern void register_process(int ob_type, process_func method);
235 extern void register_describe(int ob_type, describe_func method);
236 extern void register_move_on(int ob_type, move_on_func method);
237 extern void register_trigger(int ob_type, trigger_func method);
238 /* object.c */
239 extern int object_can_merge(object *ob1, object *ob2);
240 extern signed long object_sum_weight(object *op);
241 extern object *object_get_env_recursive(object *op);
242 extern object *object_get_player_container(object *op);
243 extern void object_dump(const object *op, StringBuffer *sb);
244 extern void object_dump_all(void);
245 extern object *object_find_by_tag_global(tag_t i);
246 extern object *object_find_by_name_global(const char *str);
247 extern void object_free_all_data(void);
248 extern object *object_get_owner(object *op);
249 extern void object_clear_owner(object *op);
250 extern void object_set_owner(object *op, object *owner);
251 extern void object_copy_owner(object *op, object *clone);
252 extern void object_set_enemy(object *op, object *enemy);
253 extern void object_reset(object *op);
254 extern void object_free_key_values(object *op);
255 extern void object_clear(object *op);
256 extern void object_copy(const object *src_ob, object *dest_ob);
257 extern void object_copy_with_inv(const object *src_ob, object *dest_ob);
258 extern object *object_new(void);
259 extern void object_update_turn_face(object *op);
260 extern void object_update_speed(object *op);
261 extern void object_remove_from_active_list(object *op);
262 extern void object_update(object *op, int action);
263 extern void object_free_drop_inventory(object *ob);
264 extern void object_free_inventory(object *ob);
265 extern void object_free(object *ob, int flags);
266 extern int object_count_free(void);
267 extern int object_count_used(void);
268 extern int object_count_active(void);
269 extern void object_sub_weight(object *op, signed long weight);
270 extern void object_remove(object *op);
271 extern object *object_merge(object *op, object *top);
272 extern object *object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y);
273 extern void object_merge_spell(object *op, int16_t x, int16_t y);
274 extern object *object_insert_in_map(object *op, mapstruct *m, object *originator, int flag);
275 extern void object_replace_insert_in_map(const char *arch_string, object *op);
276 extern object *object_split(object *orig_ob, uint32_t nr, char *err, size_t size);
277 extern object *object_decrease_nrof(object *op, uint32_t i);
278 extern void object_add_weight(object *op, signed long weight);
279 extern object *object_insert_in_ob(object *op, object *where);
280 extern int object_check_move_on(object *op, object *originator);
281 extern object *map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at);
282 extern object *map_find_by_type(mapstruct *m, int x, int y, uint8_t type);
283 extern object *object_present_in_ob(uint8_t type, const object *op);
284 extern object *object_present_in_ob_by_name(int type, const char *str, const object *op);
285 extern object *arch_present_in_ob(const archetype *at, const object *op);
286 extern void object_set_flag_inv(object *op, int flag);
287 extern void object_unset_flag_inv(object *op, int flag);
288 extern void object_set_cheat(object *op);
289 extern int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy);
290 extern int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy);
291 extern int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop);
292 extern int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y);
293 extern void get_search_arr(int *search_arr);
294 extern int map_find_dir(mapstruct *m, int x, int y, object *exclude);
295 extern int object_distance(const object *ob1, const object *ob2);
296 extern int find_dir_2(int x, int y);
297 extern int absdir(int d);
298 extern int dirdiff(int dir1, int dir2);
299 extern int can_see_monsterP(mapstruct *m, int x, int y, int dir);
300 extern int object_can_pick(const object *who, const object *item);
301 extern object *object_create_clone(object *asrc);
302 extern object *object_find_by_name(const object *who, const char *name);
303 extern object *object_find_by_type(const object *who, int type);
304 extern object *object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags);
305 extern object *object_find_by_type2(const object *who, int type1, int type2);
306 extern object *object_find_by_tag(const object *who, tag_t tag);
307 extern object *object_find_by_type_applied(const object *who, int type);
308 extern object *object_find_by_type_and_name(const object *who, int type, const char *name);
309 extern object *object_find_by_type_and_race(const object *who, int type, const char *race);
310 extern object *object_find_by_type_and_slaying(const object *who, int type, const char *slaying);
311 extern object *object_find_by_type_and_skill(const object *who, int type, const char *skill);
312 extern object *object_find_by_flag(const object *who, int flag);
313 extern object *object_find_by_flag_applied(const object *who, int flag);
314 extern object *object_find_by_arch_name(const object *who, const char *name);
315 extern object *object_find_by_type_and_arch_name(const object *who, int type, const char *name);
316 extern object *object_find_by_type_subtype(const object *who, int type, int subtype);
317 extern key_value *object_get_key_value(const object *ob, const char *key);
318 extern const char *object_get_value(const object *op, const char *const key);
319 extern int object_set_value(object *op, const char *key, const char *value, int add_key);
320 extern int object_matches_string(object *pl, object *op, const char *name);
321 extern void object_fix_multipart(object *tmp);
322 extern void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy);
323 extern void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator);
324 extern void object_set_msg(object *op, const char *msg);
325 extern void get_ob_diff(StringBuffer *sb, const object *op, const object *op2);
326 extern int save_object(FILE *fp, object *op, int flag);
327 extern void object_handle_death_animation(object *op);
328 extern int object_matches_pickup_mode(const object *item, int mode);
329 /* path.c */
330 extern char *path_combine(const char *src, const char *dst, char *path, size_t size);
331 extern void path_normalize(char *path);
332 extern char *path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size);
333 /* porting.c */
334 extern FILE *tempnam_secure(const char *dir, const char *pfx, char **filename);
335 extern void remove_directory(const char *path);
336 extern int isqrt(int n);
337 extern void make_path_to_file(const char *filename);
338 /* player.c */
339 extern void clear_player(player *pl);
340 extern void free_player(player *pl);
341 extern int atnr_is_dragon_enabled(int attacknr);
342 extern int is_dragon_pl(const object *op);
343 extern client_spell *get_client_spell_state(player *pl, object *spell);
344 extern int is_wraith_pl(object *op);
345 extern int is_old_wraith_pl(object *op);
346 extern void player_set_dragon_title(struct pl *pl, int level, const char *attack, int skin_resist);
347 extern void player_get_title(const struct pl *pl, char *buf, size_t bufsize);
348 extern int player_has_own_title(const struct pl *pl);
349 extern const char *player_get_own_title(const struct pl *pl);
350 extern void player_set_own_title(struct pl *pl, const char *title);
351 extern void link_player_skills(object *op);
352 /* re-cmp.c */
353 extern const char *re_cmp(const char *str, const char *regexp);
354 /* readable.c */
355 extern int nstrtok(const char *buf1, const char *buf2);
356 extern char *strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size);
357 extern int book_overflow(const char *buf1, const char *buf2, size_t booksize);
358 extern void init_readable(void);
359 extern object *get_random_mon(int level);
360 extern void tailor_readable_ob(object *book, int msg_type);
361 extern void free_all_readable(void);
362 extern void write_book_archive(void);
363 extern const readable_message_type *get_readable_message_type(object *readable);
364 extern const GeneralMessage *get_message_from_identifier(const char *identifier);
365 extern sstring get_message_title(const GeneralMessage *message);
366 extern sstring get_message_body(const GeneralMessage *message);
367 extern const Face *get_message_face(const GeneralMessage *message);
368 extern void init_msgfile(FILE *file, const char *filename);
369 /* recipe.c */
370 extern recipelist *get_formulalist(int i);
371 extern void init_formulae(FILE *file, const char *filename);
372 extern void dump_alchemy(void);
373 extern archetype *find_treasure_by_name(const treasure *t, const char *name, int depth);
374 extern void dump_alchemy_costs(void);
375 extern int strtoint(const char *buf);
376 extern const artifact *locate_recipe_artifact(const recipe *rp, size_t idx);
377 extern recipe *get_random_recipe(recipelist *rpl);
378 extern void free_all_recipes(void);
379 extern recipe *find_recipe_for_tool(const char *tool, recipe *from);
380 extern void check_formulae(void);
381 /* region.c */
382 extern region *get_region_by_name(const char *region_name);
384 extern const char *get_name_of_region_for_map(const mapstruct *m);
385 extern region *get_region_from_string(const char *name);
386 extern int region_is_child_of_region(const region *child, const region *r);
387 extern const char *get_region_longname(const region *r);
388 extern const char *get_region_msg(const region *r);
389 extern object *get_jail_exit(object *op);
390 extern int init_regions(void);
391 extern region *get_region_struct(void);
392 /* shstr.c */
393 extern void init_hash_table(void);
394 extern sstring add_string(const char *str);
395 extern sstring add_refcount(sstring str);
396 extern int query_refcount(sstring str);
397 extern sstring find_string(const char *str);
398 extern void free_string(sstring str);
399 extern void ss_dump_statistics(char *buf, size_t size);
400 extern char *ss_dump_table(int what, char *buf, size_t size);
401 extern int buf_overflow(const char *buf1, const char *buf2, size_t bufsize);
402 /* stringbuffer.c */
403 extern StringBuffer *stringbuffer_new(void);
404 extern void stringbuffer_delete(StringBuffer *sb);
405 extern char *stringbuffer_finish(StringBuffer *sb);
407 extern void stringbuffer_append_string(StringBuffer *sb, const char *str);
408 extern void stringbuffer_append_printf(StringBuffer *sb, const char *format, ...);
409 extern void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2);
410 extern size_t stringbuffer_length(StringBuffer *sb);
411 /* time.c */
412 extern const char *get_periodofday(const int index);
413 extern const char *get_month_name(const int index);
414 extern const char *get_weekday(const int index);
415 extern const char *get_season_name(const int index);
416 extern void reset_sleep(void);
417 extern long usec_elapsed(struct timespec first, struct timespec second);
418 void tick_game_time(void);
419 long get_sleep_remaining(void);
420 extern void jump_time(void);
421 extern void set_max_time(long t);
422 extern void get_tod(timeofday_t *tod);
423 extern void time_info(object *op);
424 extern long seconds(void);
425 extern const char *time_format_time(const timeofday_t *tod, char *buf, size_t bufsize);
426 /* treasure.c */
427 extern void init_archetype_pointers(void);
428 extern void load_treasures(void);
429 extern treasurelist *find_treasurelist(const char *name);
430 extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries);
431 extern object *generate_treasure(treasurelist *t, int difficulty);
432 extern void set_abs_magic(object *op, int magic);
433 extern void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags);
434 extern void dump_monster_treasure(const char *name);
435 extern objectlink *treasurelist_find_matching_type(const treasurelist *randomitems, int type, int traverse);
436 /* utils.c */
437 extern int random_roll(int min, int max, const object *op, int goodbad);
438 extern int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad);
439 extern int die_roll(int num, int size, const object *op, int goodbad);
440 extern int rndm(int min, int max);
441 extern void decay_objects(mapstruct *m);
442 extern materialtype_t *name_to_material(const char *name);
443 extern void transmute_materialname(object *op, const object *change);
444 extern void set_materialname(object *op);
445 extern const char *strrstr(const char *haystack, const char *needle);
446 extern void strip_endline(char *buf);
447 extern void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize);
448 extern void make_list_like(char *input);
449 extern int get_random_dir(void);
450 extern int get_randomized_dir(int dir);
451 extern int adjust_dir(int dir, int destination_dir);
452 extern void replace_unprintable_chars(char *buf);
453 extern size_t split_string(char *str, char *array[], size_t array_size, char sep);
454 extern StringBuffer *describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf);
455 extern StringBuffer *describe_attacktype(const char *attack, int value, StringBuffer *buf);
456 /* loader.c */
457 extern int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode);
458 extern void yyrestart(FILE *input_file);
459 extern void yypop_buffer_state(void);
460 extern int yyget_lineno(void);
461 extern FILE *yyget_in(void);
462 extern FILE *yyget_out(void);
463 extern char *yyget_text(void);
464 extern void yyset_lineno(int line_number);
465 extern void yyset_in(FILE *in_str);
466 extern void yyset_out(FILE *out_str);
467 extern int yyget_debug(void);
468 extern void yyset_debug(int bdebug);
469 extern int yylex_destroy(void);
470 extern void yyfree(void *ptr);
471 extern int load_object(FILE *fp, object *op, int bufstate, int map_flags);
472 extern int set_variable(object *op, const char *buf);
473 extern void free_loader(void);
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
Definition: ob_methods.c:91
void init_objects(void)
Definition: object.c:93
int init_regions(void)
Definition: region.c:292
void object_set_owner(object *op, object *owner)
Definition: object.c:604
int get_animations_count()
Definition: assets.cpp:259
void object_reset(object *op)
Definition: object.c:698
int object_count_free(void)
Definition: object.c:1506
object * create_archetype_by_object_name(const char *name)
Definition: arch.cpp:118
void init_artifacts(FILE *file, const char *filename)
Definition: artifact.c:543
int yyget_debug(void)
void dump_map(const mapstruct *m)
Definition: map.c:255
const char * player_get_own_title(const struct pl *pl)
Definition: player.c:252
void free_all_recipes(void)
Definition: recipe.c:641
const object * pntr_to_god_obj(godlink *godlnk)
Definition: holy.c:124
mapstruct * ready_map_name(const char *name, int flags)
Definition: map.c:1796
object * object_find_by_tag_global(tag_t i)
Definition: object.c:491
archetype * find_archetype_by_object_name(const char *name)
Definition: arch.cpp:55
Definition: player.h:92
char * yyget_text(void)
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
Definition: path.c:172
void init_formulae(FILE *file, const char *filename)
Definition: recipe.c:143
int is_type_valid(uint8_t type)
oblinkpt * get_objectlinkpt(void)
Definition: links.c:51
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
Definition: button.c:347
void verify_button_links(const mapstruct *map)
Definition: button.c:850
int on_same_map(const object *op1, const object *op2)
Definition: map.c:2649
void make_sure_not_seen(const object *op)
Definition: los.c:659
int object_matches_string(object *pl, object *op, const char *name)
Definition: object.c:4334
Definition: map.h:380
int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy)
Definition: object.c:3028
void dump_faces(void)
Definition: image.c:162
void init_hash_table(void)
Definition: shstr.c:55
void free_map(mapstruct *m)
Definition: map.c:1688
void object_merge_spell(object *op, int16_t x, int16_t y)
Definition: object.c:1878
void tick_game_time(void)
Definition: time.c:180
int i18n_find_language_by_code(const char *code)
Definition: languages.c:81
void object_copy_owner(object *op, object *clone)
Definition: object.c:657
void free_arch(archetype *at)
Definition: arch.cpp:172
void add_abilities(object *op, const object *change)
Definition: artifact.c:288
sstring stringbuffer_finish_shared(StringBuffer *sb)
Definition: stringbuffer.c:85
const char * get_month_name(const int index)
Definition: time.c:109
FILE * yyget_in(void)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
Definition: object.c:2850
int player_has_own_title(const struct pl *pl)
Definition: player.c:239
void replace_unprintable_chars(char *buf)
Definition: utils.c:474
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
Definition: item.c:367
object * object_find_by_type_and_skill(const object *who, int type, const char *skill)
Definition: object.c:3973
int adjust_dir(int dir, int destination_dir)
Definition: utils.c:453
void register_apply(int ob_type, apply_func method)
Definition: ob_types.c:62
void ss_dump_statistics(char *buf, size_t size)
Definition: shstr.c:323
unsigned char uint8_t
Definition: win32.h:161
int is_old_wraith_pl(object *op)
Definition: player.c:177
StringBuffer * buf
Definition: readable.c:1591
objectlink * get_objectlink(void)
Definition: links.c:33
void dump_abilities(void)
Definition: info.c:63
void decay_objects(mapstruct *m)
Definition: utils.c:175
void print_los(object *op)
Definition: los.c:606
int get_dex_bonus(int stat)
Definition: living.c:2352
int random_roll(int min, int max, const object *op, int goodbad)
Definition: utils.c:42
void update_all_map_los(mapstruct *map)
Definition: los.c:508
void dump_experience(void)
Definition: exp.c:250
int load_face_file(FILE *file, const char *full_path)
void dump_all_archetypes(void)
Definition: arch.cpp:152
object * object_find_by_type_subtype(const object *who, int type, int subtype)
Definition: object.c:4091
void(* describe_func)(const ob_methods *, const object *, const object *, int use_media_tags, char *buf, size_t size)
Definition: ob_methods.h:41
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
Definition: holy.c:138
int change_abil(object *op, object *tmp)
Definition: living.c:395
void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator)
Definition: object.c:4550
int exp_level(int64_t exp)
Definition: living.c:1884
region * get_region_by_map(mapstruct *m)
Definition: region.c:74
void object_replace_insert_in_map(const char *arch_string, object *op)
Definition: object.c:2342
void clean_friendly_list(void)
Definition: friend.c:111
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
Definition: object.c:3612
object * create_singularity(const char *name)
Definition: arch.cpp:258
treasurelist * find_treasurelist(const char *name)
Definition: assets.cpp:230
void object_dump(const object *op, StringBuffer *sb)
Definition: object.c:415
Definition: face.h:14
void object_dump_all(void)
Definition: object.c:468
void change_luck(object *op, int value)
Definition: living.c:797
void object_copy_with_inv(const object *src_ob, object *dest_ob)
Definition: object.c:952
int get_power_from_ench(int ench)
Definition: item.c:209
void map_remove_unique_files(const mapstruct *map)
Definition: map.c:2689
void init_gods(void)
Definition: holy.c:86
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Definition: stringbuffer.c:131
archetype * find_archetype(const char *name)
Definition: assets.cpp:251
void delete_map(mapstruct *m)
Definition: map.c:1734
void yypop_buffer_state(void)
int get_thaco_bonus(int stat)
Definition: living.c:2356
void object_free(object *ob, int flags)
Definition: object.c:1348
void init_msgfile(FILE *file, const char *filename)
void init_archetype_pointers(void)
Definition: treasure.c:65
int get_bitmap_checksum()
Definition: assets.cpp:333
void yyfree(void *ptr)
void yyset_out(FILE *out_str)
void update_button(object *op)
Definition: button.c:162
void use_trigger(object *op)
Definition: button.c:254
archetype * find_archetype_by_object_type_name(int type, const char *name)
Definition: arch.cpp:68
int object_set_value(object *op, const char *key, const char *value, int add_key)
Definition: object.c:4259
int is_identifiable_type(const object *op)
Definition: item.c:1292
int8_t get_attr_value(const living *stats, int attr)
Definition: living.c:314
Definition: god.h:12
int yylex_destroy(void)
int operate_altar(object *altar, object **sacrifice)
Definition: button.c:463
object * give_skill_by_name(object *op, const char *skill_name)
Definition: living.c:1777
void object_set_msg(object *op, const char *msg)
Definition: object.c:4570
object * object_insert_in_ob(object *op, object *where)
Definition: object.c:2602
void query_short_name(const object *op, char *buf, size_t size)
Definition: item.c:508
void dump_gods(void)
Definition: holy.c:387
size_t split_string(char *str, char *array[], size_t array_size, char sep)
Definition: utils.c:500
int die_roll(int num, int size, const object *op, int goodbad)
Definition: utils.c:122
int find_smooth(const Face *face, const Face **smoothed)
Definition: image.c:101
region * get_region_by_name(const char *region_name)
Definition: region.c:46
region * get_region_from_string(const char *name)
Definition: region.c:121
void clear_los(player *pl)
Definition: los.c:252
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
Definition: object.c:4067
Definition: living.h:35
void dump_alchemy_costs(void)
Definition: recipe.c:415
uint8_t find_color(const char *name)
Definition: image.c:74
void dump_friendly_objects(void)
Definition: friend.c:100
void object_update_turn_face(object *op)
Definition: object.c:1069
const Face * try_find_face(const char *name, const Face *error)
Definition: assets.cpp:283
const typedata * get_typedata(int itemtype)
Definition: item.c:318
int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy)
Definition: object.c:3144
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Definition: stringbuffer.c:104
int object_can_pick(const object *who, const object *item)
Definition: object.c:3657
archetype * get_next_archetype(archetype *current)
Definition: assets.cpp:247
region * get_region_struct(void)
Definition: region.c:325
int get_fear_bonus(int stat)
Definition: living.c:2384
void init_experience(void)
Definition: exp.c:167
object * object_merge(object *op, object *top)
Definition: object.c:1800
void generate_artifact(object *op, int difficulty)
Definition: artifact.c:155
const char * strrstr(const char *haystack, const char *needle)
Definition: utils.c:325
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
Definition: object.c:3291
void free_objectlinkpt(oblinkpt *obp)
Definition: links.c:79
signed long object_sum_weight(object *op)
Definition: object.c:338
int object_matches_pickup_mode(const object *item, int mode)
Definition: c_object.c:646
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
Definition: dialog.c:209
void write_todclock(void)
Definition: init.c:423
int yyget_lineno(void)
mapstruct * mapfile_load(const char *map, int flags)
Definition: map.c:1212
int get_cha_bonus(int stat)
Definition: living.c:2348
void load_treasures(void)
int64_t check_exp_loss(const object *op, int64_t exp)
Definition: living.c:2064
int find_dir_2(int x, int y)
Definition: object.c:3467
void query_base_name(const object *op, int plural, char *buf, size_t size)
Definition: item.c:680
int is_identified(const object *op)
Definition: item.c:1316
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
Definition: object.c:3948
void yyset_in(FILE *in_str)
int get_face_fallback(int faceset, int imageno)
Definition: image.c:132
int get_cleric_chance(int stat)
Definition: living.c:2368
void path_normalize(char *path)
Definition: path.c:85
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
Definition: readable.c:667
void object_remove_from_active_list(object *op)
Definition: object.c:1148
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
Definition: treasure.c:252
void fatal(enum fatal_error err) __attribute__((noreturn))
Definition: utils.c:597
int check_trigger(object *op, object *cause)
Definition: button.c:518
char method_ret
Definition: ob_methods.h:14
void init_readable(void)
Definition: readable.c:886
void object_fix_multipart(object *tmp)
Definition: object.c:4442
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
Definition: object.c:2877
void push_button(object *op)
Definition: button.c:149
const char * destination_dir
void free_string(sstring str)
Definition: shstr.c:280
int set_variable(object *op, const char *buf)
int object_can_merge(object *ob1, object *ob2)
Definition: object.c:199
FILE * yyget_out(void)
int absdir(int d)
Definition: object.c:3504
void free_loader(void)
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
Definition: map.c:2672
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
Definition: utils.c:534
sstring get_message_body(const GeneralMessage *message)
Definition: readable.c:2101
void init_block(void)
Definition: los.c:88
void link_player_skills(object *op)
Definition: player.c:279
void query_name(const object *op, char *buf, size_t size)
Definition: item.c:583
void object_clear_owner(object *op)
Definition: object.c:587
void object_unset_flag_inv(object *op, int flag)
Definition: object.c:2988
void object_add_weight(object *op, signed long weight)
Definition: object.c:2578
void i18n_free(void)
Definition: languages.c:238
int atnr_is_dragon_enabled(int attacknr)
Definition: player.c:95
size_t get_faces_count(void)
Definition: assets.cpp:290
object * arch_present_in_ob(const archetype *at, const object *op)
Definition: object.c:2954
void free_dialog_information(object *op)
Definition: dialog.c:32
archetype * get_archetype_struct(void)
Definition: arch.cpp:198
const char * get_periodofday(const int index)
Definition: time.c:102
void create_template_pathname(const char *name, char *buf, size_t size)
Definition: map.c:153
const char * get_weekday(const int index)
Definition: time.c:116
object * create_archetype(const char *name)
Definition: arch.cpp:281
void player_set_dragon_title(struct pl *pl, int level, const char *attack, int skin_resist)
Definition: player.c:194
archetype * get_archetype_by_type_subtype(int type, int subtype)
Definition: arch.cpp:101
object * object_present_in_ob(uint8_t type, const object *op)
Definition: object.c:2900
size_t booksize
Definition: readable.c:1590
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
Definition: map.c:2537
void object_clear(object *op)
Definition: object.c:747
signed short int16_t
Definition: win32.h:160
object * object_find_by_type_and_race(const object *who, int type, const char *race)
Definition: object.c:3923
int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags)
Definition: map.c:2610
void free_experience(void)
Definition: exp.c:262
int save_map(mapstruct *m, int flag)
Definition: map.c:1418
const char * object_get_value(const object *op, const char *const key)
Definition: object.c:4136
void check_formulae(void)
Definition: recipe.c:253
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
Definition: treasure.c:887
void object_free_drop_inventory(object *ob)
Definition: object.c:1316
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
Definition: object.c:3331
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
Definition: item.c:761
Definition: map.h:276
void remove_statbonus(object *op)
Definition: living.c:846
void object_copy(const object *src_ob, object *dest_ob)
Definition: object.c:824
void object_update_speed(object *op)
Definition: object.c:1086
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Definition: living.c:2166
client_spell * get_client_spell_state(player *pl, object *spell)
Definition: player.c:136
uint32_t get_weight_limit(int stat)
Definition: living.c:2360
sstring add_string(const char *str)
Definition: shstr.c:124
const char * get_region_msg(const region *r)
Definition: region.c:238
object * object_find_by_tag(const object *who, tag_t tag)
Definition: object.c:3850
void clean_object(object *op)
Definition: map.c:1625
const Face * get_message_face(const GeneralMessage *message)
Definition: readable.c:2110
materialtype_t * name_to_material(const char *name)
Definition: utils.c:248
void update_los(object *op)
Definition: los.c:459
int query_refcount(sstring str)
Definition: shstr.c:224
void tailor_readable_ob(object *book, int msg_type)
Definition: readable.c:1910
void transmute_materialname(object *op, const object *change)
Definition: utils.c:267
void free_globals(void)
Definition: init.c:324
int object_distance(const object *ob1, const object *ob2)
Definition: object.c:3451
void update_buttons(mapstruct *m)
Definition: button.c:227
void drain_stat(object *op)
Definition: living.c:717
void yyrestart(FILE *input_file)
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
Definition: recipe.c:375
mapstruct * get_empty_map(int sizex, int sizey)
Definition: map.c:869
int64_t new_exp(const object *ob)
Definition: exp.c:100
const readable_message_type * get_readable_message_type(object *readable)
Definition: readable.c:2079
const char * get_region_longname(const region *r)
Definition: region.c:217
object * object_find_by_type_and_name(const object *who, int type, const char *name)
Definition: object.c:3898
void dump_animations(void)
Definition: anim.c:183
int object_count_active(void)
Definition: object.c:1538
void register_trigger(int ob_type, trigger_func method)
Definition: ob_types.c:98
int out_of_map(mapstruct *m, int x, int y)
Definition: map.c:2304
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
Definition: map.c:354
int get_learn_spell(int stat)
Definition: living.c:2364
int has_ability(const object *ob)
Definition: exp.c:153
int is_friendly(const object *op)
Definition: friend.c:144
void init_library(void)
Definition: init.c:189
StringBuffer * stringbuffer_new(void)
Definition: stringbuffer.c:57
float get_speed_bonus(int stat)
Definition: living.c:2380
int check_path(const char *name, int prepend_dir)
Definition: map.c:211
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
Definition: map.c:310
void load_image_info(FILE *file, const char *filename)
object * object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags)
Definition: object.c:3794
void free_all_god(void)
Definition: holy.c:338
char * create_pathname(const char *name, char *buf, size_t size)
Definition: map.c:112
void animate_turning(object *op)
Definition: button.c:270
int has_carried_lights(const object *op)
Definition: los.c:315
void make_path_to_file(const char *filename)
Definition: porting.c:316
void dump_artifacts(void)
Definition: artifact.c:680
void add_friendly_object(object *op)
Definition: friend.c:30
char * size
Definition: image.h:22
char * stringbuffer_finish(StringBuffer *sb)
Definition: stringbuffer.c:76
object * object_insert_in_map(object *op, mapstruct *m, object *originator, int flag)
Definition: object.c:2110
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
Definition: object.c:2935
object * object_find_by_type_applied(const object *who, int type)
Definition: object.c:3873
const artifactlist * find_artifactlist(int type)
Definition: artifact.c:644
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
Definition: object.c:2382
void init_stats(int reload)
Definition: living.c:2592
void object_update(object *op, int action)
Definition: object.c:1190
void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy)
Definition: object.c:4501
object * arch_to_object(archetype *at)
Definition: arch.cpp:232
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Definition: stringbuffer.c:95
void free_all_artifacts(void)
Definition: artifact.c:140
void set_map_reset_time(mapstruct *map)
Definition: map.c:2239
int nstrtok(const char *buf1, const char *buf2)
Definition: readable.c:637
int allowed_class(const object *op)
Definition: living.c:1650
method_ret ob_process(object *op)
Definition: ob_methods.c:67
mapstruct * has_been_loaded(const char *name)
Definition: map.c:87
void yyset_lineno(int line_number)
object * object_find_by_type2(const object *who, int type1, int type2)
Definition: object.c:3827
void yyset_debug(int bdebug)
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
Definition: ob_types.c:32
void set_attr_value(living *stats, int attr, int8_t value)
Definition: living.c:219
void jump_time(void)
Definition: time.c:192
int calculate_difficulty(mapstruct *m)
Definition: map.c:1919
int dirdiff(int dir1, int dir2)
Definition: object.c:3522
void i18n_list_languages(object *who)
Definition: languages.c:118
int get_button_value(const object *button)
Definition: button.c:749
LogLevel
Definition: logger.h:10
const char * time_format_time(const timeofday_t *tod, char *buf, size_t bufsize)
Definition: time.c:365
int save_object(FILE *fp, object *op, int flag)
Definition: object.c:5114
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
Definition: porting.c:110
char * ss_dump_table(int what, char *buf, size_t size)
Definition: shstr.c:354
int calc_item_power(const object *op)
Definition: item.c:237
object * get_random_mon(int level)
Definition: readable.c:1251
method_ret(* process_func)(ob_methods *, object *)
Definition: ob_methods.h:40
key_value * object_get_key_value(const object *ob, const char *key)
Definition: object.c:4111
void make_list_like(char *input)
Definition: utils.c:395
void trigger_connected(objectlink *ol, object *cause, const int state)
Definition: button.c:41
int get_randomized_dir(int dir)
Definition: utils.c:439
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
Definition: map.c:2377
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
Definition: readable.c:697
void free_player(player *pl)
Definition: player.c:57
unsigned short uint16_t
Definition: win32.h:163
int strtoint(const char *buf)
Definition: recipe.c:536
sstring add_refcount(sstring str)
Definition: shstr.c:210
void remove_button_link(object *op)
Definition: button.c:693
int i18n_get_language_by_code(const char *code)
Definition: languages.c:96
signed __int64 int64_t
Definition: win32.h:168
void remove_directory(const char *path)
Definition: porting.c:156
static const flag_definition flags[]
void object_sub_weight(object *op, signed long weight)
Definition: object.c:1562
object * check_inv_recursive(object *op, const object *trig)
Definition: button.c:782
void object_set_enemy(object *op, object *enemy)
Definition: object.c:679
const char * get_season_name(const int index)
Definition: time.c:123
void object_free_all_data(void)
Definition: object.c:531
const artifact * find_artifact(const object *op, const char *name)
Definition: artifact.c:654
int is_magical(const object *op)
Definition: item.c:1195
const char * sstring
Definition: global.h:40
object * object_find_by_type(const object *who, int type)
Definition: object.c:3770
recipe * find_recipe_for_tool(const char *tool, recipe *from)
Definition: recipe.c:724
int get_random_dir(void)
Definition: utils.c:427
const Face * get_face_by_id(uint16_t id)
Definition: assets.cpp:316
void object_give_identified_properties(object *op)
Definition: item.c:1324
unsigned artifact_get_face(const artifact *art)
Definition: artifact.c:706
unsigned int uint32_t
Definition: win32.h:162
Animations * try_find_animation(const char *name)
Definition: assets.cpp:271
method_ret ob_apply(object *op, object *applier, int aflags)
Definition: ob_methods.c:44
size_t stringbuffer_length(StringBuffer *sb)
Definition: stringbuffer.c:162
object * object_get_player_container(object *op)
Definition: object.c:377
void create_overlay_pathname(const char *name, char *buf, size_t size)
Definition: map.c:133
void update_all_los(const mapstruct *map, int x, int y)
Definition: los.c:536
objectlink * treasurelist_find_matching_type(const treasurelist *randomitems, int type, int traverse)
Definition: treasure.c:1450
const char * re_cmp(const char *str, const char *regexp)
Definition: re-cmp.c:69
recipelist * get_formulalist(int i)
Definition: recipe.c:96
archetype * try_find_archetype(const char *name)
Definition: assets.cpp:255
int get_dam_bonus(int stat)
Definition: living.c:2376
const artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
Definition: recipe.c:557
void free_objectlink(objectlink *ol)
Definition: links.c:67
method_ret(* apply_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:39
int64_t check_exp_adjust(const object *op, int64_t exp)
Definition: living.c:2089
void change_attr_value(living *stats, int attr, int8_t value)
Definition: living.c:265
archetype * get_archetype_by_skill_name(const char *skill, int type)
Definition: arch.cpp:82
int is_dragon_pl(const object *op)
Definition: player.c:114
int load_png_file(FILE *file, const char *full_path)
void register_describe(int ob_type, describe_func method)
Definition: ob_types.c:80
int region_is_child_of_region(const region *child, const region *r)
Definition: region.c:190
void object_remove(object *op)
Definition: object.c:1588
method_ret(* trigger_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:43
mapstruct * get_linked_map(void)
Definition: map.c:788
signed char int8_t
Definition: win32.h:158
Animations * find_animation(const char *name)
Definition: assets.cpp:267
void init_ob_types(ob_methods *base_type)
Definition: ob_types.c:49
void drain_specific_stat(object *op, int deplete_stats)
Definition: living.c:729
void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize)
Definition: utils.c:354
struct face_sets * fallback
Definition: image.h:21
int load_object(FILE *fp, object *op, int bufstate, int map_flags)
int map_find_dir(mapstruct *m, int x, int y, object *exclude)
Definition: object.c:3404
method_ret ob_trigger(object *op, object *cause, int state)
Definition: ob_methods.c:133
int get_turn_bonus(int stat)
Definition: living.c:2372
long usec_elapsed(struct timespec first, struct timespec second)
Definition: cfanim.c:1099
object * object_create_clone(object *asrc)
Definition: object.c:3699
void free_all_maps(void)
Definition: map.c:1969
Definition: tod.h:34
object * object_new(void)
Definition: object.c:1011
int change_map_light(mapstruct *m, int change)
Definition: map.c:2001
void player_lvl_adj(object *who, object *op)
Definition: living.c:1817
const char * map_get_path(const object *item)
Definition: map.c:2714
const char * get_colorname(uint8_t index)
Definition: image.c:85
int64_t level_exp(int level, double expmul)
Definition: living.c:1872
int did_make_save(const object *op, int level, int bonus)
Definition: living.c:2280
void object_handle_death_animation(object *op)
Definition: object.c:5142
const Face * find_face(const char *name)
Definition: assets.cpp:279
void add_statbonus(object *op)
Definition: living.c:869
void first_arch_pass(FILE *fp, const char *filename)
recipe * get_random_recipe(recipelist *rpl)
Definition: recipe.c:617
void player_set_own_title(struct pl *pl, const char *title)
Definition: player.c:264
void get_search_arr(int *search_arr)
Definition: object.c:3374
void get_levelnumber(int i, char *buf, size_t size)
object * get_jail_exit(object *op)
Definition: region.c:260
sstring find_string(const char *str)
Definition: shstr.c:236
const char * get_name_of_region_for_map(const mapstruct *m)
Definition: region.c:92
void object_free_key_values(object *op)
Definition: object.c:718
void animate_object(object *op, int dir)
Definition: anim.c:43
void player_get_title(const struct pl *pl, char *buf, size_t bufsize)
Definition: player.c:224
int remove_depletion(object *op, int level)
Definition: living.c:756
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
Definition: living.c:355
int object_count_used(void)
Definition: object.c:1522
void calc_perm_exp(object *op)
Definition: living.c:1901
void object_free_inventory(object *ob)
Definition: object.c:1324
int is_valid_faceset(int fsn)
Definition: image.c:116
void set_max_time(long t)
Definition: time.c:203
void apply_anim_suffix(object *who, const char *suffix)
Definition: anim.c:149
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Definition: object.c:1849
char * path_combine(const char *src, const char *dst, char *path, size_t size)
Definition: path.c:51
long seconds(void)
Definition: time.c:344
void dump_monster_treasure(const char *name)
Definition: treasure.c:1227
int isqrt(int n)
Definition: utils.c:586
int rndm(int min, int max)
Definition: utils.c:162
object * object_find_by_name_global(const char *str)
Definition: object.c:511
int buf_overflow(const char *buf1, const char *buf2, size_t bufsize)
Definition: shstr.c:398
object * object_find_by_flag(const object *who, int flag)
Definition: object.c:3996
object * identify(object *op)
Definition: item.c:1386
void update_position(mapstruct *m, int x, int y)
Definition: map.c:2125
sstring i18n_get_language_code(int language)
Definition: languages.c:108
void check_inv(object *op, object *trig)
Definition: button.c:825
void set_dragon_name(object *pl, const object *abil, const object *skin)
Definition: living.c:1677
const typedata * get_typedata_by_name(const char *name)
Definition: item.c:338
void print_monsters(void)
Definition: info.c:95
godlink * get_rand_god(void)
Definition: holy.c:102
sstring get_message_title(const GeneralMessage *message)
Definition: readable.c:2092
void make_sure_seen(const object *op)
Definition: los.c:636
void register_move_on(int ob_type, move_on_func method)
Definition: ob_types.c:89
void register_process(int ob_type, process_func method)
Definition: ob_types.c:71
void init_attackmess(FILE *file, const char *filename)
Definition: init.c:476
const GeneralMessage * get_message_from_identifier(const char *identifier)
Definition: assets.cpp:329
void set_materialname(object *op)
Definition: utils.c:301
void object_set_flag_inv(object *op, int flag)
Definition: object.c:2971
void i18n_init(void)
Definition: languages.c:154
void dump_arch(archetype *at, StringBuffer *sb)
Definition: arch.cpp:143
int is_wraith_pl(object *op)
Definition: player.c:165
int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad)
Definition: utils.c:77
void get_tod(timeofday_t *tod)
Definition: time.c:215
void free_all_readable(void)
Definition: readable.c:1992
void write_book_archive(void)
Definition: readable.c:2029
void apply_death_exp_penalty(object *op)
Definition: living.c:2231
object * generate_treasure(treasurelist *t, int difficulty)
Definition: treasure.c:284
void add_button_link(object *button, mapstruct *map, int connected)
Definition: button.c:656
object * object_find_by_arch_name(const object *who, const char *name)
Definition: object.c:4042
Definition: map.h:325
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
Definition: item.c:935
long get_sleep_remaining(void)
Definition: time.c:184
int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode)
void stringbuffer_delete(StringBuffer *sb)
Definition: stringbuffer.c:71
void clear_player(player *pl)
Definition: player.c:33
void fix_object(object *op)
Definition: living.c:1124
void share_exp(object *op, int64_t exp, const char *skill, int flag)
Definition: living.c:2310
void strip_endline(char *buf)
Definition: utils.c:341
void time_info(object *op)
Definition: time.c:294
object * object_decrease_nrof(object *op, uint32_t i)
Definition: object.c:2421
object * object_create_arch(archetype *at)
Definition: arch.cpp:301
object * object_get_owner(object *op)
Definition: object.c:568
void query_weight(const object *op, char *buf, size_t size)
Definition: item.c:410
fatal_error
Definition: define.h:47
void object_set_cheat(object *op)
Definition: object.c:3006
static ob_methods base_type
Definition: ob_methods.c:27
void init_globals(void)
Definition: init.c:278
int level
Definition: readable.c:1589
void animation_load_block(FILE *file, const char *full_path, const char *animation_name)
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
Definition: map.c:497
object * object_get_env_recursive(object *op)
Definition: object.c:360
method_ret ob_move_on(object *op, object *victim, object *originator)
Definition: ob_methods.c:111
void clean_tmp_map(mapstruct *m)
Definition: map.c:1960
void reset_sleep(void)
Definition: time.c:130
void give_artifact_abilities(object *op, const object *artifact)
Definition: artifact.c:203
void set_abs_magic(object *op, int magic)
Definition: treasure.c:601
void LOG(LogLevel logLevel, const char *format,...)
Definition: logger.c:51
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
Definition: utils.c:562
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
Definition: object.c:4724
method_ret(* move_on_func)(ob_methods *, object *, object *, object *)
Definition: ob_methods.h:42
int object_check_move_on(object *op, object *originator)
Definition: object.c:2744
int legal_artifact_combination(const object *op, const artifact *art)
Definition: artifact.c:221
object * object_find_by_name(const object *who, const char *name)
Definition: object.c:3746
void dump_alchemy(void)
Definition: recipe.c:303
object * object_find_by_flag_applied(const object *who, int flag)
Definition: object.c:4019
void dump_all_maps(void)
Definition: map.c:278
void remove_friendly_object(object *op)
Definition: friend.c:56
const char * i18n(const object *who, const char *code)
Definition: languages.c:55