1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * option) any later version. |
11 | * option) any later version. |
… | |
… | |
24 | |
24 | |
25 | #ifndef LIBPROTO_H_ |
25 | #ifndef LIBPROTO_H_ |
26 | #define LIBPROTO_H_ |
26 | #define LIBPROTO_H_ |
27 | |
27 | |
28 | /* anim.c */ |
28 | /* anim.c */ |
29 | extern void free_all_anim (); |
29 | void free_all_anim (); |
30 | extern void init_anim (); |
30 | void init_anim (); |
31 | extern int find_animation (const char *name); |
31 | int find_animation (const char *name); |
32 | extern void animate_object (object *op, int dir); |
32 | void animate_object (object *op, int dir); |
33 | /* arch.c */ |
33 | /* arch.c */ |
34 | extern archetype *find_archetype_by_object_name (const char *name); |
34 | archetype *find_archetype_by_object_name (const char *name); |
35 | extern archetype *find_archetype_by_object_type_name (int type, const char *name); |
35 | archetype *find_archetype_by_object_type_name (int type, const char *name); |
36 | extern object *get_archetype_by_skill_name (const char *skill, int type); |
36 | object *get_archetype_by_skill_name (const char *skill, int type); |
37 | extern archetype *get_archetype_by_type_subtype (int type, int subtype); |
37 | archetype *get_archetype_by_type_subtype (int type, int subtype); |
38 | extern object *get_archetype_by_object_name (const char *name); |
38 | object *get_archetype_by_object_name (const char *name); |
39 | extern object *find_best_weapon_used_match (object *pl, const char *params); |
39 | object *find_best_weapon_used_match (object *pl, const char *params); |
40 | extern int item_matched_string (object *pl, object *op, const char *name); |
40 | int item_matched_string (object *pl, object *op, const char *name); |
41 | extern void arch_info (object *op); |
41 | void arch_info (object *op); |
42 | extern void clear_archetable (); |
42 | void clear_archetable (); |
43 | extern void dump_arch (archetype *at); |
43 | void dump_arch (archetype *at); |
44 | extern void dump_all_archetypes (); |
44 | void dump_all_archetypes (); |
45 | extern void free_all_archs (); |
45 | void free_all_archs (); |
46 | extern void check_generators (); |
46 | void check_generators (); |
47 | extern bool load_archetype_file (const char *filename); |
47 | bool load_archetype_file (const char *filename); |
48 | extern object *create_singularity (const char *name); |
|
|
49 | extern object *get_archetype (const char *name); |
48 | object *get_archetype (const char *name); |
50 | extern unsigned long hasharch (const char *str, int tablesize); |
49 | unsigned long hasharch (const char *str, int tablesize); |
51 | extern archetype *type_to_archetype (int type); |
|
|
52 | extern object *clone_arch (int type); |
50 | object *clone_arch (int type); |
53 | extern object *object_create_arch (archetype *at); |
51 | object *object_create_arch (archetype *at); |
54 | /* button.c */ |
52 | /* button.c */ |
55 | extern void push_button (object *op, object *originator); |
53 | void push_button (object *op, object *originator); |
56 | extern void update_button (object *op, object *originator); |
54 | void update_button (object *op, object *originator); |
57 | extern void use_trigger (object *op, object *originator); |
55 | void use_trigger (object *op, object *originator); |
58 | extern void animate_turning (object *op); |
56 | void animate_turning (object *op); |
59 | extern int check_altar_sacrifice (object *altar, object *sacrifice, object *originator = 0); |
57 | int check_altar_sacrifice (object *altar, object *sacrifice, object *originator = 0); |
60 | extern int operate_altar (object *altar, object **sacrifice, object *originator = 0); |
58 | int operate_altar (object *altar, object **sacrifice, object *originator = 0); |
61 | extern void trigger_move (object *op, int state, object *originator); |
|
|
62 | extern int check_trigger (object *op, object *cause, object *originator = 0); |
59 | int check_trigger (object *op, object *cause, object *originator = 0); |
63 | extern int get_button_value (const object *button); |
60 | int get_button_value (const object *button); |
64 | extern void do_mood_floor (object *op, object *source = 0); |
61 | void do_mood_floor (object *op, object *source = 0); |
65 | extern object *check_inv_recursive (object *op, const object *trig); |
62 | object *check_inv_recursive (object *op, const object *trig); |
66 | extern void check_inv (object *op, object *trig); |
63 | void check_inv (object *op, object *trig); |
67 | extern void verify_button_links (const maptile *map); |
64 | void verify_button_links (const maptile *map); |
68 | /* exp.c */ |
65 | /* exp.c */ |
|
|
66 | int exp_to_level (sint64 exp); |
|
|
67 | sint64 level_to_min_exp (int level); |
69 | extern int new_exp (const object *ob); |
68 | int new_exp (const object *ob); |
70 | extern int has_ability (const object *ob); |
|
|
71 | extern void init_experience (); |
69 | void init_experience (); |
72 | extern void dump_experience (); |
|
|
73 | /* friend.c */ |
70 | /* friend.c */ |
74 | extern void add_friendly_object (object *op); |
71 | void add_friendly_object (object *op); |
75 | extern void remove_friendly_object (object *op); |
72 | void remove_friendly_object (object *op); |
76 | extern void dump_friendly_objects (); |
73 | void dump_friendly_objects (); |
77 | extern void clean_friendly_list (); |
74 | void clean_friendly_list (); |
78 | extern int is_friendly (const object *op); |
|
|
79 | /* glue.c */ |
|
|
80 | extern void fatal (int err); |
|
|
81 | /* holy.c */ |
75 | /* holy.c */ |
82 | extern void init_gods (); |
76 | void init_gods (); |
83 | extern void add_god_to_list (archetype *god_arch); |
|
|
84 | extern int baptize_altar (object *op); |
|
|
85 | extern godlink *get_rand_god (); |
77 | godlink *get_rand_god (); |
86 | extern object *pntr_to_god_obj (godlink *godlnk); |
78 | object *pntr_to_god_obj (godlink *godlnk); |
87 | extern void free_all_god (); |
|
|
88 | extern void dump_gods (); |
79 | void dump_gods (); |
89 | /* info.c */ |
80 | /* info.c */ |
90 | extern void dump_abilities (); |
81 | void dump_abilities (); |
91 | extern void print_monsters (); |
82 | void print_monsters (); |
92 | extern void bitstostring (long bits, int num, char *str); |
83 | void bitstostring (long bits, int num, char *str); |
93 | /* image.c */ |
84 | /* image.c */ |
94 | extern void ReadBmapNames (); |
85 | void ReadBmapNames (); |
95 | extern int FindFace (const char *name, int error); |
86 | int FindFace (const char *name, int error); |
96 | extern int ReadSmooth (); |
87 | int ReadSmooth (); |
97 | extern int FindSmooth (uint16 face, uint16 *smoothed); |
88 | int FindSmooth (uint16 face, uint16 *smoothed); |
98 | extern void free_all_images (); |
89 | void free_all_images (); |
99 | /* init.c */ |
90 | /* init.c */ |
100 | extern void init_library (); |
91 | void init_library (); |
101 | extern void init_environ (); |
92 | void init_environ (); |
102 | extern void init_globals (); |
93 | void init_globals (); |
103 | extern void init_objects (); |
94 | void init_objects (); |
104 | extern void init_defaults (); |
95 | void init_defaults (); |
105 | extern void init_dynamic (); |
96 | void init_dynamic (); |
106 | extern void init_clocks (); |
97 | void init_clocks (); |
107 | extern void init_attackmess (); |
98 | void init_attackmess (); |
108 | /* item.c */ |
99 | /* item.c */ |
109 | extern int get_power_from_ench (int ench); |
100 | int get_power_from_ench (int ench); |
110 | extern int calc_item_power (const object *op, int flag); |
101 | int calc_item_power (const object *op, int flag); |
111 | extern const typedata *get_typedata (int itemtype); |
102 | const typedata *get_typedata (int itemtype); |
112 | extern const typedata *get_typedata_by_name (const char *name); |
103 | const typedata *get_typedata_by_name (const char *name); |
113 | extern const char *describe_resistance (const object *op, int newline); |
104 | const char *describe_resistance (const object *op, int newline); |
114 | extern const char *get_levelnumber (int i); |
105 | const char *ordinal (int i); |
115 | extern const char *get_number (int i); |
|
|
116 | extern const char *ring_desc (const object *op); |
|
|
117 | extern const char *describe_item (const object *op, object *owner); |
106 | const char *describe_item (const object *op, object *owner); |
118 | extern int is_magical (const object *op); |
107 | int is_magical (const object *op); |
119 | extern int need_identify (const object *op); |
|
|
120 | extern void identify (object *op); |
108 | void identify (object *op); |
|
|
109 | void examine (object *op, object *tmp); |
121 | /* links.c */ |
110 | /* links.c */ |
122 | extern objectlink *get_objectlink (); |
111 | objectlink *get_objectlink (); |
123 | extern oblinkpt *get_objectlinkpt (); |
112 | oblinkpt *get_objectlinkpt (); |
124 | extern void free_objectlink (objectlink *ol); |
113 | void free_objectlink (objectlink *ol); |
125 | extern void free_objectlinkpt (oblinkpt *obp); |
114 | void free_objectlinkpt (oblinkpt *obp); |
126 | /* living.c */ |
115 | /* living.c */ |
127 | extern void change_attr_value (living *stats, int attr, sint8 value); |
116 | void change_attr_value (living *stats, int attr, sint8 value); |
128 | extern void check_stat_bounds (living *stats); |
117 | void check_stat_bounds (living *stats); |
129 | extern int change_abil (object *op, object *tmp); |
118 | int change_abil (object *op, object *tmp); |
130 | extern int allowed_class (const object *op); |
119 | int allowed_class (const object *op); |
131 | extern void set_dragon_name (object *pl, const object *abil, const object *skin); |
120 | void set_dragon_name (object *pl, const object *abil, const object *skin); |
132 | extern void dragon_level_gain (object *who); |
|
|
133 | extern object *give_skill_by_name (object *op, const char *skill_name); |
121 | object *give_skill_by_name (object *op, const char *skill_name); |
134 | extern void player_lvl_adj (object *who, object *op); |
122 | void player_lvl_adj (object *who, object *op); |
135 | extern sint64 level_exp (int level, double expmul); |
123 | sint64 level_exp (int level, double expmul); |
136 | extern void calc_perm_exp (object *op); |
124 | void calc_perm_exp (object *op); |
137 | extern sint64 check_exp_loss (const object *op, sint64 exp); |
|
|
138 | extern sint64 check_exp_adjust (const object *op, sint64 exp); |
125 | sint64 check_exp_adjust (const object *op, sint64 exp); |
139 | extern void change_exp (object *op, sint64 exp, const char *skill_name, int flag); |
126 | void change_exp (object *op, sint64 exp, shstr_tmp skill_name, int flag); |
140 | extern void apply_death_exp_penalty (object *op); |
127 | void apply_death_exp_penalty (object *op); |
141 | extern int did_make_save (const object *op, int level, int bonus); |
128 | int did_make_save (const object *op, int level, int bonus); |
142 | /* los.c */ |
129 | /* los.c */ |
143 | extern void init_block (); |
130 | void init_block (); |
144 | extern void update_all_map_los (maptile *map); |
131 | void update_all_map_los (maptile *map); |
145 | extern void update_all_los (const maptile *map, int x, int y); |
132 | void update_all_los (const maptile *map, int x, int y); |
146 | extern void make_sure_seen (const object *op); |
133 | void make_sure_seen (const object *op); |
147 | extern void make_sure_not_seen (const object *op); |
134 | void make_sure_not_seen (const object *op); |
148 | /* map.c */ |
135 | /* map.c */ |
149 | extern const char *create_pathname (const char *name); |
136 | const char *create_pathname (const char *name); |
150 | extern int blocked_link (object *ob, maptile *m, int sx, int sy); |
137 | int blocked_link (object *ob, maptile *m, int sx, int sy); |
151 | extern void fix_container (object *container); |
|
|
152 | /* object.c */ |
138 | /* object.c */ |
153 | extern char *dump_object (object *op); |
139 | char *dump_object (object *op); |
154 | extern void dump_me (object *op, char *outstr); |
140 | void dump_me (object *op, char *outstr); |
155 | extern object *get_nearest_part (object *op, const object *pl); |
|
|
156 | extern object *find_object (tag_t i); |
141 | object *find_object (tag_t i); |
|
|
142 | object *find_object_uuid (UUID i); |
157 | extern object *find_object_name (const char *str); |
143 | object *find_object_name (const char *str); |
158 | extern void free_all_object_data (); |
144 | void free_all_object_data (); |
159 | extern void update_turn_face (object *op); |
145 | void update_turn_face (object *op); |
160 | extern void update_object (object *op, int action); |
146 | void update_object (object *op, int action); |
161 | extern object *merge_ob (object *op, object *top); |
147 | object *merge_ob (object *op, object *top); |
162 | extern object *insert_ob_in_map_at (object *op, maptile *m, object *originator, int flag, int x, int y); |
148 | object *insert_ob_in_map_at (object *op, maptile *m, object *originator, int flag, int x, int y); |
163 | extern object *insert_ob_in_map (object *op, maptile *m, object *originator, int flag); |
149 | object *insert_ob_in_map (object *op, maptile *m, object *originator, int flag); |
164 | extern void replace_insert_ob_in_map (shstr_tmp archname, object *op); |
150 | void replace_insert_ob_in_map (shstr_tmp archname, object *op); |
165 | extern object *insert_ob_in_ob (object *op, object *where); |
151 | object *insert_ob_in_ob (object *op, object *where); |
166 | extern int check_move_on (object *op, object *originator); |
152 | int check_move_on (object *op, object *originator, int flags = 0); |
167 | extern object *present_arch (const archetype *at, maptile *m, int x, int y); |
153 | object *present_arch (const archetype *at, maptile *m, int x, int y); |
168 | extern object *present (unsigned char type, maptile *m, int x, int y); |
154 | object *present (unsigned char type, maptile *m, int x, int y); |
169 | extern object *present_in_ob (unsigned char type, const object *op); |
155 | object *present_in_ob (unsigned char type, const object *op); |
170 | extern object *present_in_ob_by_name (int type, const char *str, const object *op); |
156 | object *present_in_ob_by_name (int type, const char *str, const object *op); |
171 | extern object *present_arch_in_ob (const archetype *at, const object *op); |
157 | object *present_arch_in_ob (const archetype *at, const object *op); |
172 | extern void flag_inv (object *op, int flag); |
158 | void flag_inv (object *op, int flag); |
173 | extern void unflag_inv (object *op, int flag); |
159 | void unflag_inv (object *op, int flag); |
174 | extern int find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop); |
160 | int find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop); |
175 | extern int find_first_free_spot (const object *ob, maptile *m, int x, int y); |
161 | int find_first_free_spot (const object *ob, maptile *m, int x, int y); |
176 | extern void get_search_arr (int *search_arr); |
162 | void get_search_arr (int *search_arr); |
177 | extern int find_dir (maptile *m, int x, int y, object *exclude); |
163 | int find_dir (maptile *m, int x, int y, object *exclude); |
178 | extern int distance (const object *ob1, const object *ob2); |
164 | int distance (const object *ob1, const object *ob2); |
179 | extern int find_dir_2 (int x, int y); |
165 | int find_dir_2 (int x, int y); |
180 | extern int dirdiff (int dir1, int dir2); |
166 | int dirdiff (int dir1, int dir2); |
181 | extern int can_see_monsterP (maptile *m, int x, int y, int dir); |
167 | int can_see_monsterP (maptile *m, int x, int y, int dir); |
182 | extern int can_pick (const object *who, const object *item); |
168 | int can_pick (const object *who, const object *item); |
183 | extern object *find_obj_by_type_subtype (const object *who, int type, int subtype); |
169 | object *find_obj_by_type_subtype (const object *who, int type, int subtype); |
184 | /* path.c */ |
170 | /* path.c */ |
185 | extern char *path_combine (const char *src, const char *dst); |
171 | char *path_combine (const char *src, const char *dst); |
186 | extern void path_normalize (char *path); |
|
|
187 | extern char *path_combine_and_normalize (const char *src, const char *dst); |
172 | char *path_combine_and_normalize (const char *src, const char *dst); |
188 | /* porting.c */ |
|
|
189 | extern void remove_directory (const char *path); |
|
|
190 | extern char *strcasestr_local (const char *s, const char *find); |
|
|
191 | extern char *ltostr10 (signed long n); |
|
|
192 | extern char *doubletostr10 (double v); |
|
|
193 | extern FILE *open_and_uncompress (const char *name, int flag, int *compressed); |
|
|
194 | extern void close_and_delete (FILE *fp, int compressed); |
|
|
195 | extern void make_path_to_file (char *filename); |
|
|
196 | /* player.c */ |
173 | /* player.c */ |
197 | extern void free_player (player *pl); |
174 | void free_player (player *pl); |
198 | extern int atnr_is_dragon_enabled (int attacknr); |
175 | int atnr_is_dragon_enabled (int attacknr); |
199 | extern int is_dragon_pl (const object *op); |
|
|
200 | /* quest.c */ |
176 | /* quest.c */ |
201 | extern int quest_is_quest_marker (const object *marker, int task); |
177 | int quest_is_quest_marker (const object *marker, int task); |
202 | extern int quest_is_in_progress (const object *marker, int task); |
178 | int quest_is_in_progress (const object *marker, int task); |
203 | extern int quest_is_completed (const object *marker, int task); |
179 | int quest_is_completed (const object *marker, int task); |
204 | extern const char *quest_get_name (const object *marker); |
180 | const char *quest_get_name (const object *marker); |
205 | extern object *quest_get_player_quest (const object *pl, const char *name, const char *name_pl); |
181 | object *quest_get_player_quest (const object *pl, const char *name, const char *name_pl); |
206 | extern object *quest_get_override (const object *ob, const object *pl); |
182 | object *quest_get_override (const object *ob, const object *pl); |
207 | extern const char *quest_get_override_slaying (const object *ob, const object *pl); |
183 | const char *quest_get_override_slaying (const object *ob, const object *pl); |
208 | extern const char *quest_get_override_msg (const object *ob, const object *pl); |
184 | const char *quest_get_override_msg (const object *ob, const object *pl); |
209 | extern void quest_apply_items (object *wrapper, player *pl); |
185 | void quest_apply_items (object *wrapper, player *pl); |
210 | extern int quest_on_activate (object *ob, player *pl); |
186 | int quest_on_activate (object *ob, player *pl); |
211 | extern int quest_is_override_compatible (const object *marker, const object *pl); |
187 | int quest_is_override_compatible (const object *marker, const object *pl); |
212 | /* readable.c */ |
188 | /* readable.c */ |
213 | extern void init_readable (); |
189 | void init_readable (); |
214 | extern object *get_random_mon (int level); |
190 | object *get_random_mon (int level); |
215 | extern void tailor_readable_ob (object *book, int msg_type); |
191 | void tailor_readable_ob (object *book, int msg_type); |
216 | extern void free_all_readable (); |
|
|
217 | extern void write_book_archive (); |
192 | void write_book_archive (); |
218 | extern readable_message_type *get_readable_message_type (object *readable); |
193 | readable_message_type *get_readable_message_type (object *readable); |
219 | /* recipe.c */ |
194 | /* recipe.c */ |
220 | extern recipelist *get_formulalist (int i); |
195 | recipelist *get_formulalist (int i); |
221 | extern void init_formulae (); |
196 | void init_formulae (); |
222 | extern void check_formulae (); |
|
|
223 | extern void dump_alchemy (); |
197 | void dump_alchemy (); |
224 | extern archetype *find_treasure_by_name (const treasure *t, const char *name, int depth); |
|
|
225 | extern long find_ingred_cost (const char *name); |
|
|
226 | extern void dump_alchemy_costs (); |
198 | void dump_alchemy_costs (); |
227 | extern const char *ingred_name (const char *name); |
|
|
228 | extern int strtoint (const char *buf); |
199 | int strtoint (const char *buf); |
229 | extern artifact *locate_recipe_artifact (const recipe *rp, size_t idx); |
200 | artifact *locate_recipe_artifact (const recipe *rp, size_t idx); |
230 | extern int numb_ingred (const char *buf); |
|
|
231 | extern recipelist *get_random_recipelist (); |
|
|
232 | extern recipe *get_random_recipe (recipelist *rpl); |
201 | recipe *get_random_recipe (recipelist *rpl); |
233 | extern void free_all_recipes (); |
|
|
234 | /* region.c */ |
202 | /* region.c */ |
235 | extern object *get_jail_exit (object *op); |
203 | object *get_jail_exit (object *op); |
236 | extern void init_regions (); |
|
|
237 | /* shstr.c */ |
204 | /* shstr.c */ |
238 | extern int buf_overflow (const char *buf1, const char *buf2, int bufsize); |
205 | int buf_overflow (const char *buf1, const char *buf2, int bufsize); |
239 | /* time.c */ |
206 | /* time.c */ |
240 | extern void reset_sleep (); |
207 | void reset_sleep (); |
241 | extern void log_time (long process_utime); |
208 | void log_time (long process_utime); |
242 | extern int enough_elapsed_time (); |
209 | int enough_elapsed_time (); |
243 | extern void sleep_delta (); |
210 | void sleep_delta (); |
244 | extern void get_tod (timeofday_t *tod); |
211 | void get_tod (timeofday_t *tod); |
245 | extern void print_tod (object *op); |
212 | void print_tod (object *op); |
246 | extern void time_info (object *op); |
213 | void time_info (object *op); |
247 | /* treasure.c */ |
214 | /* treasure.c */ |
248 | extern bool load_treasure_file (const char *filename); |
215 | bool load_treasure_file (const char *filename); |
249 | extern object *generate_treasure (treasurelist *t, int difficulty); |
216 | object *generate_treasure (treasurelist *t, int difficulty); |
250 | extern int level_for_item (const object *op, int difficulty); |
|
|
251 | extern int magic_from_difficulty (int difficulty); |
|
|
252 | extern void set_abs_magic (object *op, int magic); |
217 | void set_abs_magic (object *op, int magic); |
253 | extern void set_ring_bonus (object *op, int bonus); |
|
|
254 | extern int get_magic (int diff); |
|
|
255 | extern void fix_generated_item (object *op, object *creator, int difficulty, int max_magic, int flags); |
218 | void fix_generated_item (object *op, object *creator, int difficulty, int max_magic, int flags); |
256 | extern artifactlist *find_artifactlist (int type); |
219 | artifactlist *find_artifactlist (int type); |
257 | extern void dump_artifacts (); |
220 | void dump_artifacts (); |
258 | extern void dump_monster_treasure_rec (const char *name, treasure *t, int depth); |
221 | void dump_monster_treasure_rec (const char *name, treasure *t, int depth); |
259 | extern void dump_monster_treasure (const char *name); |
222 | void dump_monster_treasure (const char *name); |
260 | extern void init_artifacts (); |
223 | void init_artifacts (); |
261 | extern void add_abilities (object *op, object *change); |
224 | void add_abilities (object *op, object *change); |
262 | extern void give_artifact_abilities (object *op, object *artifct); |
225 | void give_artifact_abilities (object *op, object *artifct); |
263 | extern void generate_artifact (object *op, int difficulty); |
226 | void generate_artifact (object *op, int difficulty); |
264 | extern void fix_flesh_item (object *item, object *donor); |
227 | void fix_flesh_item (object *item, object *donor); |
265 | extern int special_potion (object *op); |
|
|
266 | extern void free_treasurestruct (treasure *t); |
|
|
267 | extern void free_charlinks (linked_char *lc); |
|
|
268 | extern void free_artifact (artifact *at); |
|
|
269 | extern void free_artifactlist (artifactlist *al); |
|
|
270 | extern void free_all_treasures (); |
|
|
271 | /* utils.c */ |
228 | /* utils.c */ |
272 | extern int random_roll (int min, int max, const object *op, int goodbad); |
229 | int random_roll (int min, int max, const object *op, bool prefer_high); |
273 | extern sint64 random_roll64 (sint64 min, sint64 max, const object *op, int goodbad); |
230 | sint64 random_roll64 (sint64 min, sint64 max, const object *op, bool prefer_high); |
274 | extern int die_roll (int num, int size, const object *op, int goodbad); |
231 | int die_roll (int num, int size, const object *op, bool prefer_high); |
275 | extern materialtype_t *name_to_material (const shstr_cmp name); |
|
|
276 | extern void transmute_materialname (object *op, const object *change); |
232 | void transmute_materialname (object *op, const object *change); |
277 | extern void set_materialname (object *op, int difficulty, materialtype_t *nmt); |
|
|
278 | extern void strip_media_tag (char *message); |
|
|
279 | extern const char *strrstr (const char *haystack, const char *needle); |
|
|
280 | extern void strip_endline (char *buf); |
233 | void strip_endline (char *buf); |
281 | extern void replace (const char *src, const char *key, const char *replacement, char *result, size_t resultsize); |
234 | void replace (const char *src, const char *key, const char *replacement, char *result, size_t resultsize); |
282 | /* loader.c */ |
235 | /* loader.c */ |
283 | extern int set_variable (object *op, char *buf); |
236 | int set_variable (object *op, char *buf); |
284 | extern void init_vars (); |
237 | void init_vars (); |
285 | extern char *get_ob_diff (object *op, object *op2); |
238 | char *get_ob_diff (object *op, object *op2); |
|
|
239 | bool load_resource_file_ (const char *filename); |
286 | /* map.c */ |
240 | /* map.c */ |
287 | extern maptile *find_style (const char *dirname, const char *stylename, int difficulty); |
241 | maptile *find_style (const char *dirname, const char *stylename, int difficulty, bool recurse = false); |
288 | extern object *pick_random_object (maptile *style); |
242 | object *pick_random_object (maptile *style); |
289 | |
243 | |
290 | /* former funcpoint.h */ |
244 | /* former funcpoint.h */ |
291 | /* |
245 | /* |
292 | * These function-pointers are defined in common/glue.c |
246 | * These function-pointers are defined in common/glue.c |
293 | * The functions used to set and initialise them are also there. |
247 | * The functions used to set and initialise them are also there. |
… | |
… | |
295 | * Massive change. Those functions are just defined, no callback, and they should be implemented. |
249 | * Massive change. Those functions are just defined, no callback, and they should be implemented. |
296 | * This means glue.c code & such can go away almost entirely. |
250 | * This means glue.c code & such can go away almost entirely. |
297 | * Ryo 2005-07-15 |
251 | * Ryo 2005-07-15 |
298 | */ |
252 | */ |
299 | |
253 | |
300 | extern void move_apply (object *, object *, object *); |
254 | void move_apply (object *, object *, object *); |
301 | extern void draw_info (int, int, object *, const char *); |
255 | void draw_info (int, int, object *, const char *); |
302 | extern void clean_tmp_files (void); |
256 | void clean_tmp_files (); |
303 | extern void fix_auto_apply (maptile *); |
257 | void fix_auto_apply (maptile *); |
304 | extern void init_blocksview_players (void); |
258 | void init_blocksview_players (); |
305 | extern void monster_check_apply (object *, object *); |
259 | void monster_check_apply (object *, object *); |
306 | extern void process_active_maps (void); |
260 | void process_active_maps (); |
307 | extern void remove_friendly_object (object *); |
261 | void remove_friendly_object (object *); |
308 | extern void update_buttons (maptile *); |
262 | void update_buttons (maptile *); |
309 | extern void move_teleporter (object *); |
263 | void move_teleporter (object *); |
310 | extern void move_firewall (object *); |
264 | void move_firewall (object *); |
311 | extern void move_creator (object *); |
265 | void move_creator (object *); |
312 | extern void move_marker (object *); |
266 | void move_marker (object *); |
313 | extern void move_duplicator (object *); |
267 | void move_duplicator (object *); |
314 | extern void trap_adjust (object *, int); |
268 | void trap_adjust (object *, int); |
315 | extern void esrv_send_item (object *, object *); |
269 | void esrv_send_item (object *, object *); |
316 | extern void esrv_del_item (player *, int); |
270 | void esrv_del_item (player *, int); |
317 | extern void esrv_update_item (int, object *, object *); |
271 | void esrv_update_item (int, object *, object *); |
318 | extern void esrv_update_spells (player *); |
272 | void esrv_update_spells (player *); |
319 | extern void set_darkness_map (maptile *m); |
|
|
320 | extern void dragon_ability_gain (object *, int, int); |
273 | void dragon_ability_gain (object *, int, int); |
321 | extern void weather_effect (const char *); |
|
|
322 | extern object * find_skill_by_number (object *, int); |
274 | object * find_skill_by_number (object *, int); |
323 | |
275 | |
324 | #endif |
276 | #endif |
325 | |
277 | |