Crossfire Server, Trunk
libproto.h
Go to the documentation of this file.
1 #include "bufferreader.h"
2 /* anim.c */
3 extern Animations *find_animation(const char *name);
4 extern Animations *try_find_animation(const char *name);
5 extern void animate_object(object *op, int dir);
6 extern void apply_anim_suffix(object *who, const char *suffix);
7 extern void dump_animations(void);
8 extern void animation_load_block(FILE *file, const char *full_path, const char *animation_name);
9 /* arch.c */
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
15 archetype *get_archetype_by_skill_name(const char *skill, int type);
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);
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);
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 */
37 extern artifact *get_empty_artifact(void);
38 extern void free_all_artifacts(void);
39 extern void generate_artifact(object *op, int difficulty);
40 extern void artifact_compute_chance_for_item(const object *op, const artifact *art, int *numerator, int *denominator);
41 extern void give_artifact_abilities(object *op, const object *artifact);
42 extern int legal_artifact_combination(const object *op, const artifact *art);
43 extern void add_abilities(object *op, const object *change);
45 extern const artifact *find_artifact(const object *op, const char *name);
46 extern void dump_artifacts(void);
47 extern uint16_t artifact_get_face(const artifact *art);
48 /* button.c */
49 extern void trigger_connected(objectlink *ol, object *cause, const int state);
50 extern void push_button(object *op);
51 extern void update_button(object *op);
52 extern void update_buttons(mapstruct *m);
53 extern void use_trigger(object *op);
54 extern void animate_turning(object *op);
55 extern int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove);
56 extern int operate_altar(object *altar, object **sacrifice);
57 extern int check_trigger(object *op, object *cause);
58 extern void add_button_link(object *button, mapstruct *map, int connected);
59 extern void remove_button_link(object *op);
60 extern int get_button_value(const object *button);
61 extern object *check_inv_recursive(object *op, const object *trig);
62 extern void check_inv(object *op, object *trig);
63 /* dialog.c */
64 extern void free_dialog_information(object *op);
65 extern int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply);
66 /* exp.c */
67 extern int64_t new_exp(const object *ob);
68 extern int has_ability(const object *ob);
69 extern void init_experience(void);
70 extern void dump_experience(void);
71 extern void free_experience(void);
72 /* friend.c */
73 extern void add_friendly_object(object *op);
74 extern void remove_friendly_object(object *op);
75 extern void dump_friendly_objects(void);
76 extern void clean_friendly_list(void);
77 extern int is_friendly(const object *op);
78 extern objectlink *get_friends_of(const object *owner);
79 extern void clear_friendly_list(void);
80 extern object *get_next_friend(object *current);
81 /* glue.c */
82 extern void fatal(enum fatal_error err) __attribute__ ((noreturn));
83 /* holy.c */
84 extern void init_gods(void);
85 extern const object *get_rand_god(void);
86 extern int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen);
87 extern void free_all_god(void);
88 extern void dump_gods(void);
89 extern const object *find_god(const char *name);
90 extern const char *get_god_for_race(const char *race);
91 /* info.c */
92 extern void dump_abilities(void);
93 extern void print_monsters(void);
94 /* image.c */
95 extern int find_smooth(const Face *face, const Face **smoothed);
96 extern int is_valid_faceset(int fsn);
97 extern int get_face_fallback(int faceset, uint16_t imageno);
98 extern size_t get_faces_count(void);
99 extern const Face *get_face_by_id(uint16_t id);
100 extern int load_face_file(FILE *file, const char *full_path);
101 extern int load_png_file(FILE *file, const char *full_path);
102 extern void load_image_info(FILE *file, const char *filename);
103 extern const Face *find_face(const char *name);
104 extern const Face *try_find_face(const char *name, const Face *error);
105 extern uint8_t find_color(const char *name);
106 extern const char *get_colorname(uint8_t index);
107 extern void dump_faces(void);
108 extern int get_bitmap_checksum();
109 /* init.c */
110 extern void init_library(void);
111 extern void init_globals(void);
112 extern void free_globals(void);
113 extern void init_objects(void);
114 extern void write_todclock(void);
115 extern void init_attackmess(BufferReader *reader, const char *filename);
116 /* item.c */
117 extern int get_power_from_ench(int ench);
118 extern int calc_item_power(const object *op);
119 extern const typedata *get_typedata(int itemtype);
120 extern const typedata *get_typedata_by_name(const char *name);
121 extern StringBuffer *describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf);
122 extern void query_weight(const object *op, char *buf, size_t size);
123 extern void get_levelnumber(int i, char *buf, size_t size);
124 extern void query_short_name(const object *op, char *buf, size_t size);
125 extern void query_name(const object *op, char *buf, size_t size);
126 extern void query_base_name(const object *op, int plural, char *buf, size_t size);
127 extern StringBuffer *describe_monster(const object *op, int use_media_tags, StringBuffer *buf);
128 extern StringBuffer *describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf);
129 extern int is_magical(const object *op);
130 extern int is_identifiable_type(const object *op);
131 extern int is_identified(const object *op);
132 extern void object_give_identified_properties(object *op);
133 extern object *identify(object *op);
134 /* languages.c */
135 extern const char *i18n(const object *who, const char *code);
136 extern int i18n_find_language_by_code(const char *code);
137 extern int i18n_get_language_by_code(const char *code);
138 extern sstring i18n_get_language_code(int language);
139 extern void i18n_list_languages(object *who);
140 extern void i18n_init(void);
141 extern void i18n_free(void);
142 /* links.c */
143 extern objectlink *get_objectlink(void);
144 extern oblinkpt *get_objectlinkpt(void);
145 extern void free_objectlink(objectlink *ol);
146 extern void free_objectlinkpt(oblinkpt *obp);
147 /* living.c */
148 extern void set_attr_value(living *stats, int attr, int8_t value);
149 extern void change_attr_value(living *stats, int attr, int8_t value);
150 extern int8_t get_attr_value(const living *stats, int attr);
151 extern void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat);
152 extern int change_abil(object *op, object *tmp);
153 extern void drain_stat(object *op);
154 extern void drain_specific_stat(object *op, int deplete_stats);
155 extern int remove_depletion(object *op, int level);
156 extern void change_luck(object *op, int value);
157 extern void remove_statbonus(object *op);
158 extern void add_statbonus(object *op);
159 extern void fix_object(object *op);
160 extern int allowed_class(const object *op);
161 extern void set_dragon_name(object *pl, const object *abil, const object *skin);
162 extern object *give_skill_by_name(object *op, const char *skill_name);
163 extern void player_lvl_adj(object *who, object *op);
164 extern int64_t level_exp(int level, double expmul);
165 extern int exp_level(int64_t exp);
166 extern void calc_perm_exp(object *op);
167 extern int64_t check_exp_loss(const object *op, int64_t exp);
168 extern int64_t check_exp_adjust(const object *op, int64_t exp);
169 extern void change_exp(object *op, int64_t exp, const char *skill_name, int flag);
170 extern void apply_death_exp_penalty(object *op);
171 extern int did_make_save(const object *op, int level, int bonus);
172 extern void share_exp(object *op, int64_t exp, const char *skill, int flag);
173 extern int get_cha_bonus(int stat);
174 extern int get_dex_bonus(int stat);
175 extern int get_thaco_bonus(int stat);
176 extern uint32_t get_weight_limit(int stat);
177 extern int get_learn_spell(int stat);
178 extern int get_cleric_chance(int stat);
179 extern int get_turn_bonus(int stat);
180 extern int get_dam_bonus(int stat);
181 extern float get_speed_bonus(int stat);
182 extern int get_fear_bonus(int stat);
183 extern void init_stats(int reload);
184 /* logger.c */
185 extern void LOG(LogLevel logLevel, const char *format, ...);
186 /* los.c */
187 extern void init_block(void);
188 extern void clear_los(player *pl);
189 extern int has_carried_lights(const object *op);
190 extern void update_los(object *op);
191 extern void update_all_map_los(mapstruct *map);
192 extern void update_all_los(const mapstruct *map, int x, int y);
193 extern void print_los(object *op);
194 extern void make_sure_seen(const object *op);
195 extern void make_sure_not_seen(const object *op);
196 /* map.c */
197 extern mapstruct *has_been_loaded(const char *name);
198 extern char *create_pathname(const char *name, char *buf, size_t size);
199 extern void create_overlay_pathname(const char *name, char *buf, size_t size);
200 extern void create_template_pathname(const char *name, char *buf, size_t size);
201 extern int check_path(const char *name, int prepend_dir);
202 extern void dump_map(const mapstruct *m);
203 extern void dump_all_maps(void);
204 extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny);
205 extern int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy);
206 extern int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y);
207 extern mapstruct *get_linked_map(void);
208 extern mapstruct *get_empty_map(int sizex, int sizey);
209 extern mapstruct *mapfile_load(const char *map, int flags);
210 extern int save_map(mapstruct *m, int flag);
211 extern void clean_object(object *op);
212 extern void free_map(mapstruct *m);
213 extern void delete_map(mapstruct *m);
214 extern mapstruct *ready_map_name(const char *name, int flags);
215 extern int calculate_difficulty(mapstruct *m);
216 extern void clean_tmp_map(mapstruct *m);
217 extern void free_all_maps(void);
218 extern int change_map_light(mapstruct *m, int change);
219 extern void update_position(mapstruct *m, int x, int y);
220 extern void set_map_reset_time(mapstruct *map);
221 extern int out_of_map(mapstruct *m, int x, int y);
222 extern mapstruct *get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y);
223 extern int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags);
224 extern int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags);
225 extern int on_same_map(const object *op1, const object *op2);
226 extern object *map_find_by_flag(mapstruct *map, int x, int y, int flag);
227 extern void map_remove_unique_files(const mapstruct *map);
228 extern const char *map_get_path(const object *item);
229 /* ob_methods.c */
230 extern method_ret ob_apply(object *op, object *applier, int aflags);
231 extern method_ret ob_process(object *op);
232 extern char *ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size);
233 extern method_ret ob_move_on(object *op, object *victim, object *originator);
234 extern method_ret ob_trigger(object *op, object *cause, int state);
235 /* ob_types.c */
236 extern void init_ob_method_struct(ob_methods *methods, ob_methods *fallback);
237 extern void init_ob_types(ob_methods *base_type);
238 extern void register_apply(int ob_type, apply_func method);
239 extern void register_process(int ob_type, process_func method);
240 extern void register_describe(int ob_type, describe_func method);
241 extern void register_move_on(int ob_type, move_on_func method);
242 extern void register_trigger(int ob_type, trigger_func method);
243 /* object.c */
244 extern int object_can_merge(object *ob1, object *ob2);
245 extern signed long object_sum_weight(object *op);
246 extern object *object_get_env_recursive(object *op);
247 extern object *object_get_player_container(object *op);
248 extern void object_dump(const object *op, StringBuffer *sb);
249 extern void object_dump_all(void);
250 extern object *object_find_by_tag_global(tag_t i);
251 extern object *object_find_by_name_global(const char *str);
252 extern void object_free_all_data(void);
253 extern object *object_get_owner(object *op);
254 extern void object_clear_owner(object *op);
255 extern void object_set_owner(object *op, object *owner);
256 extern void object_copy_owner(object *op, object *clone);
257 extern void object_set_enemy(object *op, object *enemy);
258 extern void object_reset(object *op);
259 extern void object_free_key_values(object *op);
260 extern void object_clear(object *op);
261 extern void object_copy(const object *src_ob, object *dest_ob);
262 extern void object_copy_with_inv(const object *src_ob, object *dest_ob);
263 extern object *object_new(void);
264 extern void object_update_turn_face(object *op);
265 extern void object_update_speed(object *op);
266 extern void object_remove_from_active_list(object *op);
267 extern void object_update(object *op, int action);
268 extern void object_free_drop_inventory(object *ob);
269 extern void object_free_inventory(object *ob);
270 extern void object_free(object *ob, int flags);
271 extern int object_count_free(void);
272 extern int object_count_used(void);
273 extern int object_count_active(void);
274 extern void object_sub_weight(object *op, signed long weight);
275 extern void object_remove(object *op);
276 extern object *object_merge(object *op, object *top);
277 extern object *object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y);
278 extern void object_merge_spell(object *op, int16_t x, int16_t y);
279 extern object *object_insert_in_map(object *op, mapstruct *m, object *originator, int flag);
280 extern void object_replace_insert_in_map(const char *arch_string, object *op);
281 extern object *object_split(object *orig_ob, uint32_t nr, char *err, size_t size);
282 extern object *object_decrease_nrof(object *op, uint32_t i);
283 extern void object_add_weight(object *op, signed long weight);
284 extern object *object_insert_in_ob(object *op, object *where);
285 extern int object_check_move_on(object *op, object *originator);
286 extern object *map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at);
287 extern object *map_find_by_type(mapstruct *m, int x, int y, uint8_t type);
288 extern object *object_present_in_ob(uint8_t type, const object *op);
289 extern object *object_present_in_ob_by_name(int type, const char *str, const object *op);
290 extern object *arch_present_in_ob(const archetype *at, const object *op);
291 extern void object_set_flag_inv(object *op, int flag);
292 extern void object_unset_flag_inv(object *op, int flag);
293 extern void object_set_cheat(object *op);
294 extern int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy);
295 extern int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy);
296 extern int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop);
297 extern int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y);
298 extern void get_search_arr(int *search_arr);
299 extern int object_distance(const object *ob1, const object *ob2);
300 extern int find_dir_2(int x, int y);
301 extern int absdir(int d);
302 extern int dirdiff(int dir1, int dir2);
303 extern int can_see_monsterP(mapstruct *m, int x, int y, int dir);
304 extern int object_can_pick(const object *who, const object *item);
305 extern object *object_create_clone(object *asrc);
306 extern object *object_find_by_name(const object *who, const char *name);
307 extern object *object_find_by_type(const object *who, int type);
308 extern object *object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags);
309 extern object *object_find_by_type2(const object *who, int type1, int type2);
310 extern object *object_find_by_tag(const object *who, tag_t tag);
311 extern object *object_find_by_type_applied(const object *who, int type);
312 extern object *object_find_by_type_and_name(const object *who, int type, const char *name);
313 extern object *object_find_by_type_and_race(const object *who, int type, const char *race);
314 extern object *object_find_by_type_and_slaying(const object *who, int type, const char *slaying);
315 extern object *object_find_by_type_and_skill(const object *who, int type, const char *skill);
316 extern object *object_find_by_flag(const object *who, int flag);
317 extern object *object_find_by_flag_applied(const object *who, int flag);
318 extern object *object_find_by_arch_name(const object *who, const char *name);
319 extern object *object_find_by_type_and_arch_name(const object *who, int type, const char *name);
320 extern object *object_find_by_type_subtype(const object *who, int type, int subtype);
321 extern key_value *object_get_key_value(const object *ob, const char *key);
322 extern const char *object_get_value(const object *op, const char *const key);
323 extern bool object_value_set(const object *op, const char *const key);
324 extern bool object_value_set_shared(const object *op, sstring key);
325 extern int object_set_value(object *op, const char *key, const char *value, int add_key);
326 extern int object_matches_string(object *pl, object *op, const char *name);
327 extern void object_fix_multipart(object *tmp);
328 extern void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy);
329 extern void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator);
330 extern void object_set_msg(object *op, const char *msg);
331 extern void get_ob_diff(StringBuffer *sb, const object *op, const object *op2);
332 extern int save_object(FILE *fp, object *op, int flag);
333 extern void save_object_in_sb(StringBuffer *sb, object *op, const int flag);
334 extern void object_handle_death_animation(object *op);
335 extern int object_matches_pickup_mode(const object *item, int mode);
336 /* path.c */
337 extern char *path_combine(const char *src, const char *dst, char *path, size_t size);
338 extern void path_normalize(char *path);
339 extern char *path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size);
340 /* porting.c */
341 extern FILE *tempnam_secure(const char *dir, const char *pfx, char **filename);
342 extern void remove_directory(const char *path);
343 extern int isqrt(int n);
344 extern void make_path_to_file(const char *filename);
345 /* player.c */
346 extern void clear_player(player *pl);
347 extern void free_player(player *pl);
348 extern int atnr_is_dragon_enabled(int attacknr);
349 extern int is_dragon_pl(const object *op);
350 extern client_spell *get_client_spell_state(player *pl, object *spell);
351 extern int is_wraith_pl(object *op);
352 extern int is_old_wraith_pl(object *op);
353 extern void player_set_dragon_title(struct pl *pl, int level, const char *attack, int skin_resist);
354 extern void player_get_title(const struct pl *pl, char *buf, size_t bufsize);
355 extern int player_has_own_title(const struct pl *pl);
356 extern const char *player_get_own_title(const struct pl *pl);
357 extern void player_set_own_title(struct pl *pl, const char *title);
358 extern void link_player_skills(object *op);
359 /* re-cmp.c */
360 extern const char *re_cmp(const char *str, const char *regexp);
361 /* readable.c */
362 extern int nstrtok(const char *buf1, const char *buf2);
363 extern char *strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size);
364 extern int book_overflow(const char *buf1, const char *buf2, size_t booksize);
365 extern void init_readable(void);
366 extern object *get_random_mon(int level);
367 extern void tailor_readable_ob(object *book, int msg_type);
368 extern void free_all_readable(void);
369 extern void write_book_archive(void);
370 extern const readable_message_type *get_readable_message_type(object *readable);
371 extern const GeneralMessage *get_message_from_identifier(const char *identifier);
374 extern const Face *get_message_face(const GeneralMessage *message);
375 extern void init_msgfile(FILE *file, const char *filename);
376 /* recipe.c */
377 extern recipelist *get_formulalist(int i);
378 extern void init_formulae(BufferReader *reader, const char *filename);
379 extern void dump_alchemy(void);
380 extern archetype *find_treasure_by_name(const treasure *t, const char *name, int depth);
381 extern void dump_alchemy_costs(void);
382 extern int strtoint(const char *buf);
383 extern const artifact *locate_recipe_artifact(const recipe *rp, size_t idx);
384 extern recipe *get_random_recipe(recipelist *rpl);
385 extern void free_all_recipes(void);
386 extern recipe *find_recipe_for_tool(const char *tool, recipe *from);
387 extern void check_formulae(void);
388 extern const Face *recipe_get_face(const recipe *rp);
389 extern void check_recipes();
390 /* region.c */
391 extern region *get_region_by_name(const char *region_name);
393 extern const char *get_name_of_region_for_map(const mapstruct *m);
394 extern region *get_region_from_string(const char *name);
395 extern int region_is_child_of_region(const region *child, const region *r);
396 extern const char *get_region_longname(const region *r);
397 extern const char *get_region_msg(const region *r);
398 extern object *get_jail_exit(object *op);
399 extern void init_regions(BufferReader *reader, const char *filename);
400 extern region *get_region_struct(void);
401 /* shstr.c */
402 extern void init_hash_table(void);
403 extern sstring add_string(const char *str);
405 extern int query_refcount(sstring str);
406 extern sstring find_string(const char *str);
407 extern void free_string(sstring str);
408 extern void ss_dump_statistics(char *buf, size_t size);
409 extern char *ss_dump_table(int what, char *buf, size_t size);
410 extern int buf_overflow(const char *buf1, const char *buf2, size_t bufsize);
411 /* stringbuffer.c */
412 extern StringBuffer *stringbuffer_new(void);
413 extern void stringbuffer_delete(StringBuffer *sb);
414 extern char *stringbuffer_finish(StringBuffer *sb);
416 extern void stringbuffer_append_string(StringBuffer *sb, const char *str);
417 extern void stringbuffer_append_printf(StringBuffer *sb, const char *format, ...);
418 extern void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2);
419 extern void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end);
420 extern size_t stringbuffer_length(StringBuffer *sb);
421 /* time.c */
422 extern const char *get_periodofday(const int index);
423 extern const char *get_month_name(const int index);
424 extern const char *get_weekday(const int index);
425 extern const char *get_season_name(const int index);
426 extern void reset_sleep(void);
427 extern long usec_elapsed(struct timespec first, struct timespec second);
428 void tick_game_time(void);
429 long get_sleep_remaining(void);
430 extern void jump_time(void);
431 extern void set_tick_duration(long t);
432 extern void get_tod(timeofday_t *tod);
433 extern void time_info(object *op);
434 extern long seconds(void);
435 extern const char *time_format_time(const timeofday_t *tod, char *buf, size_t bufsize);
436 /* treasure.c */
437 extern void init_archetype_pointers(void);
438 extern void load_treasures(void);
439 extern treasurelist *find_treasurelist(const char *name);
440 extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries);
441 extern object *generate_treasure(treasurelist *t, int difficulty);
442 extern void set_abs_magic(object *op, int magic);
443 extern void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags);
444 extern void dump_monster_treasure(const char *name);
445 extern treasure *get_empty_treasure();
446 extern void treasure_free(treasure *t);
447 extern treasure *treasure_insert(treasurelist *list, int position);
448 extern void treasure_remove_item(treasurelist *list, int position);
449 /* utils.c */
450 extern int random_roll(int min, int max, const object *op, int goodbad);
451 extern int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad);
452 extern int die_roll(int num, int size, const object *op, int goodbad);
453 extern int rndm(int min, int max);
454 extern void decay_objects(mapstruct *m);
455 extern materialtype_t *name_to_material(const char *name);
456 extern void transmute_materialname(object *op, const object *change);
457 extern void set_materialname(object *op);
458 extern void strip_endline(char *buf);
459 extern void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize);
460 extern void make_list_like(char *input);
461 extern int get_random_dir(void);
462 extern int get_randomized_dir(int dir);
463 extern int adjust_dir(int dir, int destination_dir);
464 extern void replace_unprintable_chars(char *buf);
465 extern size_t split_string(char *str, char *array[], size_t array_size, char sep);
466 extern StringBuffer *describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf);
467 extern StringBuffer *describe_attacktype(const char *attack, int value, StringBuffer *buf);
468 extern void free_charlinks(linked_char *lc);
469 /* loader.c */
470 extern void yyrestart(FILE *input_file);
471 extern void yypop_buffer_state(void);
472 extern int yyget_lineno(void);
473 extern FILE *yyget_in(void);
474 extern FILE *yyget_out(void);
475 extern char *yyget_text(void);
476 extern void yyset_lineno(int line_number);
477 extern void yyset_in(FILE *in_str);
478 extern void yyset_out(FILE *out_str);
479 extern int yyget_debug(void);
480 extern void yyset_debug(int bdebug);
481 extern int yylex_destroy(void);
482 extern void yyfree(void *ptr);
483 extern int load_object(FILE *fp, object *op, int bufstate, int map_flags);
484 extern int load_object_from_reader(BufferReader *reader, object *op, int map_flags);
485 extern int set_variable(object *op, const char *buf);
486 extern void free_loader(void);
object_find_multi_free_spot_within_radius
int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy)
Definition: object.c:3383
Face
Definition: face.h:14
clear_friendly_list
void clear_friendly_list(void)
Definition: friend.cpp:138
path_normalize
void path_normalize(char *path)
Definition: path.c:85
init_block
void init_block(void)
Definition: los.c:88
share_exp
void share_exp(object *op, int64_t exp, const char *skill, int flag)
Definition: living.c:2312
object_remove_from_active_list
void object_remove_from_active_list(object *op)
Definition: object.c:1378
yyset_out
void yyset_out(FILE *out_str)
Definition: loader.c:5019
object_split
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
Definition: object.c:2613
get_formulalist
recipelist * get_formulalist(int i)
Definition: recipe.c:96
get_dex_bonus
int get_dex_bonus(int stat)
Definition: living.c:2354
object_unset_flag_inv
void object_unset_flag_inv(object *op, int flag)
Definition: object.c:3227
get_periodofday
const char * get_periodofday(const int index)
Definition: time.c:104
object_add_weight
void object_add_weight(object *op, signed long weight)
Definition: object.c:2809
clear_los
void clear_los(player *pl)
Definition: los.c:252
get_empty_map
mapstruct * get_empty_map(int sizex, int sizey)
Definition: map.c:869
object_find_first_free_spot
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
Definition: object.c:3570
ob_process
method_ret ob_process(object *op)
Definition: ob_methods.c:67
get_bitmap_checksum
int get_bitmap_checksum()
Definition: assets.cpp:362
object_find_by_flag_applied
object * object_find_by_flag_applied(const object *who, int flag)
Definition: object.c:4200
query_short_name
void query_short_name(const object *op, char *buf, size_t size)
Definition: item.c:510
GeneralMessage
Definition: book.h:44
dirdiff
int dirdiff(int dir1, int dir2)
Definition: object.c:3703
stringbuffer_new
StringBuffer * stringbuffer_new(void)
Definition: stringbuffer.c:57
object_set_value
int object_set_value(object *op, const char *key, const char *value, int add_key)
Definition: object.c:4470
object_value_set_shared
bool object_value_set_shared(const object *op, sstring key)
Definition: object.c:4361
replace
void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize)
Definition: utils.c:337
register_describe
void register_describe(int ob_type, describe_func method)
Definition: ob_types.c:80
try_find_face
const Face * try_find_face(const char *name, const Face *error)
Definition: assets.cpp:312
fix_object
void fix_object(object *op)
Definition: living.c:1126
tailor_readable_ob
void tailor_readable_ob(object *book, int msg_type)
Definition: readable.c:1928
yyfree
void yyfree(void *ptr)
Definition: loader.c:5135
object_can_pick
int object_can_pick(const object *who, const object *item)
Definition: object.c:3838
LOG
void LOG(LogLevel logLevel, const char *format,...)
Definition: logger.c:51
free_player
void free_player(player *pl)
Definition: player.c:68
free_objectlinkpt
void free_objectlinkpt(oblinkpt *obp)
Definition: links.c:79
tempnam_secure
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
Definition: porting.c:69
client_spell
Definition: player.h:87
get_region_longname
const char * get_region_longname(const region *r)
Definition: region.cpp:216
write_todclock
void write_todclock(void)
Definition: init.c:392
transmute_materialname
void transmute_materialname(object *op, const object *change)
Definition: utils.c:267
calculate_difficulty
int calculate_difficulty(mapstruct *m)
Definition: map.c:1911
trigger_func
method_ret(* trigger_func)(object *, object *, int)
Definition: ob_methods.h:43
diamondslots.x
x
Definition: diamondslots.py:15
create_template_pathname
void create_template_pathname(const char *name, char *buf, size_t size)
Definition: map.c:144
get_dialog_message
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
Definition: dialog.c:209
init_msgfile
void init_msgfile(FILE *file, const char *filename)
find_face
const Face * find_face(const char *name)
Definition: assets.cpp:308
free_experience
void free_experience(void)
Definition: exp.c:263
blocked_link
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
Definition: map.c:345
query_base_name
void query_base_name(const object *op, int plural, char *buf, size_t size)
Definition: item.c:686
seconds
long seconds(void)
Definition: time.c:344
init_attackmess
void init_attackmess(BufferReader *reader, const char *filename)
Definition: init.c:445
object_find_by_type_applied
object * object_find_by_type_applied(const object *who, int type)
Definition: object.c:4054
i18n
const char * i18n(const object *who, const char *code)
Definition: languages.c:55
dump_arch
void dump_arch(archetype *at, StringBuffer *sb)
Definition: arch.cpp:143
object_find_by_type
object * object_find_by_type(const object *who, int type)
Definition: object.c:3951
animate_turning
void animate_turning(object *op)
Definition: button.c:270
get_face_by_id
const Face * get_face_by_id(uint16_t id)
Definition: assets.cpp:345
ready_map_name
mapstruct * ready_map_name(const char *name, int flags)
Definition: map.c:1785
path_combine
char * path_combine(const char *src, const char *dst, char *path, size_t size)
Definition: path.c:51
dump_experience
void dump_experience(void)
Definition: exp.c:251
describe_attacktype
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
Definition: utils.c:545
is_type_valid
int is_type_valid(uint8_t type)
Definition: arch_types_valid.c:17
nstrtok
int nstrtok(const char *buf1, const char *buf2)
Definition: readable.c:637
object_count_free
int object_count_free(void)
Definition: object.c:1737
get_faces_count
size_t get_faces_count(void)
Definition: assets.cpp:319
arch_present_in_ob
object * arch_present_in_ob(const archetype *at, const object *op)
Definition: object.c:3193
init_regions
void init_regions(BufferReader *reader, const char *filename)
Definition: region.cpp:317
object_can_merge
int object_can_merge(object *ob1, object *ob2)
Definition: object.c:433
make_sure_seen
void make_sure_seen(const object *op)
Definition: los.c:636
find_god
const object * find_god(const char *name)
Definition: holy.cpp:321
object_replace_insert_in_map
void object_replace_insert_in_map(const char *arch_string, object *op)
Definition: object.c:2573
pl
Definition: player.h:105
player_set_dragon_title
void player_set_dragon_title(struct pl *pl, int level, const char *attack, int skin_resist)
Definition: player.c:202
get_speed_bonus
float get_speed_bonus(int stat)
Definition: living.c:2382
object_update_speed
void object_update_speed(object *op)
Definition: object.c:1330
out_of_map
int out_of_map(mapstruct *m, int x, int y)
Definition: map.c:2312
object_matches_string
int object_matches_string(object *pl, object *op, const char *name)
Definition: object.c:4545
object_dump_all
void object_dump_all(void)
Definition: object.c:708
query_weight
void query_weight(const object *op, char *buf, size_t size)
Definition: item.c:412
describe_spellpath_attenuation
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
Definition: utils.c:517
guildoracle.list
list
Definition: guildoracle.py:87
init_library
void init_library(void)
Definition: init.c:192
is_identified
int is_identified(const object *op)
Definition: item.c:1336
get_randomized_dir
int get_randomized_dir(int dir)
Definition: utils.c:422
set_tick_duration
void set_tick_duration(long t)
Definition: time.c:205
guildjoin.ob
ob
Definition: guildjoin.py:42
say.reply
string reply
Definition: say.py:77
treasure_free
void treasure_free(treasure *t)
Definition: treasure.c:1374
clear_player
void clear_player(player *pl)
Definition: player.c:33
level_exp
int64_t level_exp(int level, double expmul)
Definition: living.c:1874
player_get_own_title
const char * player_get_own_title(const struct pl *pl)
Definition: player.c:260
process_func
method_ret(* process_func)(object *)
Definition: ob_methods.h:40
remove_depletion
int remove_depletion(object *op, int level)
Definition: living.c:756
mad_mage_user.file
file
Definition: mad_mage_user.py:15
check_inv_recursive
object * check_inv_recursive(object *op, const object *trig)
Definition: button.c:782
drain_specific_stat
void drain_specific_stat(object *op, int deplete_stats)
Definition: living.c:729
yyget_out
FILE * yyget_out(void)
Definition: loader.c:4976
apply_death_exp_penalty
void apply_death_exp_penalty(object *op)
Definition: living.c:2233
get_button_value
int get_button_value(const object *button)
Definition: button.c:749
get_search_arr
void get_search_arr(int *search_arr)
Definition: object.c:3613
calc_item_power
int calc_item_power(const object *op)
Definition: item.c:239
find_archetype_by_object_type_name
archetype * find_archetype_by_object_type_name(int type, const char *name)
Definition: arch.cpp:68
fix_generated_item
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
Definition: treasure.c:876
object_find_by_flag
object * object_find_by_flag(const object *who, int flag)
Definition: object.c:4177
give.top
def top
Definition: give.py:42
make_list_like
void make_list_like(char *input)
Definition: utils.c:378
i18n_find_language_by_code
int i18n_find_language_by_code(const char *code)
Definition: languages.c:81
find_treasurelist
treasurelist * find_treasurelist(const char *name)
Definition: assets.cpp:263
object_update
void object_update(object *op, int action)
Definition: object.c:1420
check_inv
void check_inv(object *op, object *trig)
Definition: button.c:825
Ice.tmp
int tmp
Definition: Ice.py:207
get_random_mon
object * get_random_mon(int level)
Definition: readable.c:1268
check_formulae
void check_formulae(void)
Definition: recipe.c:293
treasure_remove_item
void treasure_remove_item(treasurelist *list, int position)
Definition: treasure.c:1414
object_free_all_data
void object_free_all_data(void)
Definition: object.c:771
describe_resistance
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
Definition: item.c:369
free_all_maps
void free_all_maps(void)
Definition: map.c:1977
get_archetype_by_type_subtype
archetype * get_archetype_by_type_subtype(int type, int subtype)
Definition: arch.cpp:101
usec_elapsed
long usec_elapsed(struct timespec first, struct timespec second)
Definition: cfanim.c:1149
oblinkpt
Definition: object.h:455
object_give_identified_properties
void object_give_identified_properties(object *op)
Definition: item.c:1344
add_statbonus
void add_statbonus(object *op)
Definition: living.c:869
set_materialname
void set_materialname(object *op)
Definition: utils.c:301
adjust_dir
int adjust_dir(int dir, int destination_dir)
Definition: utils.c:436
object_check_move_on
int object_check_move_on(object *op, object *originator)
Definition: object.c:2983
flags
static const flag_definition flags[]
Definition: gridarta-types-convert.c:101
yyset_in
void yyset_in(FILE *in_str)
Definition: loader.c:5014
init_objects
void init_objects(void)
Definition: object.c:327
get_client_spell_state
client_spell * get_client_spell_state(player *pl, object *spell)
Definition: player.c:144
find_artifact
const artifact * find_artifact(const object *op, const char *name)
Definition: artifact.c:590
npc_dialog.filename
filename
Definition: npc_dialog.py:99
add_string
sstring add_string(const char *str)
Definition: shstr.c:124
is_wraith_pl
int is_wraith_pl(object *op)
Definition: player.c:173
free_all_recipes
void free_all_recipes(void)
Definition: recipe.c:688
create_treasure
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
Definition: treasure.c:241
free_objectlink
void free_objectlink(objectlink *ol)
Definition: links.c:67
decay_objects
void decay_objects(mapstruct *m)
Definition: utils.c:175
generate_artifact
void generate_artifact(object *op, int difficulty)
Definition: artifact.c:187
make_path_to_file
void make_path_to_file(const char *filename)
Definition: porting.c:162
object_get_value
const char * object_get_value(const object *op, const char *const key)
Definition: object.c:4317
create_overlay_pathname
void create_overlay_pathname(const char *name, char *buf, size_t size)
Definition: map.c:124
stringbuffer_finish_shared
sstring stringbuffer_finish_shared(StringBuffer *sb)
Definition: stringbuffer.c:85
push.connected
connected
Definition: push.py:59
get_rand_god
const object * get_rand_god(void)
Definition: holy.cpp:77
free_charlinks
void free_charlinks(linked_char *lc)
Definition: utils.c:606
update_all_los
void update_all_los(const mapstruct *map, int x, int y)
Definition: los.c:536
free_globals
void free_globals(void)
Definition: init.c:311
yyset_lineno
void yyset_lineno(int line_number)
Definition: loader.c:5002
_timeofday
Definition: tod.h:38
clean_tmp_map
void clean_tmp_map(mapstruct *m)
Definition: map.c:1968
object_free_drop_inventory
void object_free_drop_inventory(object *ob)
Definition: object.c:1546
treasurestruct
Definition: treasure.h:63
object_find_by_type2
object * object_find_by_type2(const object *who, int type1, int type2)
Definition: object.c:4008
free_loader
void free_loader(void)
Definition: loader.c:5333
get_colorname
const char * get_colorname(uint8_t index)
Definition: image.c:85
get_typedata_by_name
const typedata * get_typedata_by_name(const char *name)
Definition: item.c:340
ss_dump_statistics
void ss_dump_statistics(char *buf, size_t size)
Definition: shstr.c:323
base_type
static ob_methods base_type
Definition: ob_methods.c:27
linked_char
Definition: global.h:86
ob_trigger
method_ret ob_trigger(object *op, object *cause, int state)
Definition: ob_methods.c:133
archt
Definition: object.h:469
exp_level
int exp_level(int64_t exp)
Definition: living.c:1886
get_weight_limit
uint32_t get_weight_limit(int stat)
Definition: living.c:2362
get_rangevector
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
Definition: map.c:2545
re_cmp
const char * re_cmp(const char *str, const char *regexp)
Definition: re-cmp.c:69
get_message_body
sstring get_message_body(const GeneralMessage *message)
Definition: readable.c:2118
get_name_of_region_for_map
const char * get_name_of_region_for_map(const mapstruct *m)
Definition: region.cpp:94
find_color
uint8_t find_color(const char *name)
Definition: image.c:74
yyset_debug
void yyset_debug(int bdebug)
Definition: loader.c:5029
update_all_map_los
void update_all_map_los(mapstruct *map)
Definition: los.c:508
set_dragon_name
void set_dragon_name(object *pl, const object *abil, const object *skin)
Definition: living.c:1679
typedata
Definition: define.h:89
has_been_loaded
mapstruct * has_been_loaded(const char *name)
Definition: map.c:78
m
static event_registration m
Definition: citylife.cpp:427
new_exp
int64_t new_exp(const object *ob)
Definition: exp.c:100
recipestruct
Definition: recipe.h:10
autojail.who
who
Definition: autojail.py:3
check_recipes
void check_recipes()
Definition: recipe.c:146
describe_god
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
Definition: holy.cpp:113
find_string
sstring find_string(const char *str)
Definition: shstr.c:236
find_smooth
int find_smooth(const Face *face, const Face **smoothed)
Definition: image.c:101
is_valid_faceset
int is_valid_faceset(int fsn)
Definition: image.c:116
can_see_monsterP
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
Definition: object.c:3793
load_png_file
int load_png_file(FILE *file, const char *full_path)
change_exp
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Definition: living.c:2168
object_get_multi_size
void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy)
Definition: object.c:4714
create_singularity
object * create_singularity(const char *name)
Definition: arch.cpp:258
disinfect.map
map
Definition: disinfect.py:4
object_count_active
int object_count_active(void)
Definition: object.c:1769
titlestruct
Definition: readable.c:107
update_los
void update_los(object *op)
Definition: los.c:459
find_animation
Animations * find_animation(const char *name)
Definition: assets.cpp:296
allowed_class
int allowed_class(const object *op)
Definition: living.c:1652
yyget_debug
int yyget_debug(void)
Definition: loader.c:5024
absdir
int absdir(int d)
Definition: object.c:3685
init_gods
void init_gods(void)
Definition: holy.cpp:63
add_button_link
void add_button_link(object *button, mapstruct *map, int connected)
Definition: button.c:656
rotate-tower.result
bool result
Definition: rotate-tower.py:13
get_empty_artifactlist
artifactlist * get_empty_artifactlist(void)
Definition: artifact.c:37
object_clear_owner
void object_clear_owner(object *op)
Definition: object.c:827
check_stat_bounds
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
Definition: living.c:355
get_empty_artifact
artifact * get_empty_artifact(void)
Definition: artifact.c:56
describe_func
void(* describe_func)(const object *, const object *, int use_media_tags, char *buf, size_t size)
Definition: ob_methods.h:41
update_buttons
void update_buttons(mapstruct *m)
Definition: button.c:227
i18n_get_language_by_code
int i18n_get_language_by_code(const char *code)
Definition: languages.c:96
object_remove
void object_remove(object *op)
Definition: object.c:1819
register_trigger
void register_trigger(int ob_type, trigger_func method)
Definition: ob_types.c:98
object_find_by_tag_global
object * object_find_by_tag_global(tag_t i)
Definition: object.c:731
die_roll
int die_roll(int num, int size, const object *op, int goodbad)
Definition: utils.c:122
object_count_used
int object_count_used(void)
Definition: object.c:1753
region_is_child_of_region
int region_is_child_of_region(const region *child, const region *r)
Definition: region.cpp:189
object_find_by_name
object * object_find_by_name(const object *who, const char *name)
Definition: object.c:3927
get_message_from_identifier
const GeneralMessage * get_message_from_identifier(const char *identifier)
Definition: assets.cpp:358
object_get_player_container
object * object_get_player_container(object *op)
Definition: object.c:611
object_merge_spell
void object_merge_spell(object *op, int16_t x, int16_t y)
Definition: object.c:2109
get_region_msg
const char * get_region_msg(const region *r)
Definition: region.cpp:237
treasure_insert
treasure * treasure_insert(treasurelist *list, int position)
Definition: treasure.c:1391
artifact_get_face
uint16_t artifact_get_face(const artifact *art)
Definition: artifact.c:642
arch_to_object
object * arch_to_object(archetype *at)
Definition: arch.cpp:232
load_face_file
int load_face_file(FILE *file, const char *full_path)
yypop_buffer_state
void yypop_buffer_state(void)
Definition: loader.c:4746
ob_methods
Definition: ob_methods.h:45
dump_alchemy
void dump_alchemy(void)
Definition: recipe.c:350
make_face_from_files.str
str
Definition: make_face_from_files.py:24
legal_artifact_combination
int legal_artifact_combination(const object *op, const artifact *art)
Definition: artifact.c:260
get_next_friend
object * get_next_friend(object *current)
Definition: friend.cpp:147
python_init.path
path
Definition: python_init.py:8
get_objectlinkpt
oblinkpt * get_objectlinkpt(void)
Definition: links.c:51
give_artifact_abilities
void give_artifact_abilities(object *op, const object *artifact)
Definition: artifact.c:238
convert.action
action
Definition: convert.py:25
get_face_fallback
int get_face_fallback(int faceset, uint16_t imageno)
Definition: image.c:132
print_monsters
void print_monsters(void)
Definition: info.c:101
dump_artifacts
void dump_artifacts(void)
Definition: artifact.c:616
ob_describe
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
Definition: ob_methods.c:91
navar-midane_pickup.msg
list msg
Definition: navar-midane_pickup.py:13
dump_animations
void dump_animations(void)
Definition: anim.c:183
struct_dialog_reply
Definition: dialog.h:18
object_insert_in_map
object * object_insert_in_map(object *op, mapstruct *m, object *originator, int flag)
Definition: object.c:2341
free_map
void free_map(mapstruct *m)
Definition: map.c:1676
get_learn_spell
int get_learn_spell(int stat)
Definition: living.c:2366
init_ob_types
void init_ob_types(ob_methods *base_type)
Definition: ob_types.c:49
get_random_recipe
recipe * get_random_recipe(recipelist *rpl)
Definition: recipe.c:664
create_pathname
char * create_pathname(const char *name, char *buf, size_t size)
Definition: map.c:103
free_all_readable
void free_all_readable(void)
Definition: readable.c:2010
is_identifiable_type
int is_identifiable_type(const object *op)
Definition: item.c:1312
stringbuffer_length
size_t stringbuffer_length(StringBuffer *sb)
Definition: stringbuffer.c:218
get_month_name
const char * get_month_name(const int index)
Definition: time.c:111
change_luck
void change_luck(object *op, int value)
Definition: living.c:797
get_archetype_by_skill_name
archetype * get_archetype_by_skill_name(const char *skill, int type)
Definition: arch.cpp:82
object_insert_in_ob
object * object_insert_in_ob(object *op, object *where)
Definition: object.c:2833
CFweardisguise.tag
tag
Definition: CFweardisguise.py:25
_materialtype
Definition: material.h:32
get_attr_value
int8_t get_attr_value(const living *stats, int attr)
Definition: living.c:314
strtoint
int strtoint(const char *buf)
Definition: recipe.c:583
object_distance
int object_distance(const object *ob1, const object *ob2)
Definition: object.c:3632
find_archetype_by_object_name
archetype * find_archetype_by_object_name(const char *name)
Definition: arch.cpp:55
artifactliststruct
Definition: artifact.h:26
time_format_time
const char * time_format_time(const timeofday_t *tod, char *buf, size_t bufsize)
Definition: time.c:365
add_abilities
void add_abilities(object *op, const object *change)
Definition: artifact.c:329
bufferreader.h
apply_anim_suffix
void apply_anim_suffix(object *who, const char *suffix)
Definition: anim.c:149
object_free_inventory
void object_free_inventory(object *ob)
Definition: object.c:1554
sstring
const typedef char * sstring
Definition: global.h:40
say.max
dictionary max
Definition: say.py:148
object_find_by_arch_name
object * object_find_by_arch_name(const object *who, const char *name)
Definition: object.c:4223
tag_t
uint32_t tag_t
Definition: object.h:12
animation_load_block
void animation_load_block(FILE *file, const char *full_path, const char *animation_name)
face_sets::size
char * size
Definition: image.h:22
save_object
int save_object(FILE *fp, object *op, int flag)
Definition: object.c:5363
is_old_wraith_pl
int is_old_wraith_pl(object *op)
Definition: player.c:185
yylex_destroy
int yylex_destroy(void)
Definition: loader.c:5067
init_globals
void init_globals(void)
Definition: init.c:265
recipeliststruct
Definition: recipe.h:37
buf_overflow
int buf_overflow(const char *buf1, const char *buf2, size_t bufsize)
Definition: shstr.c:398
mapdef
Definition: map.h:317
fatal
void fatal(enum fatal_error err) __attribute__((noreturn))
Definition: utils.c:580
locate_recipe_artifact
const artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
Definition: recipe.c:604
dump_map
void dump_map(const mapstruct *m)
Definition: map.c:246
get_archetype_struct
archetype * get_archetype_struct(void)
Definition: arch.cpp:198
object_set_flag_inv
void object_set_flag_inv(object *op, int flag)
Definition: object.c:3210
object_find_by_type_and_arch_name
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
Definition: object.c:4248
object_new
object * object_new(void)
Definition: object.c:1255
liv
Definition: living.h:35
stringbuffer_finish
char * stringbuffer_finish(StringBuffer *sb)
Definition: stringbuffer.c:76
yyget_lineno
int yyget_lineno(void)
Definition: loader.c:4959
player_has_own_title
int player_has_own_title(const struct pl *pl)
Definition: player.c:247
load_object
int load_object(FILE *fp, object *op, int bufstate, int map_flags)
Definition: loader.c:5205
object_reset
void object_reset(object *op)
Definition: object.c:938
get_linked_map
mapstruct * get_linked_map(void)
Definition: map.c:788
face_sets::fallback
struct face_sets * fallback
Definition: image.h:21
object_insert_to_free_spot_or_free
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:4761
get_levelnumber
void get_levelnumber(int i, char *buf, size_t size)
object_get_key_value
key_value * object_get_key_value(const object *ob, const char *key)
Definition: object.c:4292
guild_entry.text
text
Definition: guild_entry.py:44
load_treasures
void load_treasures(void)
random_roll64
int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad)
Definition: utils.c:77
load_object_from_reader
int load_object_from_reader(BufferReader *reader, object *op, int map_flags)
Definition: loader.c:5255
get_tod
void get_tod(timeofday_t *tod)
Definition: time.c:215
get_map_flags
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
Definition: map.c:301
get_power_from_ench
int get_power_from_ench(int ench)
Definition: item.c:211
update_position
void update_position(mapstruct *m, int x, int y)
Definition: map.c:2133
artifactstruct
Definition: artifact.h:14
write_book_archive
void write_book_archive(void)
Definition: readable.c:2046
change_attr_value
void change_attr_value(living *stats, int attr, int8_t value)
Definition: living.c:265
get_message_face
const Face * get_message_face(const GeneralMessage *message)
Definition: readable.c:2127
describe_item
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
Definition: item.c:941
move_on_func
method_ret(* move_on_func)(object *, object *, object *)
Definition: ob_methods.h:42
map_remove_unique_files
void map_remove_unique_files(const mapstruct *map)
Definition: map.c:2697
dump_gods
void dump_gods(void)
Definition: holy.cpp:371
object_find_by_type_and_race
object * object_find_by_type_and_race(const object *who, int type, const char *race)
Definition: object.c:4104
animate_object
void animate_object(object *op, int dir)
Definition: anim.c:43
init_experience
void init_experience(void)
Definition: exp.c:167
remove_directory
void remove_directory(const char *path)
Definition: porting.c:115
strtoktolin
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
Definition: readable.c:679
dump_all_archetypes
void dump_all_archetypes(void)
Definition: arch.cpp:152
get_thaco_bonus
int get_thaco_bonus(int stat)
Definition: living.c:2358
yyrestart
void yyrestart(FILE *input_file)
Definition: loader.c:4550
StringBuffer
Definition: stringbuffer.c:25
map_get_path
const char * map_get_path(const object *item)
Definition: map.c:2722
stringbuffer_delete
void stringbuffer_delete(StringBuffer *sb)
Definition: stringbuffer.c:71
guildbuy.ob2
ob2
Definition: guildbuy.py:23
mapfile_load
mapstruct * mapfile_load(const char *map, int flags)
Definition: map.c:1214
dump_monster_treasure
void dump_monster_treasure(const char *name)
Definition: treasure.c:1217
init_stats
void init_stats(int reload)
Definition: living.c:2594
object_handle_death_animation
void object_handle_death_animation(object *op)
Definition: object.c:5376
object_insert_in_map_at
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Definition: object.c:2080
dump_alchemy_costs
void dump_alchemy_costs(void)
Definition: recipe.c:462
method_ret
char method_ret
Definition: ob_methods.h:14
get_friends_of
objectlink * get_friends_of(const object *owner)
Definition: friend.cpp:121
object_get_owner
object * object_get_owner(object *op)
Definition: object.c:808
get_rangevector_from_mapcoord
int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags)
Definition: map.c:2618
diamondslots.message
string message
Definition: diamondslots.py:57
first_arch_pass
void first_arch_pass(FILE *fp, const char *filename)
set_variable
int set_variable(object *op, const char *buf)
Definition: loader.c:5306
player_get_title
void player_get_title(const struct pl *pl, char *buf, size_t bufsize)
Definition: player.c:232
animations_struct
Definition: face.h:25
get_next_archetype
archetype * get_next_archetype(archetype *current)
Definition: assets.cpp:280
object_present_in_ob_by_name
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
Definition: object.c:3174
altar_valkyrie.altar
altar
Definition: altar_valkyrie.py:27
Floor.t
t
Definition: Floor.py:62
set_abs_magic
void set_abs_magic(object *op, int magic)
Definition: treasure.c:590
check_exp_adjust
int64_t check_exp_adjust(const object *op, int64_t exp)
Definition: living.c:2091
object_value_set
bool object_value_set(const object *op, const char *const key)
Definition: object.c:4347
roll-o-matic.stop
def stop()
Definition: roll-o-matic.py:78
add_refcount
sstring add_refcount(sstring str)
Definition: shstr.c:210
guildbuy.ob1
ob1
Definition: guildbuy.py:22
struct_dialog_message
Definition: dialog.h:28
object_set_enemy
void object_set_enemy(object *op, object *enemy)
Definition: object.c:919
replace_unprintable_chars
void replace_unprintable_chars(char *buf)
Definition: utils.c:457
object_find_by_type_subtype
object * object_find_by_type_subtype(const object *who, int type, int subtype)
Definition: object.c:4272
calc_perm_exp
void calc_perm_exp(object *op)
Definition: living.c:1903
is_magical
int is_magical(const object *op)
Definition: item.c:1215
get_empty_treasure
treasure * get_empty_treasure()
Definition: treasure.c:1353
object_create_arch
object * object_create_arch(archetype *at)
Definition: arch.cpp:301
get_random_dir
int get_random_dir(void)
Definition: utils.c:410
did_make_save
int did_make_save(const object *op, int level, int bonus)
Definition: living.c:2282
object_clear
void object_clear(object *op)
Definition: object.c:987
push_button
void push_button(object *op)
Definition: button.c:149
get_weekday
const char * get_weekday(const int index)
Definition: time.c:118
i18n_init
void i18n_init(void)
Definition: languages.c:154
item
Definition: item.py:1
get_sleep_remaining
long get_sleep_remaining(void)
Definition: time.c:186
reputation.victim
victim
Definition: reputation.py:14
ob_apply
method_ret ob_apply(object *op, object *applier, int aflags)
Definition: ob_methods.c:44
give_skill_by_name
object * give_skill_by_name(object *op, const char *skill_name)
Definition: living.c:1779
trigger_connected
void trigger_connected(objectlink *ol, object *cause, const int state)
Definition: button.c:41
object_get_env_recursive
object * object_get_env_recursive(object *op)
Definition: object.c:594
map_find_by_archetype
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
Definition: object.c:3089
atnr_is_dragon_enabled
int atnr_is_dragon_enabled(int attacknr)
Definition: player.c:103
object_free_key_values
void object_free_key_values(object *op)
Definition: object.c:958
get_god_for_race
const char * get_god_for_race(const char *race)
Definition: holy.cpp:94
get_fear_bonus
int get_fear_bonus(int stat)
Definition: living.c:2386
give.op
op
Definition: give.py:33
get_ob_diff
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
Definition: object.c:4956
booksize
size_t booksize
Definition: readable.c:1609
get_region_by_map
region * get_region_by_map(mapstruct *m)
Definition: region.cpp:76
autojail.value
value
Definition: autojail.py:6
register_move_on
void register_move_on(int ob_type, move_on_func method)
Definition: ob_types.c:89
is_dragon_pl
int is_dragon_pl(const object *op)
Definition: player.c:122
object_update_turn_face
void object_update_turn_face(object *op)
Definition: object.c:1313
change_abil
int change_abil(object *op, object *tmp)
Definition: living.c:395
recipe_get_face
const Face * recipe_get_face(const recipe *rp)
Definition: recipe.c:797
on_same_map
int on_same_map(const object *op1, const object *op2)
Definition: map.c:2657
remove_friendly_object
void remove_friendly_object(object *op)
Definition: friend.cpp:56
free_string
void free_string(sstring str)
Definition: shstr.c:280
_key_value
Definition: object.h:40
rv_vector
Definition: map.h:373
artifact_compute_chance_for_item
void artifact_compute_chance_for_item(const object *op, const artifact *art, int *numerator, int *denominator)
Definition: artifact.c:141
get_typedata
const typedata * get_typedata(int itemtype)
Definition: item.c:320
clean_object
void clean_object(object *op)
Definition: map.c:1613
object_copy_with_inv
void object_copy_with_inv(const object *src_ob, object *dest_ob)
Definition: object.c:1194
yyget_text
char * yyget_text(void)
Definition: loader.c:4993
object_present_in_ob
object * object_present_in_ob(uint8_t type, const object *op)
Definition: object.c:3139
yyget_in
FILE * yyget_in(void)
Definition: loader.c:4968
object_find_by_type_without_flags
object * object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags)
Definition: object.c:3975
diamondslots.y
y
Definition: diamondslots.py:16
reset_sleep
void reset_sleep(void)
Definition: time.c:132
python_pickup.where
where
Definition: python_pickup.py:7
npc_dialog.index
int index
Definition: npc_dialog.py:102
operate_altar
int operate_altar(object *altar, object **sacrifice)
Definition: button.c:463
register_process
void register_process(int ob_type, process_func method)
Definition: ob_types.c:71
buf
StringBuffer * buf
Definition: readable.c:1610
get_region_by_name
region * get_region_by_name(const char *region_name)
Definition: region.cpp:48
object_sub_weight
void object_sub_weight(object *op, signed long weight)
Definition: object.c:1793
check_trigger
int check_trigger(object *op, object *cause)
Definition: button.c:518
object_find_by_type_and_skill
object * object_find_by_type_and_skill(const object *who, int type, const char *skill)
Definition: object.c:4154
i18n_list_languages
void i18n_list_languages(object *who)
Definition: languages.c:118
get_objectlink
objectlink * get_objectlink(void)
Definition: links.c:33
check_exp_loss
int64_t check_exp_loss(const object *op, int64_t exp)
Definition: living.c:2066
init_ob_method_struct
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
Definition: ob_types.c:32
object_copy
void object_copy(const object *src_ob, object *dest_ob)
Definition: object.c:1064
readable_message_type
Definition: book.h:36
identify
object * identify(object *op)
Definition: item.c:1409
set_attr_value
void set_attr_value(living *stats, int attr, int8_t value)
Definition: living.c:219
random_roll
int random_roll(int min, int max, const object *op, int goodbad)
Definition: utils.c:42
dump_friendly_objects
void dump_friendly_objects(void)
Definition: friend.cpp:74
castle_read.key
key
Definition: castle_read.py:64
init_hash_table
void init_hash_table(void)
Definition: shstr.c:55
get_cleric_chance
int get_cleric_chance(int stat)
Definition: living.c:2370
query_refcount
int query_refcount(sstring str)
Definition: shstr.c:224
stringbuffer_append_string
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Definition: stringbuffer.c:95
stringbuffer_append_stringbuffer
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Definition: stringbuffer.c:165
i18n_free
void i18n_free(void)
Definition: languages.c:239
book_overflow
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
Definition: readable.c:709
object_find_by_type_and_slaying
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
Definition: object.c:4129
delete_map
void delete_map(mapstruct *m)
Definition: map.c:1722
object_matches_pickup_mode
int object_matches_pickup_mode(const object *item, int mode)
Definition: c_object.c:656
map_find_by_type
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
Definition: object.c:3116
object_set_msg
void object_set_msg(object *op, const char *msg)
Definition: object.c:4781
register_apply
void register_apply(int ob_type, apply_func method)
Definition: ob_types.c:62
free_all_artifacts
void free_all_artifacts(void)
get_message_title
sstring get_message_title(const GeneralMessage *message)
Definition: readable.c:2109
path_combine_and_normalize
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
Definition: path.c:172
object_find_by_type_and_name
object * object_find_by_type_and_name(const object *who, int type, const char *name)
Definition: object.c:4079
object_set_cheat
void object_set_cheat(object *op)
Definition: object.c:3245
dump_all_maps
void dump_all_maps(void)
Definition: map.c:269
get_cha_bonus
int get_cha_bonus(int stat)
Definition: living.c:2350
object_sum_weight
signed long object_sum_weight(object *op)
Definition: object.c:572
fatal_error
fatal_error
Definition: define.h:47
find_recipe_for_tool
recipe * find_recipe_for_tool(const char *tool, recipe *from)
Definition: recipe.c:771
find_treasure_by_name
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
Definition: recipe.c:422
object_decrease_nrof
object * object_decrease_nrof(object *op, uint32_t i)
Definition: object.c:2652
object_fix_multipart
void object_fix_multipart(object *tmp)
Definition: object.c:4655
quest.state
state
Definition: quest.py:13
tick_game_time
void tick_game_time(void)
Definition: time.c:181
object_set_owner
void object_set_owner(object *op, object *owner)
Definition: object.c:844
object_find_by_tag
object * object_find_by_tag(const object *who, tag_t tag)
Definition: object.c:4031
create_archetype_by_object_name
object * create_archetype_by_object_name(const char *name)
Definition: arch.cpp:118
object_find_multi_free_spot_around
int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy)
Definition: object.c:3267
has_ability
int has_ability(const object *ob)
Definition: exp.c:153
generate_treasure
object * generate_treasure(treasurelist *t, int difficulty)
Definition: treasure.c:273
get_jail_exit
object * get_jail_exit(object *op)
Definition: region.cpp:259
dump_faces
void dump_faces(void)
Definition: image.c:162
map_find_by_flag
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
Definition: map.c:2680
ob_blocked
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
Definition: map.c:488
init_readable
void init_readable(void)
Definition: readable.c:903
check_altar_sacrifice
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
Definition: button.c:347
i18n_get_language_code
sstring i18n_get_language_code(int language)
Definition: languages.c:108
check_path
int check_path(const char *name, int prepend_dir)
Definition: map.c:202
object_copy_owner
void object_copy_owner(object *op, object *clone)
Definition: object.c:897
find_archetype
archetype * find_archetype(const char *name)
Definition: assets.cpp:284
ob_move_on
method_ret ob_move_on(object *op, object *victim, object *originator)
Definition: ob_methods.c:111
destination_dir
const char * destination_dir
Definition: gridarta-types-convert.c:32
load_image_info
void load_image_info(FILE *file, const char *filename)
add_friendly_object
void add_friendly_object(object *op)
Definition: friend.cpp:36
has_carried_lights
int has_carried_lights(const object *op)
Definition: los.c:315
set_map_reset_time
void set_map_reset_time(mapstruct *map)
Definition: map.c:2247
get_season_name
const char * get_season_name(const int index)
Definition: time.c:125
object_dump
void object_dump(const object *op, StringBuffer *sb)
Definition: object.c:649
LogLevel
LogLevel
Definition: logger.h:10
object_create_clone
object * object_create_clone(object *asrc)
Definition: object.c:3880
describe_monster
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
Definition: item.c:767
strip_endline
void strip_endline(char *buf)
Definition: utils.c:324
stringbuffer_append_printf
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Definition: stringbuffer.c:138
create_archetype
object * create_archetype(const char *name)
Definition: arch.cpp:281
dump_abilities
void dump_abilities(void)
Definition: info.c:63
oblnk
Definition: object.h:446
save_map
int save_map(mapstruct *m, int flag)
Definition: map.c:1420
ss_dump_table
char * ss_dump_table(int what, char *buf, size_t size)
Definition: shstr.c:354
get_turn_bonus
int get_turn_bonus(int stat)
Definition: living.c:2374
replace.current
current
Definition: replace.py:64
try_find_archetype
archetype * try_find_archetype(const char *name)
Definition: assets.cpp:288
try_find_animation
Animations * try_find_animation(const char *name)
Definition: assets.cpp:300
free_dialog_information
void free_dialog_information(object *op)
Definition: dialog.c:32
get_map_from_coord
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
Definition: map.c:2385
name_to_material
materialtype_t * name_to_material(const char *name)
Definition: utils.c:248
get_dam_bonus
int get_dam_bonus(int stat)
Definition: living.c:2378
remove_statbonus
void remove_statbonus(object *op)
Definition: living.c:846
object_merge
object * object_merge(object *op, object *top)
Definition: object.c:2031
init_archetype_pointers
void init_archetype_pointers(void)
Definition: treasure.c:55
BufferReader
Definition: bufferreader.c:21
use_trigger
void use_trigger(object *op)
Definition: button.c:254
get_region_from_string
region * get_region_from_string(const char *name)
Definition: region.cpp:123
time_info
void time_info(object *op)
Definition: time.c:294
stringbuffer_append_multiline_block
void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end)
Definition: stringbuffer.c:196
clean_friendly_list
void clean_friendly_list(void)
Definition: friend.cpp:84
player_set_own_title
void player_set_own_title(struct pl *pl, const char *title)
Definition: player.c:272
print_los
void print_los(object *op)
Definition: los.c:606
init_formulae
void init_formulae(BufferReader *reader, const char *filename)
Definition: recipe.c:167
link_player_skills
void link_player_skills(object *op)
Definition: player.c:287
get_readable_message_type
const readable_message_type * get_readable_message_type(object *readable)
Definition: readable.c:2096
find_dir_2
int find_dir_2(int x, int y)
Definition: object.c:3648
rndm
int rndm(int min, int max)
Definition: utils.c:162
object_find_by_name_global
object * object_find_by_name_global(const char *str)
Definition: object.c:751
ring_occidental_mages.r
r
Definition: ring_occidental_mages.py:6
remove_button_link
void remove_button_link(object *op)
Definition: button.c:693
change_map_light
int change_map_light(mapstruct *m, int change)
Definition: map.c:2009
free_arch
void free_arch(archetype *at)
Definition: arch.cpp:172
get_region_struct
region * get_region_struct(void)
Definition: region.cpp:300
object_find_free_spot
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
Definition: object.c:3530
drain_stat
void drain_stat(object *op)
Definition: living.c:717
treasureliststruct
Definition: treasure.h:82
make_sure_not_seen
void make_sure_not_seen(const object *op)
Definition: los.c:659
query_name
void query_name(const object *op, char *buf, size_t size)
Definition: item.c:585
is_valid_types_gen.type
list type
Definition: is_valid_types_gen.py:25
save_object_in_sb
void save_object_in_sb(StringBuffer *sb, object *op, const int flag)
Definition: object.c:5277
isqrt
int isqrt(int n)
Definition: utils.c:569
player_lvl_adj
void player_lvl_adj(object *who, object *op)
Definition: living.c:1819
free_all_god
void free_all_god(void)
Definition: holy.cpp:331
split_string
size_t split_string(char *str, char *array[], size_t array_size, char sep)
Definition: utils.c:483
give.name
name
Definition: give.py:27
castle_read.suffix
string suffix
Definition: castle_read.py:30
find_artifactlist
artifactlist * find_artifactlist(int type)
Definition: artifact.c:575
jump_time
void jump_time(void)
Definition: time.c:194
is_friendly
int is_friendly(const object *op)
Definition: friend.cpp:112
update_button
void update_button(object *op)
Definition: button.c:162
apply_func
method_ret(* apply_func)(object *, object *, int)
Definition: ob_methods.h:39
object_free
void object_free(object *ob, int flags)
Definition: object.c:1578
level
Definition: level.py:1
regiondef
Definition: map.h:275