Crossfire Server, Branches 1.12  R18729
libproto.h
Go to the documentation of this file.
1 /* anim.c */
2 extern void free_all_anim(void);
3 extern void init_anim(void);
4 extern int find_animation(const char *name);
5 extern int try_find_animation(const char *name);
6 extern void animate_object(object *op, int dir);
7 extern void apply_anim_suffix(object *who, sstring suffix);
8 /* arch.c */
9 extern archetype *find_archetype_by_object_name(const char *name);
10 extern archetype *find_archetype_by_object_type_name(int type, const char *name);
11 extern archetype *get_archetype_by_skill_name(const char *skill, int type);
12 extern archetype *get_archetype_by_type_subtype(int type, int subtype);
13 extern object *create_archetype_by_object_name(const char *name);
14 extern void init_archetypes(void);
15 extern void arch_info(object *op);
16 extern void clear_archetable(void);
17 extern void dump_arch(archetype *at, StringBuffer *sb);
18 extern void dump_all_archetypes(void);
19 extern void free_arch(archetype *at);
20 extern void free_all_archs(void);
21 extern archetype *get_archetype_struct(void);
22 extern void check_generators(void);
23 extern object *arch_to_object(archetype *at);
24 extern object *create_singularity(const char *name);
25 extern object *create_archetype(const char *name);
26 extern archetype *try_find_archetype(const char *name);
27 extern archetype *find_archetype(const char *name);
28 extern object *object_create_arch(archetype *at);
29 /* button.c */
30 extern void trigger_connected(objectlink *ol, object *cause, const int state);
31 extern void push_button(object *op);
32 extern void update_button(object *op);
33 extern void update_buttons(mapstruct *m);
34 extern void use_trigger(object *op);
35 extern void animate_turning(object *op);
36 extern int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove);
37 extern int operate_altar(object *altar, object **sacrifice);
38 extern int check_trigger(object *op, object *cause);
39 extern void add_button_link(object *button, mapstruct *map, int connected);
40 extern void remove_button_link(object *op);
41 extern int get_button_value(const object *button);
42 extern object *check_inv_recursive(object *op, const object *trig);
43 extern void check_inv(object *op, object *trig);
44 extern void verify_button_links(const mapstruct *map);
45 /* dialog.c */
46 extern void free_dialog_information(object *op);
47 extern int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply);
48 /* exp.c */
49 extern sint64 new_exp(const object *ob);
50 extern int has_ability(const object *ob);
51 extern void init_experience(void);
52 extern void dump_experience(void);
53 extern void free_experience(void);
54 /* friend.c */
55 extern void add_friendly_object(object *op);
56 extern void remove_friendly_object(object *op);
57 extern void dump_friendly_objects(void);
58 extern void clean_friendly_list(void);
59 extern int is_friendly(const object *op);
60 /* glue.c */
61 extern void fatal(int err);
62 /* holy.c */
63 extern void init_gods(void);
64 extern godlink *get_rand_god(void);
65 extern const object *pntr_to_god_obj(godlink *godlnk);
66 extern void free_all_god(void);
67 extern void dump_gods(void);
68 /* info.c */
69 extern void dump_abilities(void);
70 extern void print_monsters(void);
71 extern void bitstostring(long bits, int num, char *str);
72 /* image.c */
73 extern void read_bmap_names(void);
74 extern unsigned find_face(const char *name, unsigned error);
75 extern int read_smooth(void);
76 extern int find_smooth(uint16 face, uint16 *smoothed);
77 extern void free_all_images(void);
78 extern void read_client_images(void);
79 extern int is_valid_faceset(int fsn);
80 extern void free_socket_images(void);
81 extern int get_face_fallback(int faceset, int imageno);
82 /* init.c */
83 extern void init_library(void);
84 extern void init_globals(void);
85 extern void free_globals(void);
86 extern void init_objects(void);
87 extern void write_todclock(void);
88 /* item.c */
89 extern int get_power_from_ench(int ench);
90 extern int calc_item_power(const object *op, int flag);
91 extern const typedata *get_typedata(int itemtype);
92 extern const typedata *get_typedata_by_name(const char *name);
93 extern void describe_resistance(const object *op, int newline, char *buf, size_t size);
94 extern void query_weight(const object *op, char *buf, size_t size);
95 extern void get_levelnumber(int i, char *buf, size_t size);
96 extern void query_short_name(const object *op, char *buf, size_t size);
97 extern void query_name(const object *op, char *buf, size_t size);
98 extern void query_base_name(const object *op, int plural, char *buf, size_t size);
99 extern void describe_monster(const object *op, char *retbuf, size_t size);
100 extern void describe_item(const object *op, const object *owner, char *retbuf, size_t size);
101 extern int is_magical(const object *op);
102 extern int need_identify(const object *op);
103 extern void identify(object *op);
104 /* languages.c */
105 extern int get_language(object *op);
106 extern const char *i18n_translate(int language, int id);
107 extern void i18n_init(void);
108 /* links.c */
109 extern objectlink *get_objectlink(void);
110 extern oblinkpt *get_objectlinkpt(void);
111 extern void free_objectlink(objectlink *ol);
112 extern void free_objectlinkpt(oblinkpt *obp);
113 /* living.c */
114 extern void set_attr_value(living *stats, int attr, sint8 value);
115 extern void change_attr_value(living *stats, int attr, sint8 value);
116 extern sint8 get_attr_value(const living *stats, int attr);
117 extern void check_stat_bounds(living *stats);
118 extern int change_abil(object *op, object *tmp);
119 extern void drain_stat(object *op);
120 extern void drain_specific_stat(object *op, int deplete_stats);
121 extern void change_luck(object *op, int value);
122 extern void remove_statbonus(object *op);
123 extern void add_statbonus(object *op);
124 extern void fix_object(object *op);
125 extern int allowed_class(const object *op);
126 extern void set_dragon_name(object *pl, const object *abil, const object *skin);
127 extern object *give_skill_by_name(object *op, const char *skill_name);
128 extern void player_lvl_adj(object *who, object *op);
129 extern sint64 level_exp(int level, double expmul);
130 extern void calc_perm_exp(object *op);
131 extern sint64 check_exp_loss(const object *op, sint64 exp);
132 extern sint64 check_exp_adjust(const object *op, sint64 exp);
133 extern void change_exp(object *op, sint64 exp, const char *skill_name, int flag);
134 extern void apply_death_exp_penalty(object *op);
135 extern int did_make_save(const object *op, int level, int bonus);
136 extern void share_exp(object *op, sint64 exp, const char *skill, int flag);
137 /* logger.c */
138 extern void LOG(LogLevel logLevel, const char *format, ...);
139 /* los.c */
140 extern void init_block(void);
141 extern void clear_los(object *op);
142 extern int has_carried_lights(const object *op);
143 extern void update_los(object *op);
144 extern void update_all_map_los(mapstruct *map);
145 extern void update_all_los(const mapstruct *map, int x, int y);
146 extern void print_los(object *op);
147 extern void make_sure_seen(const object *op);
148 extern void make_sure_not_seen(const object *op);
149 /* map.c */
150 extern mapstruct *has_been_loaded(const char *name);
151 extern char *create_pathname(const char *name, char *buf, size_t size);
152 extern void create_overlay_pathname(const char *name, char *buf, size_t size);
153 extern void create_template_pathname(const char *name, char *buf, size_t size);
154 extern int check_path(const char *name, int prepend_dir);
155 extern void dump_map(const mapstruct *m);
156 extern void dump_all_maps(void);
157 extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny);
158 extern int blocked_link(object *ob, mapstruct *m, int sx, int sy);
159 extern int ob_blocked(const object *ob, mapstruct *m, sint16 x, sint16 y);
160 extern void fix_container(object *container);
161 extern mapstruct *get_linked_map(void);
162 extern mapstruct *get_empty_map(int sizex, int sizey);
163 extern mapstruct *load_original_map(const char *filename, int flags);
164 extern int save_map(mapstruct *m, int flag);
165 extern void clean_object(object *op);
166 extern void free_map(mapstruct *m);
167 extern void delete_map(mapstruct *m);
168 extern mapstruct *ready_map_name(const char *name, int flags);
169 extern int calculate_difficulty(mapstruct *m);
170 extern void clean_tmp_map(mapstruct *m);
171 extern void free_all_maps(void);
172 extern int change_map_light(mapstruct *m, int change);
173 extern void update_position(mapstruct *m, int x, int y);
174 extern void set_map_reset_time(mapstruct *map);
175 extern int out_of_map(mapstruct *m, int x, int y);
177 extern void get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags);
178 extern void get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags);
179 extern int on_same_map(const object *op1, const object *op2);
180 extern void map_remove_unique_files(const mapstruct *map);
181 /* ob_methods.c */
182 extern method_ret ob_apply(object *op, object *applier, int aflags);
183 extern method_ret ob_process(object *op);
184 extern char *ob_describe(const object *op, const object *observer, char *buf, size_t size);
185 extern method_ret ob_move_on(object *op, object *victim, object *originator);
186 extern method_ret ob_trigger(object *op, object *cause, int state);
187 /* ob_types.c */
188 extern void init_ob_method_struct(ob_methods *methods, ob_methods *fallback);
189 extern void init_ob_types(ob_methods *base_type);
190 extern void register_apply(int ob_type, apply_func method);
191 extern void register_process(int ob_type, process_func method);
192 extern void register_describe(int ob_type, describe_func method);
193 extern void register_move_on(int ob_type, move_on_func method);
194 extern void register_trigger(int ob_type, trigger_func method);
195 /* object.c */
196 extern int can_merge(object *ob1, object *ob2);
197 extern signed long sum_weight(object *op);
198 extern object *object_get_env_recursive(object *op);
199 extern object *get_player_container(object *op);
200 extern void dump_object(object *op, StringBuffer *sb);
201 extern void dump_all_objects(void);
202 extern object *find_object(tag_t i);
203 extern object *find_object_name(const char *str);
204 extern void free_all_object_data(void);
205 extern object *get_owner(object *op);
206 extern void clear_owner(object *op);
207 extern void set_owner(object *op, object *owner);
208 extern void copy_owner(object *op, object *clone);
209 extern void reset_object(object *op);
210 extern void free_key_values(object *op);
211 extern void clear_object(object *op);
212 extern void copy_object(object *op2, object *op);
213 extern void copy_object_with_inv(object *src_ob, object *dest_ob);
214 extern object *get_object(void);
215 extern void update_turn_face(object *op);
216 extern void update_ob_speed(object *op);
217 extern void remove_from_active_list(object *op);
218 extern void update_object(object *op, int action);
219 extern void free_object(object *ob);
220 extern void free_object2(object *ob, int free_inventory);
221 extern int count_free(void);
222 extern int count_used(void);
223 extern int count_active(void);
224 extern void sub_weight(object *op, signed long weight);
225 extern void remove_ob(object *op);
226 extern object *merge_ob(object *op, object *top);
227 extern object *insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y);
228 extern void merge_spell(object *op, sint16 x, sint16 y);
229 extern object *insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag);
230 extern void replace_insert_ob_in_map(const char *arch_string, object *op);
231 extern object *get_split_ob(object *orig_ob, uint32 nr, char *err, size_t size);
232 extern object *decrease_ob_nr(object *op, uint32 i);
233 extern void add_weight(object *op, signed long weight);
234 extern object *insert_ob_in_ob(object *op, object *where);
235 extern int check_move_on(object *op, object *originator);
236 extern object *present_arch(const archetype *at, mapstruct *m, int x, int y);
237 extern object *present(uint8 type, mapstruct *m, int x, int y);
238 extern object *present_in_ob(uint8 type, const object *op);
239 extern object *present_in_ob_by_name(int type, const char *str, const object *op);
240 extern object *present_arch_in_ob(const archetype *at, const object *op);
241 extern void flag_inv(object *op, int flag);
242 extern void unflag_inv(object *op, int flag);
243 extern void set_cheat(object *op);
244 extern int find_multi_free_spot_around(object *ob, object *gen, int *hx, int *hy);
245 extern int find_multi_free_spot_within_radius(object *ob, object *gen, int *hx, int *hy);
246 extern int find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop);
247 extern int find_first_free_spot(const object *ob, mapstruct *m, int x, int y);
248 extern void get_search_arr(int *search_arr);
249 extern int find_dir(mapstruct *m, int x, int y, object *exclude);
250 extern int distance(const object *ob1, const object *ob2);
251 extern int find_dir_2(int x, int y);
252 extern int absdir(int d);
253 extern int dirdiff(int dir1, int dir2);
254 extern int can_see_monsterP(mapstruct *m, int x, int y, int dir);
255 extern int can_pick(const object *who, const object *item);
256 extern object *object_create_clone(object *asrc);
257 extern object *find_obj_by_type_subtype(const object *who, int type, int subtype);
258 extern key_value *get_ob_key_link(const object *ob, const char *key);
259 extern const char *get_ob_key_value(const object *op, const char *const key);
260 extern int set_ob_key_value(object *op, const char *key, const char *value, int add_key);
261 extern int item_matched_string(object *pl, object *op, const char *name);
262 extern void fix_multipart_object(object *tmp);
263 extern void get_multi_size(object *ob, int *sx, int *sy, int *hx, int *hy);
264 /* path.c */
265 extern char *path_combine(const char *src, const char *dst, char *path, size_t size);
266 extern void path_normalize(char *path);
267 extern char *path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size);
268 /* porting.c */
269 extern char *tempnam_local(const char *dir, const char *pfx);
270 extern FILE *tempnam_secure(const char *dir, const char *pfx, char **filename);
271 extern void remove_directory(const char *path);
272 extern char *strdup_local(const char *str);
273 extern const char *strcasestr_local(const char *s, const char *find);
274 extern char *strerror_local(int errnum, char *buf, size_t size);
275 extern int isqrt(int n);
276 extern FILE *open_and_uncompress(const char *name, int flag, int *compressed);
277 extern void close_and_delete(FILE *fp, int compressed);
278 extern void make_path_to_file(const char *filename);
279 /* player.c */
280 extern void clear_player(player *pl);
281 extern void free_player(player *pl);
282 extern int atnr_is_dragon_enabled(int attacknr);
283 extern int is_dragon_pl(const object *op);
284 extern client_spell *get_client_spell_state(player *pl, object *spell);
285 extern int is_wraith_pl(object *op);
286 extern int is_old_wraith_pl(object *op);
287 /* re-cmp.c */
288 extern const char *re_cmp(const char *str, const char *regexp);
289 /* readable.c */
290 extern int book_overflow(const char *buf1, const char *buf2, size_t booksize);
291 extern void init_readable(void);
292 extern object *get_random_mon(int level);
293 extern void tailor_readable_ob(object *book, int msg_type);
294 extern void free_all_readable(void);
295 extern void write_book_archive(void);
296 extern const readable_message_type *get_readable_message_type(object *readable);
297 /* recipe.c */
298 extern recipelist *get_formulalist(int i);
299 extern void init_formulae(void);
300 extern void dump_alchemy(void);
301 extern archetype *find_treasure_by_name(const treasure *t, const char *name, int depth);
302 extern void dump_alchemy_costs(void);
303 extern int strtoint(const char *buf);
304 extern artifact *locate_recipe_artifact(const recipe *rp, size_t idx);
305 extern recipe *get_random_recipe(recipelist *rpl);
306 extern void free_all_recipes(void);
307 /* region.c */
308 extern region *get_region_by_name(const char *region_name);
310 extern const char *get_name_of_region_for_map(const mapstruct *m);
311 extern region *get_region_from_string(const char *name);
312 extern int region_is_child_of_region(const region *child, const region *r);
313 extern const char *get_region_longname(const region *r);
314 extern const char *get_region_msg(const region *r);
315 extern object *get_jail_exit(object *op);
316 extern void init_regions(void);
317 extern region *get_region_struct(void);
318 /* shstr.c */
319 extern void init_hash_table(void);
320 extern sstring add_string(const char *str);
321 extern sstring add_refcount(sstring str);
322 extern int query_refcount(sstring str);
323 extern sstring find_string(const char *str);
324 extern void free_string(sstring str);
325 extern void ss_dump_statistics(char *buf, size_t size);
326 extern char *ss_dump_table(int what, char *buf, size_t size);
327 extern int buf_overflow(const char *buf1, const char *buf2, size_t bufsize);
328 /* stringbuffer.c */
329 extern StringBuffer *stringbuffer_new(void);
330 extern char *stringbuffer_finish(StringBuffer *sb);
333 extern void stringbuffer_append_string(StringBuffer *sb, const char *str);
334 extern void stringbuffer_append_printf(StringBuffer *sb, const char *format, ...);
335 extern void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2);
336 /* time.c */
337 extern const char *get_periodofday(const int index);
338 extern const char *get_month_name(const int index);
339 extern const char *get_weekday(const int index);
340 extern const char *get_season_name(const int index);
341 extern void reset_sleep(void);
342 extern int enough_elapsed_time(void);
343 extern void sleep_delta(void);
344 extern void set_max_time(long t);
345 extern void get_tod(timeofday_t *tod);
346 extern void time_info(object *op);
347 extern long seconds(void);
348 /* treasure.c */
349 extern void init_archetype_pointers(void);
350 extern void load_treasures(void);
351 extern treasurelist *find_treasurelist(const char *name);
352 extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries);
353 extern object *generate_treasure(treasurelist *t, int difficulty);
354 extern void set_abs_magic(object *op, int magic);
355 extern void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags);
356 extern artifactlist *find_artifactlist(int type);
357 extern void dump_artifacts(void);
358 extern void dump_monster_treasure(const char *name);
359 extern void init_artifacts(void);
360 extern void add_abilities(object *op, object *change);
361 extern int legal_artifact_combination(object *op, artifact *art);
362 extern void give_artifact_abilities(object *op, object *artifact);
363 extern void generate_artifact(object *op, int difficulty);
364 extern void free_all_treasures(void);
365 /* utils.c */
366 extern int random_roll(int min, int max, const object *op, int goodbad);
367 extern sint64 random_roll64(sint64 min, sint64 max, const object *op, int goodbad);
368 extern int die_roll(int num, int size, const object *op, int goodbad);
369 extern int rndm(int min, int max);
370 extern void decay_objects(mapstruct *m);
371 extern materialtype_t *name_to_material(const char *name);
372 extern void transmute_materialname(object *op, const object *change);
373 extern void set_materialname(object *op, int difficulty, materialtype_t *nmt);
374 extern void strip_media_tag(char *message);
375 extern const char *strrstr(const char *haystack, const char *needle);
376 extern void strip_endline(char *buf);
377 extern void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize);
378 extern void make_list_like(char *input);
379 extern void replace_unprintable_chars(char *buf);
380 /* loader.c */
381 extern int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode);
382 extern void yyrestart(FILE *input_file);
383 extern void yypop_buffer_state(void);
384 extern int yyget_lineno(void);
385 extern FILE *yyget_in(void);
386 extern FILE *yyget_out(void);
387 extern int yyget_leng(void);
388 extern char *yyget_text(void);
389 extern void yyset_lineno(int line_number);
390 extern void yyset_in(FILE *in_str);
391 extern void yyset_out(FILE *out_str);
392 extern int yyget_debug(void);
393 extern void yyset_debug(int bdebug);
394 extern int yylex_destroy(void);
395 extern void yyfree(void *ptr);
396 extern int load_object(FILE *fp, object *op, int bufstate, int map_flags);
397 extern int set_variable(object *op, char *buf);
398 extern void init_vars(void);
399 extern void free_loader(void);
400 extern void get_ob_diff(StringBuffer *sb, object *op, object *op2);
401 extern int save_object(FILE *fp, object *op, int flag);
void replace_insert_ob_in_map(const char *arch_string, object *op)
Definition: object.c:2271
void init_objects(void)
Definition: init.c:347
object * create_archetype_by_object_name(const char *name)
Definition: arch.c:173
int yyget_debug(void)
void dump_map(const mapstruct *m)
Definition: map.c:275
void free_all_recipes(void)
Definition: recipe.c:721
signed char sint8
Definition: global.h:80
const object * pntr_to_god_obj(godlink *godlnk)
Definition: holy.c:133
void add_abilities(object *op, object *change)
Definition: treasure.c:1653
mapstruct * ready_map_name(const char *name, int flags)
Definition: map.c:1809
archetype * find_archetype_by_object_name(const char *name)
Definition: arch.c:70
Definition: player.h:146
FILE * open_and_uncompress(const char *name, int flag, int *compressed)
Definition: porting.c:724
char * yyget_text(void)
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
Definition: path.c:184
method_ret(* process_func)(ob_methods *, object *)
Definition: ob_methods.h:67
oblinkpt * get_objectlinkpt(void)
Definition: links.c:65
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
Definition: button.c:355
void verify_button_links(const mapstruct *map)
Definition: button.c:853
method_ret(* move_on_func)(ob_methods *, object *, object *, object *)
Definition: ob_methods.h:69
void identify(object *op)
Definition: item.c:1447
int need_identify(const object *op)
Definition: item.c:1401
int on_same_map(const object *op1, const object *op2)
Definition: map.c:2609
void make_sure_not_seen(const object *op)
Definition: los.c:667
object * get_split_ob(object *orig_ob, uint32 nr, char *err, size_t size)
Definition: object.c:2313
void free_all_archs(void)
Definition: arch.c:298
signed short sint16
Definition: global.h:72
Definition: map.h:399
void init_hash_table(void)
Definition: shstr.c:47
void free_map(mapstruct *m)
Definition: map.c:1707
void update_ob_speed(object *op)
Definition: object.c:1008
void describe_item(const object *op, const object *owner, char *retbuf, size_t size)
Definition: item.c:1018
int item_matched_string(object *pl, object *op, const char *name)
Definition: object.c:3901
Definition: object.h:298
void free_arch(archetype *at)
Definition: arch.c:273
sstring stringbuffer_finish_shared(StringBuffer *sb)
Definition: stringbuffer.c:87
const char * get_month_name(const int index)
Definition: time.c:120
FILE * yyget_in(void)
void reset_object(object *op)
Definition: object.c:639
object * find_obj_by_type_subtype(const object *who, int type, int subtype)
Definition: object.c:3656
void replace_unprintable_chars(char *buf)
Definition: utils.c:516
void init_formulae(void)
Definition: recipe.c:159
void sleep_delta(void)
Definition: time.c:195
void register_apply(int ob_type, apply_func method)
Definition: ob_types.c:79
object * present_arch_in_ob(const archetype *at, const object *op)
Definition: object.c:2859
void clear_los(object *op)
Definition: los.c:258
void ss_dump_statistics(char *buf, size_t size)
Definition: shstr.c:315
int is_old_wraith_pl(object *op)
Definition: player.c:192
void change_attr_value(living *stats, int attr, sint8 value)
Definition: living.c:336
objectlink * get_objectlink(void)
Definition: links.c:45
object * find_object_name(const char *str)
Definition: object.c:459
const char * i18n_translate(int language, int id)
Definition: languages.c:73
void strip_media_tag(char *message)
Definition: utils.c:388
void dump_abilities(void)
Definition: info.c:40
void decay_objects(mapstruct *m)
Definition: utils.c:187
void print_los(object *op)
Definition: los.c:614
void check_generators(void)
int random_roll(int min, int max, const object *op, int goodbad)
Definition: utils.c:51
void update_all_map_los(mapstruct *map)
Definition: los.c:516
void dump_experience(void)
Definition: exp.c:257
void dump_all_archetypes(void)
Definition: arch.c:252
object * merge_ob(object *op, object *top)
Definition: object.c:1724
int change_abil(object *op, object *tmp)
Definition: living.c:443
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
Definition: object.c:1992
region * get_region_by_map(mapstruct *m)
Definition: region.c:85
void clean_friendly_list(void)
Definition: friend.c:124
void free_socket_images(void)
Definition: image.c:584
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
Definition: object.c:3524
object * create_singularity(const char *name)
Definition: arch.c:603
treasurelist * find_treasurelist(const char *name)
Definition: treasure.c:295
const char * get_ob_key_value(const object *op, const char *const key)
Definition: object.c:3701
void change_luck(object *op, int value)
Definition: living.c:791
int count_active(void)
Definition: object.c:1465
int get_power_from_ench(int ench)
Definition: item.c:240
void map_remove_unique_files(const mapstruct *map)
Definition: map.c:2619
void init_gods(void)
Definition: holy.c:63
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Definition: stringbuffer.c:133
object * get_owner(object *op)
Definition: object.c:524
archetype * find_archetype(const char *name)
Definition: arch.c:700
void delete_map(mapstruct *m)
Definition: map.c:1745
void yypop_buffer_state(void)
void init_vars(void)
sint64 check_exp_adjust(const object *op, sint64 exp)
Definition: living.c:1937
char * strerror_local(int errnum, char *buf, size_t size)
Definition: porting.c:525
void clear_owner(object *op)
Definition: object.c:544
void free_all_object_data(void)
Definition: object.c:479
int calc_item_power(const object *op, int flag)
Definition: item.c:264
void init_archetype_pointers(void)
Definition: treasure.c:66
void apply_anim_suffix(object *who, sstring suffix)
Definition: anim.c:289
void yyfree(void *ptr)
void yyset_out(FILE *out_str)
object * get_object(void)
Definition: object.c:921
void update_button(object *op)
Definition: button.c:178
void use_trigger(object *op)
Definition: button.c:268
archetype * find_archetype_by_object_type_name(int type, const char *name)
Definition: arch.c:96
int try_find_animation(const char *name)
Definition: anim.c:161
Definition: god.h:12
int yylex_destroy(void)
int operate_altar(object *altar, object **sacrifice)
Definition: button.c:470
object * give_skill_by_name(object *op, const char *skill_name)
Definition: living.c:1689
int count_used(void)
Definition: object.c:1449
void give_artifact_abilities(object *op, object *artifact)
Definition: treasure.c:1884
object * insert_ob_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Definition: object.c:1761
void query_short_name(const object *op, char *buf, size_t size)
Definition: item.c:551
void dump_gods(void)
Definition: holy.c:161
mapstruct * get_map_from_coord(mapstruct *m, sint16 *x, sint16 *y)
Definition: map.c:2366
int die_roll(int num, int size, const object *op, int goodbad)
Definition: utils.c:134
region * get_region_by_name(const char *region_name)
Definition: region.c:57
object * present_in_ob(uint8 type, const object *op)
Definition: object.c:2806
region * get_region_from_string(const char *name)
Definition: region.c:132
Definition: living.h:77
void dump_alchemy_costs(void)
Definition: recipe.c:495
object * present_in_ob_by_name(int type, const char *str, const object *op)
Definition: object.c:2840
void dump_friendly_objects(void)
Definition: friend.c:113
const typedata * get_typedata(int itemtype)
Definition: item.c:352
sint64 random_roll64(sint64 min, sint64 max, const object *op, int goodbad)
Definition: utils.c:86
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Definition: stringbuffer.c:106
void free_object2(object *ob, int free_inventory)
Definition: object.c:1258
void change_exp(object *op, sint64 exp, const char *skill_name, int flag)
Definition: living.c:2015
region * get_region_struct(void)
Definition: region.c:336
void init_experience(void)
Definition: exp.c:170
void set_attr_value(living *stats, int attr, sint8 value)
Definition: living.c:296
void generate_artifact(object *op, int difficulty)
Definition: treasure.c:1906
const char * strrstr(const char *haystack, const char *needle)
Definition: utils.c:414
void fix_multipart_object(object *tmp)
Definition: object.c:4007
void free_key_values(object *op)
Definition: object.c:659
void close_and_delete(FILE *fp, int compressed)
Definition: porting.c:748
Definition: object.h:321
void free_objectlinkpt(oblinkpt *obp)
Definition: links.c:95
void check_stat_bounds(living *stats)
Definition: living.c:404
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
Definition: dialog.c:214
void write_todclock(void)
Definition: init.c:424
void bitstostring(long bits, int num, char *str)
Definition: info.c:110
int yyget_lineno(void)
int find_dir_2(int x, int y)
Definition: object.c:3380
void query_base_name(const object *op, int plural, char *buf, size_t size)
Definition: item.c:732
object * decrease_ob_nr(object *op, uint32 i)
Definition: object.c:2345
void yyset_in(FILE *in_str)
int get_face_fallback(int faceset, int imageno)
Definition: image.c:614
void path_normalize(char *path)
Definition: path.c:97
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
Definition: treasure.c:499
int check_trigger(object *op, object *cause)
Definition: button.c:525
char method_ret
Definition: ob_methods.h:41
void init_readable(void)
Definition: readable.c:952
void push_button(object *op)
Definition: button.c:165
uint32 tag_t
Definition: object.h:40
void free_string(sstring str)
Definition: shstr.c:272
void init_regions(void)
Definition: region.c:301
FILE * yyget_out(void)
int absdir(int d)
Definition: object.c:3417
void free_loader(void)
void get_multi_size(object *ob, int *sx, int *sy, int *hx, int *hy)
Definition: object.c:4066
int find_dir(mapstruct *m, int x, int y, object *exclude)
Definition: object.c:3313
void init_block(void)
Definition: los.c:102
void describe_resistance(const object *op, int newline, char *buf, size_t size)
Definition: item.c:399
sint64 new_exp(const object *ob)
Definition: exp.c:104
void query_name(const object *op, char *buf, size_t size)
Definition: item.c:628
void update_turn_face(object *op)
Definition: object.c:990
void remove_ob(object *op)
Definition: object.c:1515
int atnr_is_dragon_enabled(int attacknr)
Definition: player.c:106
void set_owner(object *op, object *owner)
Definition: object.c:564
void free_dialog_information(object *op)
Definition: dialog.c:39
archetype * get_archetype_struct(void)
Definition: arch.c:323
char * tempnam_local(const char *dir, const char *pfx)
Definition: porting.c:87
const char * get_periodofday(const int index)
Definition: time.c:113
void free_all_treasures(void)
Definition: treasure.c:2131
void update_object(object *op, int action)
Definition: object.c:1112
void create_template_pathname(const char *name, char *buf, size_t size)
Definition: map.c:155
const char * get_weekday(const int index)
Definition: time.c:127
object * create_archetype(const char *name)
Definition: arch.c:625
method_ret(* trigger_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:70
archetype * get_archetype_by_type_subtype(int type, int subtype)
Definition: arch.c:149
int read_smooth(void)
Definition: image.c:348
void add_weight(object *op, signed long weight)
Definition: object.c:2486
int count_free(void)
Definition: object.c:1433
void free_experience(void)
Definition: exp.c:269
int save_map(mapstruct *m, int flag)
Definition: map.c:1453
object * insert_ob_in_ob(object *op, object *where)
Definition: object.c:2510
char * ob_describe(const object *op, const object *observer, char *buf, size_t size)
Definition: ob_methods.c:102
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
Definition: treasure.c:1070
Definition: map.h:297
void remove_statbonus(object *op)
Definition: living.c:840
int ob_blocked(const object *ob, mapstruct *m, sint16 x, sint16 y)
Definition: map.c:525
client_spell * get_client_spell_state(player *pl, object *spell)
Definition: player.c:147
sstring add_string(const char *str)
Definition: shstr.c:116
const char * get_region_msg(const region *r)
Definition: region.c:250
void fatal(int err)
Definition: glue.c:60
void clean_object(object *op)
Definition: map.c:1640
materialtype_t * name_to_material(const char *name)
Definition: utils.c:262
void update_los(object *op)
Definition: los.c:467
int query_refcount(sstring str)
Definition: shstr.c:216
void tailor_readable_ob(object *book, int msg_type)
Definition: readable.c:2010
void read_bmap_names(void)
Definition: image.c:198
void transmute_materialname(object *op, const object *change)
Definition: utils.c:281
void free_globals(void)
Definition: init.c:307
void update_buttons(mapstruct *m)
Definition: button.c:241
void get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
Definition: map.c:2504
void drain_stat(object *op)
Definition: living.c:748
void yyrestart(FILE *input_file)
void dump_object(object *op, StringBuffer *sb)
Definition: object.c:372
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
Definition: recipe.c:365
mapstruct * get_empty_map(int sizex, int sizey)
Definition: map.c:884
key_value * get_ob_key_link(const object *ob, const char *key)
Definition: object.c:3676
artifactlist * find_artifactlist(int type)
Definition: treasure.c:1431
const readable_message_type * get_readable_message_type(object *readable)
Definition: readable.c:2181
object * present_arch(const archetype *at, mapstruct *m, int x, int y)
Definition: object.c:2755
const char * get_region_longname(const region *r)
Definition: region.c:229
void load_treasures(void)
Definition: treasure.c:224
void register_trigger(int ob_type, trigger_func method)
Definition: ob_types.c:115
int out_of_map(mapstruct *m, int x, int y)
Definition: map.c:2300
int enough_elapsed_time(void)
Definition: time.c:175
mapstruct * load_original_map(const char *filename, int flags)
Definition: map.c:1226
signed long sum_weight(object *op)
Definition: object.c:317
void copy_owner(object *op, object *clone)
Definition: object.c:614
int has_ability(const object *ob)
Definition: exp.c:151
int is_friendly(const object *op)
Definition: friend.c:157
void init_library(void)
Definition: init.c:201
StringBuffer * stringbuffer_new(void)
Definition: stringbuffer.c:64
int check_path(const char *name, int prepend_dir)
Definition: map.c:216
unsigned char uint8
Definition: global.h:75
void free_all_god(void)
Definition: holy.c:142
char * create_pathname(const char *name, char *buf, size_t size)
Definition: map.c:114
void animate_turning(object *op)
Definition: button.c:284
int has_carried_lights(const object *op)
Definition: los.c:322
void make_path_to_file(const char *filename)
Definition: porting.c:764
void dump_artifacts(void)
Definition: treasure.c:1446
void add_friendly_object(object *op)
Definition: friend.c:43
object * find_object(tag_t i)
Definition: object.c:439
char * stringbuffer_finish(StringBuffer *sb)
Definition: stringbuffer.c:78
void init_artifacts(void)
Definition: treasure.c:1539
object * arch_to_object(archetype *at)
Definition: arch.c:576
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Definition: stringbuffer.c:97
void set_map_reset_time(mapstruct *map)
Definition: map.c:2239
int allowed_class(const object *op)
Definition: living.c:1543
method_ret ob_process(object *op)
Definition: ob_methods.c:79
mapstruct * has_been_loaded(const char *name)
Definition: map.c:87
sint64 level_exp(int level, double expmul)
Definition: living.c:1788
void yyset_lineno(int line_number)
void yyset_debug(int bdebug)
int can_merge(object *ob1, object *ob2)
Definition: object.c:178
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
Definition: ob_types.c:49
void read_client_images(void)
Definition: image.c:471
int calculate_difficulty(mapstruct *m)
Definition: map.c:1917
int set_ob_key_value(object *op, const char *key, const char *value, int add_key)
Definition: object.c:3826
int dirdiff(int dir1, int dir2)
Definition: object.c:3434
int find_multi_free_spot_around(object *ob, object *gen, int *hx, int *hy)
Definition: object.c:2935
int get_button_value(const object *button)
Definition: button.c:756
void merge_spell(object *op, sint16 x, sint16 y)
Definition: object.c:1792
char * strdup_local(const char *str)
Definition: porting.c:310
LogLevel
Definition: logger.h:37
void(* describe_func)(const ob_methods *, const object *, const object *, char *buf, size_t size)
Definition: ob_methods.h:68
void free_all_images(void)
Definition: image.c:418
int save_object(FILE *fp, object *op, int flag)
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
Definition: porting.c:143
int find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
Definition: object.c:3240
char * ss_dump_table(int what, char *buf, size_t size)
Definition: shstr.c:346
object * get_random_mon(int level)
Definition: readable.c:1316
unsigned short uint16
Definition: global.h:67
void make_list_like(char *input)
Definition: utils.c:485
void trigger_connected(objectlink *ol, object *cause, const int state)
Definition: button.c:52
void fix_container(object *container)
Definition: map.c:580
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
Definition: readable.c:696
void free_player(player *pl)
Definition: player.c:68
int strtoint(const char *buf)
Definition: recipe.c:616
sstring add_refcount(sstring str)
Definition: shstr.c:202
void remove_button_link(object *op)
Definition: button.c:700
int get_language(object *op)
Definition: languages.c:59
void remove_directory(const char *path)
Definition: porting.c:192
static const flag_definition flags[]
object * check_inv_recursive(object *op, const object *trig)
Definition: button.c:788
int blocked_link(object *ob, mapstruct *m, int sx, int sy)
Definition: map.c:373
const char * get_season_name(const int index)
Definition: time.c:134
object * present(uint8 type, mapstruct *m, int x, int y)
Definition: object.c:2782
int yyget_leng(void)
void stringbuffer_finish_socklist(StringBuffer *sb, SockList *sl)
void copy_object(object *op2, object *op)
Definition: object.c:758
void clear_archetable(void)
Definition: arch.c:219
int is_magical(const object *op)
Definition: item.c:1312
const char * sstring
Definition: global.h:84
void get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags)
Definition: map.c:2573
method_ret ob_apply(object *op, object *applier, int aflags)
Definition: ob_methods.c:59
void get_ob_diff(StringBuffer *sb, object *op, object *op2)
void create_overlay_pathname(const char *name, char *buf, size_t size)
Definition: map.c:135
void update_all_los(const mapstruct *map, int x, int y)
Definition: los.c:544
const char * re_cmp(const char *str, const char *regexp)
Definition: re-cmp.c:70
recipelist * get_formulalist(int i)
Definition: recipe.c:112
archetype * try_find_archetype(const char *name)
Definition: arch.c:671
void free_objectlink(objectlink *ol)
Definition: links.c:83
int find_smooth(uint16 face, uint16 *smoothed)
Definition: image.c:401
archetype * get_archetype_by_skill_name(const char *skill, int type)
Definition: arch.c:120
int is_dragon_pl(const object *op)
Definition: player.c:125
void register_describe(int ob_type, describe_func method)
Definition: ob_types.c:97
int region_is_child_of_region(const region *child, const region *r)
Definition: region.c:201
const char * strcasestr_local(const char *s, const char *find)
Definition: porting.c:461
mapstruct * get_linked_map(void)
Definition: map.c:816
void init_ob_types(ob_methods *base_type)
Definition: ob_types.c:66
void drain_specific_stat(object *op, int deplete_stats)
Definition: living.c:760
void set_materialname(object *op, int difficulty, materialtype_t *nmt)
Definition: utils.c:314
void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize)
Definition: utils.c:444
int load_object(FILE *fp, object *op, int bufstate, int map_flags)
method_ret ob_trigger(object *op, object *cause, int state)
Definition: ob_methods.c:144
void remove_from_active_list(object *op)
Definition: object.c:1070
int set_variable(object *op, char *buf)
object * object_create_clone(object *asrc)
Definition: object.c:3608
void init_archetypes(void)
Definition: arch.c:195
void free_all_maps(void)
Definition: map.c:1968
void describe_monster(const object *op, char *retbuf, size_t size)
Definition: item.c:840
Definition: tod.h:61
int change_map_light(mapstruct *m, int change)
Definition: map.c:2000
void player_lvl_adj(object *who, object *op)
Definition: living.c:1731
method_ret(* apply_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:66
void free_all_anim(void)
Definition: anim.c:41
int did_make_save(const object *op, int level, int bonus)
Definition: living.c:2121
void add_statbonus(object *op)
Definition: living.c:863
recipe * get_random_recipe(recipelist *rpl)
Definition: recipe.c:697
void get_search_arr(int *search_arr)
Definition: object.c:3283
void copy_object_with_inv(object *src_ob, object *dest_ob)
Definition: object.c:862
void get_levelnumber(int i, char *buf, size_t size)
Definition: item.c:444
object * get_jail_exit(object *op)
Definition: region.c:272
void dump_all_objects(void)
Definition: object.c:416
sstring find_string(const char *str)
Definition: shstr.c:228
const char * get_name_of_region_for_map(const mapstruct *m)
Definition: region.c:103
void animate_object(object *op, int dir)
Definition: anim.c:186
int find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
Definition: object.c:3200
void calc_perm_exp(object *op)
Definition: living.c:1804
void init_anim(void)
Definition: anim.c:55
int is_valid_faceset(int fsn)
Definition: image.c:575
sint8 get_attr_value(const living *stats, int attr)
Definition: living.c:377
void set_max_time(long t)
Definition: time.c:256
void unflag_inv(object *op, int flag)
Definition: object.c:2894
artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
Definition: recipe.c:637
char * path_combine(const char *src, const char *dst, char *path, size_t size)
Definition: path.c:63
long seconds(void)
Definition: time.c:417
void sub_weight(object *op, signed long weight)
Definition: object.c:1489
void dump_monster_treasure(const char *name)
Definition: treasure.c:1515
int isqrt(int n)
Definition: porting.c:573
int rndm(int min, int max)
Definition: utils.c:174
int buf_overflow(const char *buf1, const char *buf2, size_t bufsize)
Definition: shstr.c:393
int legal_artifact_combination(object *op, artifact *art)
Definition: treasure.c:1849
void set_cheat(object *op)
Definition: object.c:2913
void update_position(mapstruct *m, int x, int y)
Definition: map.c:2124
void check_inv(object *op, object *trig)
Definition: button.c:828
int find_multi_free_spot_within_radius(object *ob, object *gen, int *hx, int *hy)
Definition: object.c:3052
void set_dragon_name(object *pl, const object *abil, const object *skin)
Definition: living.c:1566
unsigned int uint32
Definition: global.h:58
const typedata * get_typedata_by_name(const char *name)
Definition: item.c:372
void print_monsters(void)
Definition: info.c:71
godlink * get_rand_god(void)
Definition: holy.c:111
void make_sure_seen(const object *op)
Definition: los.c:644
void register_move_on(int ob_type, move_on_func method)
Definition: ob_types.c:106
void register_process(int ob_type, process_func method)
Definition: ob_types.c:88
void share_exp(object *op, sint64 exp, const char *skill, int flag)
Definition: living.c:2150
void arch_info(object *op)
Definition: arch.c:209
void i18n_init(void)
Definition: languages.c:108
void dump_arch(archetype *at, StringBuffer *sb)
Definition: arch.c:243
int is_wraith_pl(object *op)
Definition: player.c:173
void get_tod(timeofday_t *tod)
Definition: time.c:268
void free_all_readable(void)
Definition: readable.c:2084
void write_book_archive(void)
Definition: readable.c:2127
void apply_death_exp_penalty(object *op)
Definition: living.c:2073
object * generate_treasure(treasurelist *t, int difficulty)
Definition: treasure.c:524
object * get_player_container(object *op)
Definition: object.c:356
sint64 check_exp_loss(const object *op, sint64 exp)
Definition: living.c:1915
void add_button_link(object *button, mapstruct *map, int connected)
Definition: button.c:663
int find_animation(const char *name)
Definition: anim.c:146
Definition: map.h:346
int can_pick(const object *who, const object *item)
Definition: object.c:3569
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
Definition: map.c:330
void flag_inv(object *op, int flag)
Definition: object.c:2876
int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode)
void clear_player(player *pl)
Definition: player.c:45
void fix_object(object *op)
Definition: living.c:900
void strip_endline(char *buf)
Definition: utils.c:431
void time_info(object *op)
Definition: time.c:353
int check_move_on(object *op, object *originator)
Definition: object.c:2651
unsigned find_face(const char *name, unsigned error)
Definition: image.c:324
object * object_create_arch(archetype *at)
Definition: arch.c:741
void query_weight(const object *op, char *buf, size_t size)
Definition: item.c:424
static ob_methods base_type
Definition: ob_methods.c:41
void init_globals(void)
Definition: init.c:263
int distance(const object *ob1, const object *ob2)
Definition: object.c:3364
object * object_get_env_recursive(object *op)
Definition: object.c:339
method_ret ob_move_on(object *op, object *victim, object *originator)
Definition: ob_methods.c:122
void clean_tmp_map(mapstruct *m)
Definition: map.c:1959
void clear_object(object *op)
Definition: object.c:688
void reset_sleep(void)
Definition: time.c:141
void set_abs_magic(object *op, int magic)
Definition: treasure.c:844
void LOG(LogLevel logLevel, const char *format,...)
Definition: logger.c:63
void free_object(object *ob)
Definition: object.c:1238
void dump_alchemy(void)
Definition: recipe.c:293
void dump_all_maps(void)
Definition: map.c:298
void remove_friendly_object(object *op)
Definition: friend.c:69