Crossfire Server, Trunk
libproto.h
Go to the documentation of this file.
1 #include "bufferreader.h"
2 /* anim.cpp */
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.cpp */
12 archetype *get_archetype_by_skill_name(const char *skill, int type);
14 object *create_archetype_by_object_name(const char *name);
15 void dump_arch(archetype *at, StringBuffer *sb);
16 void dump_all_archetypes(void);
17 void free_arch(archetype *at);
19 object *arch_to_object(archetype *at);
20 object *create_singularity(const char *name);
21 object *create_archetype(const char *name);
22 archetype *try_find_archetype(const char *name);
23 archetype *find_archetype(const char *name);
24 object *object_create_arch(archetype *at);
26 void first_arch_pass(FILE *fp, const char *filename);
27 /* arch_types_valid.cpp */
28 extern int is_type_valid(uint8_t type);
29 /* artifact.cpp */
31 extern artifact *get_empty_artifact(void);
32 extern void free_all_artifacts(void);
33 extern void generate_artifact(object *op, int difficulty);
34 extern void artifact_compute_chance_for_item(const object *op, const artifact *art, int *numerator, int *denominator);
35 extern void give_artifact_abilities(object *op, const object *artifact);
36 extern int legal_artifact_combination(const object *op, const artifact *art);
37 extern void add_abilities(object *op, const object *change);
39 extern const artifact *find_artifact(const object *op, const char *name);
40 extern void dump_artifacts(void);
41 extern uint16_t artifact_get_face(const artifact *art);
42 /* button.cpp */
43 extern void trigger_connected(objectlink *ol, object *cause, const int state);
44 extern void push_button(object *op);
45 extern void update_button(object *op);
46 extern void update_buttons(mapstruct *m);
47 extern void use_trigger(object *op);
48 extern void animate_turning(object *op);
49 extern int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove);
50 extern int operate_altar(object *altar, object **sacrifice);
51 extern int check_trigger(object *op, object *cause);
52 extern void add_button_link(object *button, mapstruct *map, int connected);
53 extern void remove_button_link(object *op);
54 extern int get_button_value(const object *button);
55 extern object *check_inv_recursive(object *op, const object *trig);
56 extern void check_inv(object *op, object *trig);
57 /* dialog.cpp */
58 extern void free_dialog_information(object *op);
59 extern int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply);
60 /* exp.cpp */
61 extern int64_t new_exp(const object *ob);
62 extern int has_ability(const object *ob);
63 extern void init_experience(void);
64 extern void dump_experience(void);
65 extern void free_experience(void);
66 /* friend.cpp */
67 extern void add_friendly_object(object *op);
68 extern void remove_friendly_object(object *op);
69 extern void dump_friendly_objects(void);
70 extern void clean_friendly_list(void);
71 extern int is_friendly(const object *op);
72 extern objectlink *get_friends_of(const object *owner);
73 extern void clear_friendly_list(void);
74 extern object *get_next_friend(object *current);
75 /* glue.cpp */
76 extern void fatal(enum fatal_error err) __attribute__ ((noreturn));
77 /* holy.cpp */
78 extern void init_gods(void);
79 extern const object *get_rand_god(void);
80 extern int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen);
81 extern void free_all_god(void);
82 extern void dump_gods(void);
83 extern const object *find_god(const char *name);
84 extern const char *get_god_for_race(const char *race);
85 /* info.cpp */
86 extern void dump_abilities(void);
87 extern void print_monsters(void);
88 /* image.cpp */
89 extern int find_smooth(const Face *face, const Face **smoothed);
90 extern int is_valid_faceset(int fsn);
91 extern int get_face_fallback(int faceset, uint16_t imageno);
92 extern size_t get_faces_count(void);
93 extern const Face *get_face_by_id(uint16_t id);
94 extern int load_face_file(FILE *file, const char *full_path);
95 extern int load_png_file(FILE *file, const char *full_path);
96 extern void load_image_info(FILE *file, const char *filename);
97 extern const Face *find_face(const char *name);
98 extern const Face *try_find_face(const char *name, const Face *error);
99 extern uint8_t find_color(const char *name);
100 extern const char *get_colorname(uint8_t index);
101 extern void dump_faces(void);
102 /* init.cpp */
103 extern void init_library(void);
104 extern void init_globals(void);
105 extern void free_globals(void);
106 extern void init_objects(void);
107 extern void write_todclock(void);
108 extern void init_attackmess(BufferReader *reader, const char *filename);
109 /* item.cpp */
110 extern int get_power_from_ench(int ench);
111 extern int calc_item_power(const object *op);
112 extern const typedata *get_typedata(int itemtype);
113 extern const typedata *get_typedata_by_name(const char *name);
114 extern StringBuffer *describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf);
115 extern void query_weight(const object *op, char *buf, size_t size);
116 extern void get_levelnumber(int i, char *buf, size_t size);
117 extern void query_short_name(const object *op, char *buf, size_t size);
118 extern void query_name(const object *op, char *buf, size_t size);
119 extern void query_base_name(const object *op, int plural, char *buf, size_t size);
120 extern StringBuffer *describe_monster(const object *op, int use_media_tags, StringBuffer *buf);
121 extern StringBuffer *describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf);
122 extern int is_magical(const object *op);
123 extern int is_identifiable_type(const object *op);
124 extern int is_identified(const object *op);
125 extern void object_give_identified_properties(object *op);
126 extern object *identify(object *op);
127 /* languages.cpp */
128 extern const char *i18n(const object *who, const char *code);
129 extern language_t i18n_find_language_by_code(const char *code);
130 extern language_t i18n_get_language_by_code(const char *code);
131 extern sstring i18n_get_language_code(language_t language);
132 extern void i18n_list_languages(object *who);
133 extern void i18n_init(void);
134 extern void i18n_free(void);
135 /* links.cpp */
136 extern objectlink *get_objectlink(void);
137 extern oblinkpt *get_objectlinkpt(void);
138 extern void free_objectlink(objectlink *ol);
139 extern void free_objectlinkpt(oblinkpt *obp);
140 /* living.cpp */
141 extern void set_attr_value(living *stats, int attr, int8_t value);
142 extern void change_attr_value(living *stats, int attr, int8_t value);
143 extern int8_t get_attr_value(const living *stats, int attr);
144 extern void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat);
145 extern int change_abil(object *op, object *tmp);
146 extern void drain_stat(object *op);
147 extern void drain_specific_stat(object *op, int deplete_stats);
148 extern int remove_depletion(object *op, int level);
149 extern void change_luck(object *op, int value);
150 extern void remove_statbonus(object *op);
151 extern void add_statbonus(object *op);
152 extern void fix_object(object *op);
153 extern int allowed_class(const object *op);
154 extern void set_dragon_name(object *pl, const object *abil, const object *skin);
155 extern object *give_skill_by_name(object *op, const char *skill_name);
156 extern void player_lvl_adj(object *who, object *op);
157 extern int64_t level_exp(int level, double expmul);
158 extern int exp_level(int64_t exp);
159 extern void calc_perm_exp(object *op);
160 extern int64_t check_exp_loss(const object *op, int64_t exp);
161 extern int64_t check_exp_adjust(const object *op, int64_t exp);
162 extern void change_exp(object *op, int64_t exp, const char *skill_name, int flag);
163 extern void apply_death_exp_penalty(object *op);
164 extern int did_make_save(const object *op, int level, int bonus);
165 extern void share_exp(object *op, int64_t exp, const char *skill, int flag);
166 extern int get_cha_bonus(int stat);
167 extern int get_dex_bonus(int stat);
168 extern int get_thaco_bonus(int stat);
169 extern uint32_t get_weight_limit(int stat);
170 extern int get_learn_spell(int stat);
171 extern int get_cleric_chance(int stat);
172 extern int get_turn_bonus(int stat);
173 extern int get_dam_bonus(int stat);
174 extern float get_speed_bonus(int stat);
175 extern int get_fear_bonus(int stat);
176 extern void init_stats();
177 /* logger.cpp */
178 extern void LOG(LogLevel logLevel, const char *format, ...) PRINTF_ARGS(2, 3);
179 /* los.cpp */
180 extern void init_block(void);
181 extern void clear_los(player *pl);
182 extern int has_carried_lights(const object *op);
183 extern void update_los(object *op);
184 extern void update_all_map_los(mapstruct *map);
185 extern void update_all_los(const mapstruct *map, int x, int y);
186 extern void print_los(object *op);
187 extern void make_sure_seen(const object *op);
188 extern void make_sure_not_seen(const object *op);
189 /* map.cpp */
190 extern mapstruct *has_been_loaded(const char *name);
191 extern char *create_pathname(const char *name, char *buf, size_t size);
192 extern void create_overlay_pathname(const char *name, char *buf, size_t size);
193 extern void create_template_pathname(const char *name, char *buf, size_t size);
194 extern int check_path(const char *name, int prepend_dir);
195 extern void dump_map(const mapstruct *m);
196 extern void dump_all_maps(void);
197 extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny);
198 extern int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy);
199 extern int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y);
200 extern mapstruct *get_linked_map(void);
201 extern mapstruct *get_empty_map(int sizex, int sizey);
202 extern mapstruct *mapfile_load(const char *map, int flags);
203 extern int save_map(mapstruct *m, int flag);
204 extern void clean_object(object *op);
205 extern void free_map(mapstruct *m);
206 extern void delete_map(mapstruct *m);
207 extern mapstruct *ready_map_name(const char *name, int flags);
208 extern int calculate_difficulty(mapstruct *m);
209 extern void clean_tmp_map(mapstruct *m);
210 extern void free_all_maps(void);
211 extern int change_map_light(mapstruct *m, int change);
212 extern void update_position(mapstruct *m, int x, int y);
213 extern void set_map_reset_time(mapstruct *map);
214 extern int out_of_map(mapstruct *m, int x, int y);
215 extern mapstruct *get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y);
216 extern int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags);
217 extern int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval);
218 extern int on_same_map(const object *op1, const object *op2);
219 extern object *map_find_by_flag(mapstruct *map, int x, int y, int flag);
220 extern void map_remove_unique_files(const mapstruct *map);
221 extern const char *map_get_path(const object *item);
222 /* ob_methods.cpp */
223 extern method_ret ob_apply(object *op, object *applier, int aflags);
224 extern method_ret ob_process(object *op);
225 extern char *ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size);
226 extern method_ret ob_move_on(object *op, object *victim, object *originator);
227 extern method_ret ob_trigger(object *op, object *cause, int state);
228 /* ob_types.cpp */
229 extern void init_ob_method_struct(ob_methods *methods, ob_methods *fallback);
230 extern void init_ob_types(ob_methods *base_type);
231 extern void register_apply(int ob_type, apply_func method);
232 extern void register_process(int ob_type, process_func method);
233 extern void register_describe(int ob_type, describe_func method);
234 extern void register_move_on(int ob_type, move_on_func method);
235 extern void register_trigger(int ob_type, trigger_func method);
236 /* object.cpp */
237 extern int object_can_merge(object *ob1, object *ob2);
238 extern signed long object_sum_weight(object *op);
239 extern object *object_get_env_recursive(object *op);
240 extern object *object_get_player_container(object *op);
241 extern void object_dump(const object *op, StringBuffer *sb);
242 extern void object_dump_all(void);
243 extern object *object_find_by_tag_global(tag_t i);
244 extern object *object_find_by_name_global(const char *str);
245 extern void object_free_all_data(void);
246 extern object *object_get_owner(object *op);
247 extern void object_clear_owner(object *op);
248 extern void object_set_owner(object *op, object *owner);
249 extern void object_copy_owner(object *op, object *clone);
250 extern void object_set_enemy(object *op, object *enemy);
251 extern void object_reset(object *op);
252 extern void object_free_key_values(object *op);
253 extern void object_clear(object *op);
254 extern void object_copy_no_speed(const object *src_ob, object *dest_ob);
255 extern void object_copy(const object *src_ob, object *dest_ob);
256 extern void object_copy_with_inv(const object *src_ob, object *dest_ob, bool update_speed);
257 extern object *object_new(void);
258 extern void object_update_turn_face(object *op);
259 extern void object_update_speed(object *op);
260 extern void object_remove_from_active_list(object *op);
261 extern void object_update(object *op, int action);
262 extern void object_free_drop_inventory(object *ob);
263 extern void object_free_inventory(object *ob);
264 extern void object_free(object *ob, int flags);
265 extern int object_count_free(void);
266 extern int object_count_used(void);
267 extern int object_count_active(void);
268 extern void object_sub_weight(object *op, signed long weight);
269 extern void object_remove(object *op);
270 extern object *object_merge(object *op, object *top);
271 extern object *object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y);
272 extern void object_merge_spell(object *op, int16_t x, int16_t y);
273 extern object *object_insert_in_map(object *op, mapstruct *m, object *originator, int flag);
274 extern void object_replace_insert_in_map(const char *arch_string, object *op);
275 extern object *object_split(object *orig_ob, uint32_t nr, char *err, size_t size);
276 extern object *object_decrease_nrof(object *op, uint32_t i);
277 extern void object_add_weight(object *op, signed long weight);
278 extern object *object_insert_in_ob(object *op, object *where);
279 extern int object_check_move_on(object *op, object *originator);
280 extern object *map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at);
281 extern object *map_find_by_type(mapstruct *m, int x, int y, uint8_t type);
282 extern object *object_present_in_ob(uint8_t type, const object *op);
283 extern object *object_present_in_ob_by_name(int type, const char *str, const object *op);
284 extern object *arch_present_in_ob(const archetype *at, const object *op);
285 extern void object_set_flag_inv(object *op, int flag);
286 extern void object_unset_flag_inv(object *op, int flag);
287 extern void object_set_cheat(object *op);
288 extern int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy);
289 extern int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy);
290 extern int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop);
291 extern int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y);
292 extern void get_search_arr(int *search_arr);
293 extern int object_distance(const object *ob1, const object *ob2);
294 extern int find_dir_2(int x, int y);
295 extern int absdir(int d);
296 extern int dirdiff(int dir1, int dir2);
297 extern int can_see_monsterP(mapstruct *m, int x, int y, int dir);
298 extern int object_can_pick(const object *who, const object *item);
299 extern object *object_create_clone(object *asrc);
300 extern object *object_find_by_name(const object *who, const char *name);
301 extern object *object_find_by_type(const object *who, int type);
302 extern object *object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags);
303 extern object *object_find_by_type2(const object *who, int type1, int type2);
304 extern object *object_find_by_tag(const object *who, tag_t tag);
305 extern object *object_find_by_type_applied(const object *who, int type);
306 extern object *object_find_by_type_and_name(const object *who, int type, const char *name);
307 extern object *object_find_by_type_and_race(const object *who, int type, const char *race);
308 extern object *object_find_by_type_and_slaying(const object *who, int type, const char *slaying);
309 extern object *object_find_by_type_and_skill(const object *who, int type, const char *skill);
310 extern object *object_find_by_flag(const object *who, int flag);
311 extern object *object_find_by_flag_applied(const object *who, int flag);
312 extern object *object_find_by_arch_name(const object *who, const char *name);
313 extern object *object_find_by_type_and_arch_name(const object *who, int type, const char *name);
314 extern object *object_find_by_type_subtype(const object *who, int type, int subtype);
315 extern key_value *object_get_key_value(const object *ob, const char *key);
316 extern const char *object_get_value(const object *op, const char *const key);
317 extern bool object_value_set(const object *op, const char *const key);
318 extern bool object_value_set_shared(const object *op, sstring 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 save_object_in_sb(StringBuffer *sb, object *op, const int flag);
328 extern void object_handle_death_animation(object *op);
329 extern int object_matches_pickup_mode(const object *item, int mode);
330 /* path.cpp */
331 extern char *path_combine(const char *src, const char *dst, char *path, size_t size);
332 extern void path_normalize(char *path);
333 extern char *path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size);
334 /* porting.cpp */
335 extern FILE *tempnam_secure(const char *dir, const char *pfx, char **filename);
336 extern void remove_directory(const char *path);
337 extern int ihypot(int a, int b);
338 extern int isqrt(int n);
339 extern void make_path_to_file(const char *filename);
340 /* player.cpp */
341 extern void clear_player(player *pl);
342 extern void free_player(player *pl);
343 extern int atnr_is_dragon_enabled(int attacknr);
344 extern int is_dragon_pl(const object *op);
345 extern client_spell *get_client_spell_state(player *pl, object *spell);
346 extern int is_wraith_pl(object *op);
347 extern int is_old_wraith_pl(object *op);
348 extern void player_set_dragon_title(struct player *pl, int level, const char *attack, int skin_resist);
349 extern void player_get_title(const struct player *pl, char *buf, size_t bufsize);
350 extern int player_has_own_title(const struct player *pl);
351 extern const char *player_get_own_title(const struct player *pl);
352 extern void player_set_own_title(struct player *pl, const char *title);
353 extern void link_player_skills(object *op);
354 /* re-cmp.cpp */
355 extern const char *re_cmp(const char *str, const char *regexp);
356 /* readable.cpp */
357 extern int nstrtok(const char *buf1, const char *buf2);
358 extern char *strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size);
359 extern int book_overflow(const char *buf1, const char *buf2, size_t booksize);
360 extern void init_readable(void);
361 extern object *get_random_mon(int level);
362 extern void tailor_readable_ob(object *book, int msg_type);
363 extern void free_all_readable(void);
364 extern void write_book_archive(void);
365 extern const readable_message_type *get_readable_message_type(object *readable);
366 extern const GeneralMessage *get_message_from_identifier(const char *identifier);
369 extern const Face *get_message_face(const GeneralMessage *message);
370 extern void init_msgfile(FILE *file, const char *filename);
371 /* recipe.cpp */
372 extern recipelist *get_formulalist(int i);
373 extern void init_formulae(BufferReader *reader, const char *filename);
374 extern void dump_alchemy(void);
375 extern archetype *find_treasure_by_name(const treasure *t, const char *name, int depth);
376 extern void dump_alchemy_costs(void);
377 extern int strtoint(const char *buf);
378 extern const artifact *locate_recipe_artifact(const recipe *rp, size_t idx);
379 extern recipe *get_random_recipe(recipelist *rpl);
380 extern void free_all_recipes(void);
381 extern recipe *find_recipe_for_tool(const char *tool, recipe *from);
382 extern bool check_formulae(void);
383 extern const Face *recipe_get_face(const recipe *rp);
384 extern bool check_recipes();
385 extern const char *recipe_get_difficulty_string(int difficulty);
386 /* region.cpp */
387 extern region *get_region_by_name(const char *region_name);
389 extern const char *get_name_of_region_for_map(const mapstruct *m);
390 extern region *get_region_from_string(const char *name);
391 extern int region_is_child_of_region(const region *child, const region *r);
392 extern const char *get_region_longname(const region *r);
393 extern const char *get_region_msg(const region *r);
394 extern object *get_jail_exit(object *op);
395 extern void init_regions(BufferReader *reader, const char *filename);
396 extern region *get_region_struct(void);
397 /* stringbuffer.cpp */
398 extern StringBuffer *stringbuffer_new(void);
399 extern void stringbuffer_delete(StringBuffer *sb);
400 extern char *stringbuffer_finish(StringBuffer *sb);
402 extern void stringbuffer_append_string(StringBuffer *sb, const char *str);
403 extern void stringbuffer_append_printf(StringBuffer *sb, const char *format, ...);
404 extern void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2);
405 extern void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end);
406 extern size_t stringbuffer_length(StringBuffer *sb);
407 /* time.cpp */
408 extern const char *get_periodofday(const int index);
409 extern const char *get_month_name(const int index);
410 extern const char *get_weekday(const int index);
411 extern const char *get_season_name(const int index);
412 extern void reset_sleep(void);
413 extern long usec_elapsed(struct timespec first, struct timespec second);
414 extern void tick_game_time(void);
415 extern long get_sleep_remaining(void);
416 extern void jump_time(void);
417 extern void set_tick_duration(long t);
418 extern void get_tod(timeofday_t *tod);
419 extern void time_info(object *op);
420 extern long seconds(void);
421 extern const char *time_format_time(const timeofday_t *tod, char *buf, size_t bufsize);
422 extern long timespec_diff(struct timespec *end, struct timespec *start);
423 extern unsigned int tick_length(float seconds);
424 /* treasure.cpp */
425 extern void init_archetype_pointers(void);
426 extern void load_treasures(void);
427 extern treasurelist *find_treasurelist(const char *name);
428 extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries);
429 extern object *generate_treasure(treasurelist *t, int difficulty);
430 extern void set_abs_magic(object *op, int magic);
431 extern void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags);
432 extern void dump_monster_treasure(const char *name);
433 extern treasure *get_empty_treasure();
434 extern void treasure_free(treasure *t);
435 extern treasure *treasure_insert(treasurelist *list, int position);
436 extern void treasure_remove_item(treasurelist *list, int position);
437 /* utils.cpp */
438 extern int random_roll(int min, int max, const object *op, int goodbad);
439 extern int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad);
440 extern int die_roll(int num, int size, const object *op, int goodbad);
441 extern int rndm(int min, int max);
442 extern void decay_objects(mapstruct *m);
443 extern materialtype_t *name_to_material(const char *name);
444 extern void transmute_materialname(object *op, const object *change);
445 extern void set_materialname(object *op);
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 extern void free_charlinks(linked_char *lc);
457 /* loader.cpp */
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, bool artifact_init);
472 extern int load_object_from_reader(BufferReader *reader, object *op, int map_flags, bool arch_init, bool artifact_init);
473 extern int set_variable(object *op, const char *buf);
474 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.cpp:3412
Face
Definition: face.h:14
clear_friendly_list
void clear_friendly_list(void)
Definition: friend.cpp:134
path_normalize
void path_normalize(char *path)
Definition: path.cpp:85
check_recipes
bool check_recipes()
Definition: recipe.cpp:147
share_exp
void share_exp(object *op, int64_t exp, const char *skill, int flag)
Definition: living.cpp:2319
object_remove_from_active_list
void object_remove_from_active_list(object *op)
Definition: object.cpp:1392
yyset_out
void yyset_out(FILE *out_str)
Definition: loader.cpp:38756
object_split
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
Definition: object.cpp:2637
get_formulalist
recipelist * get_formulalist(int i)
Definition: recipe.cpp:98
get_dex_bonus
int get_dex_bonus(int stat)
Definition: living.cpp:2361
object_unset_flag_inv
void object_unset_flag_inv(object *op, int flag)
Definition: object.cpp:3256
get_periodofday
const char * get_periodofday(const int index)
Definition: time.cpp:106
object_add_weight
void object_add_weight(object *op, signed long weight)
Definition: object.cpp:2833
clear_los
void clear_los(player *pl)
Definition: los.cpp:270
get_empty_map
mapstruct * get_empty_map(int sizex, int sizey)
Definition: map.cpp:842
object_find_first_free_spot
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
Definition: object.cpp:3599
ob_process
method_ret ob_process(object *op)
Definition: ob_methods.cpp:67
object_find_by_flag_applied
object * object_find_by_flag_applied(const object *who, int flag)
Definition: object.cpp:4229
query_short_name
void query_short_name(const object *op, char *buf, size_t size)
Definition: item.cpp:513
GeneralMessage
Definition: book.h:44
dirdiff
int dirdiff(int dir1, int dir2)
Definition: object.cpp:3732
tick_length
unsigned int tick_length(float seconds)
Definition: time.cpp:382
stringbuffer_new
StringBuffer * stringbuffer_new(void)
Definition: stringbuffer.cpp:57
object_set_value
int object_set_value(object *op, const char *key, const char *value, int add_key)
Definition: object.cpp:4499
object_value_set_shared
bool object_value_set_shared(const object *op, sstring key)
Definition: object.cpp:4390
register_describe
void register_describe(int ob_type, describe_func method)
Definition: ob_types.cpp:80
try_find_face
const Face * try_find_face(const char *name, const Face *error)
Definition: assets.cpp:286
fix_object
void fix_object(object *op)
Definition: living.cpp:1132
tailor_readable_ob
void tailor_readable_ob(object *book, int msg_type)
Definition: readable.cpp:1892
yyfree
void yyfree(void *ptr)
Definition: loader.cpp:38872
object_can_pick
int object_can_pick(const object *who, const object *item)
Definition: object.cpp:3867
free_player
void free_player(player *pl)
Definition: player.cpp:68
player_get_own_title
const char * player_get_own_title(const struct player *pl)
Definition: player.cpp:260
player_has_own_title
int player_has_own_title(const struct player *pl)
Definition: player.cpp:247
free_objectlinkpt
void free_objectlinkpt(oblinkpt *obp)
Definition: links.cpp:79
language_t
void * language_t
Definition: global.h:67
tempnam_secure
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
Definition: porting.cpp:71
client_spell
Definition: player.h:87
get_region_longname
const char * get_region_longname(const region *r)
Definition: region.cpp:210
write_todclock
void write_todclock(void)
Definition: init.cpp:519
transmute_materialname
void transmute_materialname(object *op, const object *change)
Definition: utils.cpp:263
player
Definition: player.h:105
calculate_difficulty
int calculate_difficulty(mapstruct *m)
Definition: map.cpp:1896
trigger_func
method_ret(* trigger_func)(object *, object *, int)
Definition: ob_methods.h:34
diamondslots.x
x
Definition: diamondslots.py:15
create_template_pathname
void create_template_pathname(const char *name, char *buf, size_t size)
Definition: map.cpp:145
get_dialog_message
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
Definition: dialog.cpp:213
init_msgfile
void init_msgfile(FILE *file, const char *filename)
find_face
const Face * find_face(const char *name)
Definition: assets.cpp:282
free_experience
void free_experience(void)
Definition: exp.cpp:263
blocked_link
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
Definition: map.cpp:344
query_base_name
void query_base_name(const object *op, int plural, char *buf, size_t size)
Definition: item.cpp:689
seconds
long seconds(void)
Definition: time.cpp:348
init_attackmess
void init_attackmess(BufferReader *reader, const char *filename)
Definition: init.cpp:572
object_find_by_type_applied
object * object_find_by_type_applied(const object *who, int type)
Definition: object.cpp:4083
i18n
const char * i18n(const object *who, const char *code)
Definition: languages.cpp:42
dump_arch
void dump_arch(archetype *at, StringBuffer *sb)
Definition: arch.cpp:141
object_find_by_type
object * object_find_by_type(const object *who, int type)
Definition: object.cpp:3980
animate_turning
void animate_turning(object *op)
Definition: button.cpp:270
get_face_by_id
const Face * get_face_by_id(uint16_t id)
Definition: assets.cpp:315
ready_map_name
mapstruct * ready_map_name(const char *name, int flags)
Definition: map.cpp:1768
path_combine
char * path_combine(const char *src, const char *dst, char *path, size_t size)
Definition: path.cpp:51
dump_experience
void dump_experience(void)
Definition: exp.cpp:251
describe_attacktype
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
Definition: utils.cpp:538
is_type_valid
int is_type_valid(uint8_t type)
Definition: arch_types_valid.cpp:17
nstrtok
int nstrtok(const char *buf1, const char *buf2)
Definition: readable.cpp:642
object_count_free
int object_count_free(void)
Definition: object.cpp:1751
get_faces_count
size_t get_faces_count(void)
Definition: assets.cpp:293
arch_present_in_ob
object * arch_present_in_ob(const archetype *at, const object *op)
Definition: object.cpp:3222
disinfect.a
a
Definition: disinfect.py:13
init_regions
void init_regions(BufferReader *reader, const char *filename)
Definition: region.cpp:311
object_can_merge
int object_can_merge(object *ob1, object *ob2)
Definition: object.cpp:433
make_sure_seen
void make_sure_seen(const object *op)
Definition: los.cpp:695
player_get_title
void player_get_title(const struct player *pl, char *buf, size_t bufsize)
find_god
const object * find_god(const char *name)
Definition: holy.cpp:317
object_replace_insert_in_map
void object_replace_insert_in_map(const char *arch_string, object *op)
Definition: object.cpp:2597
get_speed_bonus
float get_speed_bonus(int stat)
Definition: living.cpp:2389
i18n_get_language_by_code
language_t i18n_get_language_by_code(const char *code)
Definition: languages.cpp:73
object_update_speed
void object_update_speed(object *op)
Definition: object.cpp:1349
PRINTF_ARGS
#define PRINTF_ARGS(x, y)
Definition: global.h:44
out_of_map
int out_of_map(mapstruct *m, int x, int y)
Definition: map.cpp:2293
object_matches_string
int object_matches_string(object *pl, object *op, const char *name)
Definition: object.cpp:4574
object_dump_all
void object_dump_all(void)
Definition: object.cpp:704
query_weight
void query_weight(const object *op, char *buf, size_t size)
Definition: item.cpp:415
describe_spellpath_attenuation
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
Definition: utils.cpp:507
guildoracle.list
list
Definition: guildoracle.py:87
init_library
void init_library(void)
Definition: init.cpp:324
key_value
Definition: object.h:42
is_identified
int is_identified(const object *op)
Definition: item.cpp:1348
get_randomized_dir
int get_randomized_dir(int dir)
Definition: utils.cpp:412
set_tick_duration
void set_tick_duration(long t)
Definition: time.cpp:209
guildjoin.ob
ob
Definition: guildjoin.py:42
timeofday_t
Definition: tod.h:38
recipe_get_difficulty_string
const char * recipe_get_difficulty_string(int difficulty)
Definition: recipe.cpp:962
say.reply
string reply
Definition: say.py:77
treasure_free
void treasure_free(treasure *t)
Definition: treasure.cpp:1407
clear_player
void clear_player(player *pl)
Definition: player.cpp:33
level_exp
int64_t level_exp(int level, double expmul)
Definition: living.cpp:1881
process_func
method_ret(* process_func)(object *)
Definition: ob_methods.h:31
remove_depletion
int remove_depletion(object *op, int level)
Definition: living.cpp:755
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.cpp:782
drain_specific_stat
void drain_specific_stat(object *op, int deplete_stats)
Definition: living.cpp:728
load_object_from_reader
int load_object_from_reader(BufferReader *reader, object *op, int map_flags, bool arch_init, bool artifact_init)
Definition: loader.cpp:38996
get_rangevector_from_mapcoord
int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval)
Definition: map.cpp:2560
yyget_out
FILE * yyget_out(void)
Definition: loader.cpp:38713
apply_death_exp_penalty
void apply_death_exp_penalty(object *op)
Definition: living.cpp:2240
get_button_value
int get_button_value(const object *button)
Definition: button.cpp:749
get_search_arr
void get_search_arr(int *search_arr)
Definition: object.cpp:3642
calc_item_power
int calc_item_power(const object *op)
Definition: item.cpp:235
flags
static const flag_definition flags[]
Definition: gridarta-types-convert.cpp:101
find_archetype_by_object_type_name
archetype * find_archetype_by_object_type_name(int type, const char *name)
Definition: arch.cpp:66
fix_generated_item
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
Definition: treasure.cpp:909
object_find_by_flag
object * object_find_by_flag(const object *who, int flag)
Definition: object.cpp:4206
give.top
def top
Definition: give.py:42
make_list_like
void make_list_like(char *input)
Definition: utils.cpp:368
find_treasurelist
treasurelist * find_treasurelist(const char *name)
Definition: assets.cpp:249
object_update
void object_update(object *op, int action)
Definition: object.cpp:1434
check_inv
void check_inv(object *op, object *trig)
Definition: button.cpp:825
Ice.tmp
int tmp
Definition: Ice.py:207
get_random_mon
object * get_random_mon(int level)
Definition: readable.cpp:1269
treasure_remove_item
void treasure_remove_item(treasurelist *list, int position)
Definition: treasure.cpp:1451
object_free_all_data
void object_free_all_data(void)
Definition: object.cpp:767
describe_resistance
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
Definition: item.cpp:372
free_all_maps
void free_all_maps(void)
Definition: map.cpp:1962
get_archetype_by_type_subtype
archetype * get_archetype_by_type_subtype(int type, int subtype)
Definition: arch.cpp:99
usec_elapsed
long usec_elapsed(struct timespec first, struct timespec second)
Definition: cfanim.cpp:1149
oblinkpt
Definition: object.h:469
object_give_identified_properties
void object_give_identified_properties(object *op)
Definition: item.cpp:1356
add_statbonus
void add_statbonus(object *op)
Definition: living.cpp:868
set_materialname
void set_materialname(object *op)
Definition: utils.cpp:297
adjust_dir
int adjust_dir(int dir, int destination_dir)
Definition: utils.cpp:426
object_check_move_on
int object_check_move_on(object *op, object *originator)
Definition: object.cpp:3012
yyset_in
void yyset_in(FILE *in_str)
Definition: loader.cpp:38751
load_object
int load_object(FILE *fp, object *op, int bufstate, int map_flags, bool artifact_init)
Definition: loader.cpp:38944
init_objects
void init_objects(void)
Definition: object.cpp:327
get_client_spell_state
client_spell * get_client_spell_state(player *pl, object *spell)
Definition: player.cpp:144
booksize
size_t booksize
Definition: readable.cpp:1564
find_artifact
const artifact * find_artifact(const object *op, const char *name)
Definition: artifact.cpp:589
npc_dialog.filename
filename
Definition: npc_dialog.py:99
is_wraith_pl
int is_wraith_pl(object *op)
Definition: player.cpp:173
init_block
void void init_block(void)
Definition: los.cpp:106
free_all_recipes
void free_all_recipes(void)
Definition: recipe.cpp:811
create_treasure
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
Definition: treasure.cpp:263
free_objectlink
void free_objectlink(objectlink *ol)
Definition: links.cpp:67
decay_objects
void decay_objects(mapstruct *m)
Definition: utils.cpp:175
generate_artifact
void generate_artifact(object *op, int difficulty)
Definition: artifact.cpp:177
make_path_to_file
void make_path_to_file(const char *filename)
Definition: porting.cpp:164
object_get_value
const char * object_get_value(const object *op, const char *const key)
Definition: object.cpp:4346
create_overlay_pathname
void create_overlay_pathname(const char *name, char *buf, size_t size)
Definition: map.cpp:125
stringbuffer_finish_shared
sstring stringbuffer_finish_shared(StringBuffer *sb)
Definition: stringbuffer.cpp:85
push.connected
connected
Definition: push.py:59
get_rand_god
const object * get_rand_god(void)
Definition: holy.cpp:73
buf
StringBuffer * buf
Definition: readable.cpp:1565
free_charlinks
void free_charlinks(linked_char *lc)
Definition: utils.cpp:616
update_all_los
void update_all_los(const mapstruct *map, int x, int y)
Definition: los.cpp:595
free_globals
void free_globals(void)
Definition: init.cpp:440
yyset_lineno
void yyset_lineno(int line_number)
Definition: loader.cpp:38739
clean_tmp_map
void clean_tmp_map(mapstruct *m)
Definition: map.cpp:1953
object_free_drop_inventory
void object_free_drop_inventory(object *ob)
Definition: object.cpp:1560
object_find_by_type2
object * object_find_by_type2(const object *who, int type1, int type2)
Definition: object.cpp:4037
free_loader
void free_loader(void)
Definition: loader.cpp:39074
get_colorname
const char * get_colorname(uint8_t index)
Definition: image.cpp:86
get_typedata_by_name
const typedata * get_typedata_by_name(const char *name)
Definition: item.cpp:343
linked_char
Definition: global.h:96
ob_trigger
method_ret ob_trigger(object *op, object *cause, int state)
Definition: ob_methods.cpp:133
exp_level
int exp_level(int64_t exp)
Definition: living.cpp:1893
get_weight_limit
uint32_t get_weight_limit(int stat)
Definition: living.cpp:2369
get_rangevector
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
Definition: map.cpp:2492
re_cmp
const char * re_cmp(const char *str, const char *regexp)
Definition: re-cmp.cpp:68
get_message_body
sstring get_message_body(const GeneralMessage *message)
Definition: readable.cpp:2077
get_name_of_region_for_map
const char * get_name_of_region_for_map(const mapstruct *m)
Definition: region.cpp:90
find_color
uint8_t find_color(const char *name)
Definition: image.cpp:75
yyset_debug
void yyset_debug(int bdebug)
Definition: loader.cpp:38766
update_all_map_los
void update_all_map_los(mapstruct *map)
Definition: los.cpp:567
set_dragon_name
void set_dragon_name(object *pl, const object *abil, const object *skin)
Definition: living.cpp:1684
typedata
Definition: define.h:89
has_been_loaded
mapstruct * has_been_loaded(const char *name)
Definition: map.cpp:79
m
static event_registration m
Definition: citylife.cpp:425
new_exp
int64_t new_exp(const object *ob)
Definition: exp.cpp:100
autojail.who
who
Definition: autojail.py:3
describe_god
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
Definition: holy.cpp:109
find_smooth
int find_smooth(const Face *face, const Face **smoothed)
Definition: image.cpp:102
is_valid_faceset
int is_valid_faceset(int fsn)
Definition: image.cpp:117
can_see_monsterP
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
Definition: object.cpp:3822
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.cpp:2175
object_get_multi_size
void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy)
Definition: object.cpp:4744
check_formulae
bool check_formulae(void)
Definition: recipe.cpp:292
create_singularity
object * create_singularity(const char *name)
Definition: arch.cpp:255
disinfect.map
map
Definition: disinfect.py:4
object_count_active
int object_count_active(void)
Definition: object.cpp:1783
update_los
void update_los(object *op)
Definition: los.cpp:509
find_animation
Animations * find_animation(const char *name)
Definition: assets.cpp:274
allowed_class
int allowed_class(const object *op)
Definition: living.cpp:1657
yyget_debug
int yyget_debug(void)
Definition: loader.cpp:38761
absdir
int absdir(int d)
Definition: object.cpp:3714
init_gods
void init_gods(void)
Definition: holy.cpp:59
recipelist
Definition: recipe.h:37
add_button_link
void add_button_link(object *button, mapstruct *map, int connected)
Definition: button.cpp:656
rotate-tower.result
bool result
Definition: rotate-tower.py:13
get_empty_artifactlist
artifactlist * get_empty_artifactlist(void)
Definition: artifact.cpp:37
object_clear_owner
void object_clear_owner(object *op)
Definition: object.cpp:823
check_stat_bounds
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
Definition: living.cpp:354
get_empty_artifact
artifact * get_empty_artifact(void)
Definition: artifact.cpp:55
describe_func
void(* describe_func)(const object *, const object *, int use_media_tags, char *buf, size_t size)
Definition: ob_methods.h:32
update_buttons
void update_buttons(mapstruct *m)
Definition: button.cpp:227
object_remove
void object_remove(object *op)
Definition: object.cpp:1833
register_trigger
void register_trigger(int ob_type, trigger_func method)
Definition: ob_types.cpp:98
object_find_by_tag_global
object * object_find_by_tag_global(tag_t i)
Definition: object.cpp:727
die_roll
int die_roll(int num, int size, const object *op, int goodbad)
Definition: utils.cpp:122
object_count_used
int object_count_used(void)
Definition: object.cpp:1767
region_is_child_of_region
int region_is_child_of_region(const region *child, const region *r)
Definition: region.cpp:183
treasurelist
Definition: treasure.h:85
object_find_by_name
object * object_find_by_name(const object *who, const char *name)
Definition: object.cpp:3956
get_message_from_identifier
const GeneralMessage * get_message_from_identifier(const char *identifier)
Definition: assets.cpp:324
object_get_player_container
object * object_get_player_container(object *op)
Definition: object.cpp:607
object_merge_spell
void object_merge_spell(object *op, int16_t x, int16_t y)
Definition: object.cpp:2129
get_region_msg
const char * get_region_msg(const region *r)
Definition: region.cpp:231
sword_of_souls.victim
victim
Definition: sword_of_souls.py:12
treasure_insert
treasure * treasure_insert(treasurelist *list, int position)
Definition: treasure.cpp:1428
artifact_get_face
uint16_t artifact_get_face(const artifact *art)
Definition: artifact.cpp:638
arch_to_object
object * arch_to_object(archetype *at)
Definition: arch.cpp:229
load_face_file
int load_face_file(FILE *file, const char *full_path)
yypop_buffer_state
void yypop_buffer_state(void)
Definition: loader.cpp:38483
ob_methods
Definition: ob_methods.h:43
dump_alchemy
void dump_alchemy(void)
Definition: recipe.cpp:350
make_face_from_files.str
str
Definition: make_face_from_files.py:30
legal_artifact_combination
int legal_artifact_combination(const object *op, const artifact *art)
Definition: artifact.cpp:252
get_next_friend
object * get_next_friend(object *current)
Definition: friend.cpp:143
python_init.path
path
Definition: python_init.py:8
get_objectlinkpt
oblinkpt * get_objectlinkpt(void)
Definition: links.cpp:51
give_artifact_abilities
void give_artifact_abilities(object *op, const object *artifact)
Definition: artifact.cpp:230
convert.action
action
Definition: convert.py:25
get_face_fallback
int get_face_fallback(int faceset, uint16_t imageno)
Definition: image.cpp:133
print_monsters
void print_monsters(void)
Definition: info.cpp:100
dump_artifacts
void dump_artifacts(void)
Definition: artifact.cpp:614
ob_describe
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
Definition: ob_methods.cpp:91
navar-midane_pickup.msg
list msg
Definition: navar-midane_pickup.py:13
dump_animations
void dump_animations(void)
Definition: anim.cpp:180
struct_dialog_reply
Definition: dialog.h:16
object_insert_in_map
object * object_insert_in_map(object *op, mapstruct *m, object *originator, int flag)
Definition: object.cpp:2361
free_map
void free_map(mapstruct *m)
Definition: map.cpp:1650
get_learn_spell
int get_learn_spell(int stat)
Definition: living.cpp:2373
init_ob_types
void init_ob_types(ob_methods *base_type)
Definition: ob_types.cpp:49
Ice.b
b
Definition: Ice.py:48
get_random_recipe
recipe * get_random_recipe(recipelist *rpl)
Definition: recipe.cpp:787
create_pathname
char * create_pathname(const char *name, char *buf, size_t size)
Definition: map.cpp:104
free_all_readable
void free_all_readable(void)
Definition: readable.cpp:1974
is_identifiable_type
int is_identifiable_type(const object *op)
Definition: item.cpp:1324
stringbuffer_length
size_t stringbuffer_length(StringBuffer *sb)
Definition: stringbuffer.cpp:218
get_month_name
const char * get_month_name(const int index)
Definition: time.cpp:113
change_luck
void change_luck(object *op, int value)
Definition: living.cpp:796
get_archetype_by_skill_name
archetype * get_archetype_by_skill_name(const char *skill, int type)
Definition: arch.cpp:80
object_insert_in_ob
object * object_insert_in_ob(object *op, object *where)
Definition: object.cpp:2857
CFweardisguise.tag
tag
Definition: CFweardisguise.py:25
init_stats
void init_stats()
Definition: living.cpp:2591
get_attr_value
int8_t get_attr_value(const living *stats, int attr)
Definition: living.cpp:313
strtoint
int strtoint(const char *buf)
Definition: recipe.cpp:709
object_distance
int object_distance(const object *ob1, const object *ob2)
Definition: object.cpp:3661
find_archetype_by_object_name
archetype * find_archetype_by_object_name(const char *name)
Definition: arch.cpp:53
i18n_find_language_by_code
language_t i18n_find_language_by_code(const char *code)
Definition: languages.cpp:59
title
Definition: readable.cpp:108
artifactlist
Definition: artifact.h:24
time_format_time
const char * time_format_time(const timeofday_t *tod, char *buf, size_t bufsize)
Definition: time.cpp:369
add_abilities
void add_abilities(object *op, const object *change)
Definition: artifact.cpp:320
bufferreader.h
apply_anim_suffix
void apply_anim_suffix(object *who, const char *suffix)
Definition: anim.cpp:150
object_copy_with_inv
void object_copy_with_inv(const object *src_ob, object *dest_ob, bool update_speed)
Definition: object.cpp:1208
object_free_inventory
void object_free_inventory(object *ob)
Definition: object.cpp:1568
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.cpp:4252
tag_t
uint32_t tag_t
Definition: object.h:14
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
archetype
Definition: object.h:483
save_object
int save_object(FILE *fp, object *op, int flag)
Definition: object.cpp:5397
is_old_wraith_pl
int is_old_wraith_pl(object *op)
Definition: player.cpp:185
yylex_destroy
int yylex_destroy(void)
Definition: loader.cpp:38804
init_globals
void init_globals(void)
Definition: init.cpp:396
fatal
void fatal(enum fatal_error err) __attribute__((noreturn))
Definition: utils.cpp:590
timespec_diff
long timespec_diff(struct timespec *end, struct timespec *start)
Definition: time.cpp:166
locate_recipe_artifact
const artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
Definition: recipe.cpp:730
dump_map
void dump_map(const mapstruct *m)
Definition: map.cpp:245
get_archetype_struct
archetype * get_archetype_struct(void)
Definition: arch.cpp:195
object_set_flag_inv
void object_set_flag_inv(object *op, int flag)
Definition: object.cpp:3239
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.cpp:4277
object_new
object * object_new(void)
Definition: object.cpp:1273
replace
Definition: replace.py:1
stringbuffer_finish
char * stringbuffer_finish(StringBuffer *sb)
Definition: stringbuffer.cpp:76
yyget_lineno
int yyget_lineno(void)
Definition: loader.cpp:38696
object_reset
void object_reset(object *op)
Definition: object.cpp:934
get_linked_map
mapstruct * get_linked_map(void)
Definition: map.cpp:776
face_sets::fallback
struct face_sets * fallback
Definition: image.h:21
living
Definition: living.h:35
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.cpp:4791
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.cpp:4321
guild_entry.text
text
Definition: guild_entry.py:41
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.cpp:77
get_tod
void get_tod(timeofday_t *tod)
Definition: time.cpp:219
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.cpp:300
get_power_from_ench
int get_power_from_ench(int ench)
Definition: item.cpp:212
update_position
void update_position(mapstruct *m, int x, int y)
Definition: map.cpp:2118
write_book_archive
void write_book_archive(void)
Definition: readable.cpp:2005
change_attr_value
void change_attr_value(living *stats, int attr, int8_t value)
Definition: living.cpp:264
get_message_face
const Face * get_message_face(const GeneralMessage *message)
Definition: readable.cpp:2086
describe_item
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
Definition: item.cpp:951
move_on_func
method_ret(* move_on_func)(object *, object *, object *)
Definition: ob_methods.h:33
map_remove_unique_files
void map_remove_unique_files(const mapstruct *map)
Definition: map.cpp:2638
dump_gods
void dump_gods(void)
Definition: holy.cpp:367
object_find_by_type_and_race
object * object_find_by_type_and_race(const object *who, int type, const char *race)
Definition: object.cpp:4133
animate_object
void animate_object(object *op, int dir)
Definition: anim.cpp:44
init_experience
void init_experience(void)
Definition: exp.cpp:167
remove_directory
void remove_directory(const char *path)
Definition: porting.cpp:117
strtoktolin
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
Definition: readable.cpp:684
dump_all_archetypes
void dump_all_archetypes(void)
Definition: arch.cpp:150
get_thaco_bonus
int get_thaco_bonus(int stat)
Definition: living.cpp:2365
yyrestart
void yyrestart(FILE *input_file)
Definition: loader.cpp:38287
StringBuffer
Definition: stringbuffer.cpp:25
map_get_path
const char * map_get_path(const object *item)
Definition: map.cpp:2663
stringbuffer_delete
void stringbuffer_delete(StringBuffer *sb)
Definition: stringbuffer.cpp:71
guildbuy.ob2
ob2
Definition: guildbuy.py:23
mapfile_load
mapstruct * mapfile_load(const char *map, int flags)
Definition: map.cpp:1216
recipe
Definition: recipe.h:10
dump_monster_treasure
void dump_monster_treasure(const char *name)
Definition: treasure.cpp:1250
object_handle_death_animation
void object_handle_death_animation(object *op)
Definition: object.cpp:5410
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.cpp:2100
dump_alchemy_costs
void dump_alchemy_costs(void)
Definition: recipe.cpp:588
method_ret
char method_ret
Definition: ob_methods.h:14
get_friends_of
objectlink * get_friends_of(const object *owner)
Definition: friend.cpp:117
region
Definition: map.h:272
object_get_owner
object * object_get_owner(object *op)
Definition: object.cpp:804
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.cpp:39047
get_next_archetype
archetype * get_next_archetype(archetype *current)
Definition: assets.cpp:262
object_present_in_ob_by_name
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
Definition: object.cpp:3203
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.cpp:618
check_exp_adjust
int64_t check_exp_adjust(const object *op, int64_t exp)
Definition: living.cpp:2098
object_value_set
bool object_value_set(const object *op, const char *const key)
Definition: object.cpp:4376
roll-o-matic.stop
def stop()
Definition: roll-o-matic.py:78
guildbuy.ob1
ob1
Definition: guildbuy.py:22
struct_dialog_message
Definition: dialog.h:26
base_type
static ob_methods base_type
Definition: ob_methods.cpp:27
object_set_enemy
void object_set_enemy(object *op, object *enemy)
Definition: object.cpp:915
replace_unprintable_chars
void replace_unprintable_chars(char *buf)
Definition: utils.cpp:447
object_find_by_type_subtype
object * object_find_by_type_subtype(const object *who, int type, int subtype)
Definition: object.cpp:4301
calc_perm_exp
void calc_perm_exp(object *op)
Definition: living.cpp:1910
is_magical
int is_magical(const object *op)
Definition: item.cpp:1227
get_empty_treasure
treasure * get_empty_treasure()
Definition: treasure.cpp:1386
object_create_arch
object * object_create_arch(archetype *at)
Definition: arch.cpp:298
get_random_dir
int get_random_dir(void)
Definition: utils.cpp:400
did_make_save
int did_make_save(const object *op, int level, int bonus)
Definition: living.cpp:2289
object_clear
void object_clear(object *op)
Definition: object.cpp:983
push_button
void push_button(object *op)
Definition: button.cpp:149
get_weekday
const char * get_weekday(const int index)
Definition: time.cpp:120
i18n_init
void i18n_init(void)
Definition: languages.cpp:130
item
Definition: item.py:1
get_sleep_remaining
long get_sleep_remaining(void)
Definition: time.cpp:189
ob_apply
method_ret ob_apply(object *op, object *applier, int aflags)
Definition: ob_methods.cpp:44
give_skill_by_name
object * give_skill_by_name(object *op, const char *skill_name)
Definition: living.cpp:1784
mapstruct
Definition: map.h:313
trigger_connected
void trigger_connected(objectlink *ol, object *cause, const int state)
Definition: button.cpp:41
object_get_env_recursive
object * object_get_env_recursive(object *op)
Definition: object.cpp:590
map_find_by_archetype
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
Definition: object.cpp:3118
atnr_is_dragon_enabled
int atnr_is_dragon_enabled(int attacknr)
Definition: player.cpp:103
object_free_key_values
void object_free_key_values(object *op)
Definition: object.cpp:954
sstring
const typedef char * sstring
Definition: sstring.h:2
get_god_for_race
const char * get_god_for_race(const char *race)
Definition: holy.cpp:90
get_fear_bonus
int get_fear_bonus(int stat)
Definition: living.cpp:2393
give.op
op
Definition: give.py:33
get_ob_diff
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
Definition: object.cpp:4986
get_region_by_map
region * get_region_by_map(mapstruct *m)
Definition: region.cpp:72
Animations
Definition: face.h:25
autojail.value
value
Definition: autojail.py:6
LOG
void LOG(LogLevel logLevel, const char *format,...) PRINTF_ARGS(2
register_move_on
void register_move_on(int ob_type, move_on_func method)
Definition: ob_types.cpp:89
is_dragon_pl
int is_dragon_pl(const object *op)
Definition: player.cpp:122
object_update_turn_face
void object_update_turn_face(object *op)
Definition: object.cpp:1332
change_abil
int change_abil(object *op, object *tmp)
Definition: living.cpp:394
recipe_get_face
const Face * recipe_get_face(const recipe *rp)
Definition: recipe.cpp:920
on_same_map
int on_same_map(const object *op1, const object *op2)
Definition: map.cpp:2598
remove_friendly_object
void remove_friendly_object(object *op)
Definition: friend.cpp:52
rv_vector
Definition: map.h:368
artifact_compute_chance_for_item
void artifact_compute_chance_for_item(const object *op, const artifact *art, int *numerator, int *denominator)
Definition: artifact.cpp:133
get_typedata
const typedata * get_typedata(int itemtype)
Definition: item.cpp:323
clean_object
void clean_object(object *op)
Definition: map.cpp:1587
yyget_text
char * yyget_text(void)
Definition: loader.cpp:38730
object_present_in_ob
object * object_present_in_ob(uint8_t type, const object *op)
Definition: object.cpp:3168
yyget_in
FILE * yyget_in(void)
Definition: loader.cpp:38705
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.cpp:4004
diamondslots.y
y
Definition: diamondslots.py:16
reset_sleep
void reset_sleep(void)
Definition: time.cpp:134
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.cpp:463
register_process
void register_process(int ob_type, process_func method)
Definition: ob_types.cpp:71
get_region_by_name
region * get_region_by_name(const char *region_name)
Definition: region.cpp:46
player_set_dragon_title
void player_set_dragon_title(struct player *pl, int level, const char *attack, int skin_resist)
Definition: player.cpp:202
object_sub_weight
void object_sub_weight(object *op, signed long weight)
Definition: object.cpp:1807
check_trigger
int check_trigger(object *op, object *cause)
Definition: button.cpp:518
player_set_own_title
void player_set_own_title(struct player *pl, const char *title)
Definition: player.cpp:272
object_find_by_type_and_skill
object * object_find_by_type_and_skill(const object *who, int type, const char *skill)
Definition: object.cpp:4183
i18n_list_languages
void i18n_list_languages(object *who)
Definition: languages.cpp:95
get_objectlink
objectlink * get_objectlink(void)
Definition: links.cpp:33
check_exp_loss
int64_t check_exp_loss(const object *op, int64_t exp)
Definition: living.cpp:2073
init_ob_method_struct
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
Definition: ob_types.cpp:32
object_copy
void object_copy(const object *src_ob, object *dest_ob)
Definition: object.cpp:1192
i18n_get_language_code
sstring i18n_get_language_code(language_t language)
Definition: languages.cpp:85
readable_message_type
Definition: book.h:36
identify
object * identify(object *op)
Definition: item.cpp:1421
set_attr_value
void set_attr_value(living *stats, int attr, int8_t value)
Definition: living.cpp:218
random_roll
int random_roll(int min, int max, const object *op, int goodbad)
Definition: utils.cpp:42
dump_friendly_objects
void dump_friendly_objects(void)
Definition: friend.cpp:70
ihypot
int ihypot(int a, int b)
Definition: utils.cpp:570
castle_read.key
key
Definition: castle_read.py:64
get_cleric_chance
int get_cleric_chance(int stat)
Definition: living.cpp:2377
stringbuffer_append_string
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Definition: stringbuffer.cpp:95
stringbuffer_append_stringbuffer
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Definition: stringbuffer.cpp:165
i18n_free
void i18n_free(void)
Definition: languages.cpp:209
book_overflow
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
Definition: readable.cpp:719
object_find_by_type_and_slaying
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
Definition: object.cpp:4158
delete_map
void delete_map(mapstruct *m)
Definition: map.cpp:1696
object_matches_pickup_mode
int object_matches_pickup_mode(const object *item, int mode)
Definition: c_object.cpp:656
map_find_by_type
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
Definition: object.cpp:3145
object_set_msg
void object_set_msg(object *op, const char *msg)
Definition: object.cpp:4811
register_apply
void register_apply(int ob_type, apply_func method)
Definition: ob_types.cpp:62
free_all_artifacts
void free_all_artifacts(void)
Definition: artifact.cpp:117
get_message_title
sstring get_message_title(const GeneralMessage *message)
Definition: readable.cpp:2068
path_combine_and_normalize
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
Definition: path.cpp:172
object_copy_no_speed
void object_copy_no_speed(const object *src_ob, object *dest_ob)
Definition: object.cpp:1061
object_find_by_type_and_name
object * object_find_by_type_and_name(const object *who, int type, const char *name)
Definition: object.cpp:4108
object_set_cheat
void object_set_cheat(object *op)
Definition: object.cpp:3274
dump_all_maps
void dump_all_maps(void)
Definition: map.cpp:268
get_cha_bonus
int get_cha_bonus(int stat)
Definition: living.cpp:2357
object_sum_weight
signed long object_sum_weight(object *op)
Definition: object.cpp:568
fatal_error
fatal_error
Definition: define.h:47
find_recipe_for_tool
recipe * find_recipe_for_tool(const char *tool, recipe *from)
Definition: recipe.cpp:894
find_treasure_by_name
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
Definition: recipe.cpp:422
object_decrease_nrof
object * object_decrease_nrof(object *op, uint32_t i)
Definition: object.cpp:2676
object_fix_multipart
void object_fix_multipart(object *tmp)
Definition: object.cpp:4685
tick_game_time
void tick_game_time(void)
Definition: time.cpp:184
object_set_owner
void object_set_owner(object *op, object *owner)
Definition: object.cpp:840
object_find_by_tag
object * object_find_by_tag(const object *who, tag_t tag)
Definition: object.cpp:4060
create_archetype_by_object_name
object * create_archetype_by_object_name(const char *name)
Definition: arch.cpp:116
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.cpp:3296
has_ability
int has_ability(const object *ob)
Definition: exp.cpp:153
generate_treasure
object * generate_treasure(treasurelist *t, int difficulty)
Definition: treasure.cpp:295
get_jail_exit
object * get_jail_exit(object *op)
Definition: region.cpp:253
dump_faces
void dump_faces(void)
Definition: image.cpp:159
map_find_by_flag
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
Definition: map.cpp:2621
ob_blocked
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
Definition: map.cpp:479
init_readable
void init_readable(void)
Definition: readable.cpp:904
check_altar_sacrifice
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
Definition: button.cpp:347
check_path
int check_path(const char *name, int prepend_dir)
Definition: map.cpp:201
object_copy_owner
void object_copy_owner(object *op, object *clone)
Definition: object.cpp:893
find_archetype
archetype * find_archetype(const char *name)
Definition: assets.cpp:266
ob_move_on
method_ret ob_move_on(object *op, object *victim, object *originator)
Definition: ob_methods.cpp:111
load_image_info
void load_image_info(FILE *file, const char *filename)
add_friendly_object
void add_friendly_object(object *op)
Definition: friend.cpp:32
materialtype_t
Definition: material.h:32
has_carried_lights
int has_carried_lights(const object *op)
Definition: los.cpp:346
destination_dir
const char * destination_dir
Definition: gridarta-types-convert.cpp:32
set_map_reset_time
void set_map_reset_time(mapstruct *map)
Definition: map.cpp:2232
report.error
def error(pl)
Definition: report.py:43
get_season_name
const char * get_season_name(const int index)
Definition: time.cpp:127
treasure
Definition: treasure.h:63
object_dump
void object_dump(const object *op, StringBuffer *sb)
Definition: object.cpp:645
LogLevel
LogLevel
Definition: logger.h:10
artifact
Definition: artifact.h:14
object_create_clone
object * object_create_clone(object *asrc)
Definition: object.cpp:3909
describe_monster
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
Definition: item.cpp:777
strip_endline
void strip_endline(char *buf)
Definition: utils.cpp:314
stringbuffer_append_printf
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Definition: stringbuffer.cpp:138
create_archetype
object * create_archetype(const char *name)
Definition: arch.cpp:278
dump_abilities
void dump_abilities(void)
Definition: info.cpp:65
save_map
int save_map(mapstruct *m, int flag)
Definition: map.cpp:1395
get_turn_bonus
int get_turn_bonus(int stat)
Definition: living.cpp:2381
replace.current
current
Definition: replace.py:64
try_find_archetype
archetype * try_find_archetype(const char *name)
Definition: assets.cpp:270
try_find_animation
Animations * try_find_animation(const char *name)
Definition: assets.cpp:278
free_dialog_information
void free_dialog_information(object *op)
Definition: dialog.cpp:32
get_map_from_coord
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
Definition: map.cpp:2321
name_to_material
materialtype_t * name_to_material(const char *name)
Definition: utils.cpp:248
dragon.state
state
Definition: dragon.py:84
get_dam_bonus
int get_dam_bonus(int stat)
Definition: living.cpp:2385
remove_statbonus
void remove_statbonus(object *op)
Definition: living.cpp:845
object_merge
object * object_merge(object *op, object *top)
Definition: object.cpp:2051
init_archetype_pointers
void init_archetype_pointers(void)
Definition: treasure.cpp:62
altar_valkyrie.pl
pl
Definition: altar_valkyrie.py:28
BufferReader
Definition: bufferreader.cpp:21
use_trigger
void use_trigger(object *op)
Definition: button.cpp:254
get_region_from_string
region * get_region_from_string(const char *name)
Definition: region.cpp:117
time_info
void time_info(object *op)
Definition: time.cpp:298
stringbuffer_append_multiline_block
void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end)
Definition: stringbuffer.cpp:196
clean_friendly_list
void clean_friendly_list(void)
Definition: friend.cpp:80
print_los
void print_los(object *op)
Definition: los.cpp:665
init_formulae
void init_formulae(BufferReader *reader, const char *filename)
Definition: recipe.cpp:166
link_player_skills
void link_player_skills(object *op)
Definition: player.cpp:287
get_readable_message_type
const readable_message_type * get_readable_message_type(object *readable)
Definition: readable.cpp:2055
find_dir_2
int find_dir_2(int x, int y)
Definition: object.cpp:3677
rndm
int rndm(int min, int max)
Definition: utils.cpp:162
object_find_by_name_global
object * object_find_by_name_global(const char *str)
Definition: object.cpp:747
ring_occidental_mages.r
r
Definition: ring_occidental_mages.py:6
remove_button_link
void remove_button_link(object *op)
Definition: button.cpp:693
change_map_light
int change_map_light(mapstruct *m, int change)
Definition: map.cpp:1994
free_arch
void free_arch(archetype *at)
Definition: arch.cpp:169
get_region_struct
region * get_region_struct(void)
Definition: region.cpp:294
object_find_free_spot
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
Definition: object.cpp:3559
drain_stat
void drain_stat(object *op)
Definition: living.cpp:716
make_sure_not_seen
void make_sure_not_seen(const object *op)
Definition: los.cpp:718
query_name
void query_name(const object *op, char *buf, size_t size)
Definition: item.cpp:588
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.cpp:5311
isqrt
int isqrt(int n)
Definition: utils.cpp:562
player_lvl_adj
void player_lvl_adj(object *who, object *op)
Definition: living.cpp:1826
free_all_god
void free_all_god(void)
Definition: holy.cpp:327
split_string
size_t split_string(char *str, char *array[], size_t array_size, char sep)
Definition: utils.cpp:473
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.cpp:574
jump_time
void jump_time(void)
Definition: time.cpp:198
is_friendly
int is_friendly(const object *op)
Definition: friend.cpp:108
update_button
void update_button(object *op)
Definition: button.cpp:162
apply_func
method_ret(* apply_func)(object *, object *, int)
Definition: ob_methods.h:30
object_free
void object_free(object *ob, int flags)
Definition: object.cpp:1592
level
Definition: level.py:1