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. |
… | |
… | |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
23 | */ |
23 | */ |
24 | |
24 | |
25 | #ifndef LIBPROTO_H_ |
25 | #ifndef LIBPROTO_H_ |
26 | #define LIBPROTO_H_ |
26 | #define LIBPROTO_H_ |
27 | |
|
|
28 | void load_materials (); |
|
|
29 | |
27 | |
30 | /* anim.c */ |
28 | /* anim.c */ |
31 | void free_all_anim (); |
29 | void free_all_anim (); |
32 | void init_anim (); |
30 | void init_anim (); |
33 | int find_animation (const char *name); |
31 | int find_animation (const char *name); |
… | |
… | |
63 | void do_mood_floor (object *op, object *source = 0); |
61 | void do_mood_floor (object *op, object *source = 0); |
64 | object *check_inv_recursive (object *op, const object *trig); |
62 | object *check_inv_recursive (object *op, const object *trig); |
65 | void check_inv (object *op, object *trig); |
63 | void check_inv (object *op, object *trig); |
66 | void verify_button_links (const maptile *map); |
64 | void verify_button_links (const maptile *map); |
67 | /* exp.c */ |
65 | /* exp.c */ |
|
|
66 | int exp_to_level (sint64 exp); |
|
|
67 | sint64 level_to_min_exp (int level); |
68 | int new_exp (const object *ob); |
68 | int new_exp (const object *ob); |
69 | void init_experience (); |
69 | void init_experience (); |
70 | void dump_experience (); |
|
|
71 | /* friend.c */ |
70 | /* friend.c */ |
72 | void add_friendly_object (object *op); |
71 | void add_friendly_object (object *op); |
73 | void remove_friendly_object (object *op); |
72 | void remove_friendly_object (object *op); |
74 | void dump_friendly_objects (); |
73 | void dump_friendly_objects (); |
75 | void clean_friendly_list (); |
74 | void clean_friendly_list (); |
76 | /* glue.c */ |
75 | /* glue.c */ |
77 | void fatal (int err); |
76 | void fatal (const char *msg); |
78 | /* holy.c */ |
77 | /* holy.c */ |
79 | void init_gods (); |
78 | void init_gods (); |
80 | godlink *get_rand_god (); |
79 | godlink *get_rand_god (); |
81 | object *pntr_to_god_obj (godlink *godlnk); |
80 | object *pntr_to_god_obj (godlink *godlnk); |
82 | void dump_gods (); |
81 | void dump_gods (); |
… | |
… | |
103 | int get_power_from_ench (int ench); |
102 | int get_power_from_ench (int ench); |
104 | int calc_item_power (const object *op, int flag); |
103 | int calc_item_power (const object *op, int flag); |
105 | const typedata *get_typedata (int itemtype); |
104 | const typedata *get_typedata (int itemtype); |
106 | const typedata *get_typedata_by_name (const char *name); |
105 | const typedata *get_typedata_by_name (const char *name); |
107 | const char *describe_resistance (const object *op, int newline); |
106 | const char *describe_resistance (const object *op, int newline); |
108 | const char *get_levelnumber (int i); |
107 | const char *ordinal (int i); |
109 | const char *describe_item (const object *op, object *owner); |
108 | const char *describe_item (const object *op, object *owner); |
110 | int is_magical (const object *op); |
109 | int is_magical (const object *op); |
111 | int need_identify (const object *op); |
|
|
112 | void identify (object *op); |
110 | void identify (object *op); |
113 | void examine (object *op, object *tmp); |
111 | void examine (object *op, object *tmp); |
114 | /* links.c */ |
112 | /* links.c */ |
115 | objectlink *get_objectlink (); |
113 | objectlink *get_objectlink (); |
116 | oblinkpt *get_objectlinkpt (); |
114 | oblinkpt *get_objectlinkpt (); |
… | |
… | |
141 | int blocked_link (object *ob, maptile *m, int sx, int sy); |
139 | int blocked_link (object *ob, maptile *m, int sx, int sy); |
142 | /* object.c */ |
140 | /* object.c */ |
143 | char *dump_object (object *op); |
141 | char *dump_object (object *op); |
144 | void dump_me (object *op, char *outstr); |
142 | void dump_me (object *op, char *outstr); |
145 | object *find_object (tag_t i); |
143 | object *find_object (tag_t i); |
|
|
144 | object *find_object_uuid (UUID i); |
146 | object *find_object_name (const char *str); |
145 | object *find_object_name (const char *str); |
147 | void free_all_object_data (); |
146 | void free_all_object_data (); |
148 | void update_turn_face (object *op); |
147 | void update_turn_face (object *op); |
149 | void update_object (object *op, int action); |
148 | void update_object (object *op, int action); |
150 | object *merge_ob (object *op, object *top); |
149 | object *merge_ob (object *op, object *top); |
… | |
… | |
171 | int can_pick (const object *who, const object *item); |
170 | int can_pick (const object *who, const object *item); |
172 | object *find_obj_by_type_subtype (const object *who, int type, int subtype); |
171 | object *find_obj_by_type_subtype (const object *who, int type, int subtype); |
173 | /* path.c */ |
172 | /* path.c */ |
174 | char *path_combine (const char *src, const char *dst); |
173 | char *path_combine (const char *src, const char *dst); |
175 | char *path_combine_and_normalize (const char *src, const char *dst); |
174 | char *path_combine_and_normalize (const char *src, const char *dst); |
176 | /* porting.c */ |
|
|
177 | void remove_directory (const char *path); |
|
|
178 | char *ltostr10 (signed long n); |
|
|
179 | char *doubletostr10 (double v); |
|
|
180 | FILE *open_and_uncompress (const char *name, int flag, int *compressed); |
|
|
181 | void close_and_delete (FILE *fp, int compressed); |
|
|
182 | void make_path_to_file (char *filename); |
|
|
183 | /* player.c */ |
175 | /* player.c */ |
184 | void free_player (player *pl); |
176 | void free_player (player *pl); |
185 | int atnr_is_dragon_enabled (int attacknr); |
177 | int atnr_is_dragon_enabled (int attacknr); |
186 | int is_dragon_pl (const object *op); |
|
|
187 | /* quest.c */ |
178 | /* quest.c */ |
188 | int quest_is_quest_marker (const object *marker, int task); |
179 | int quest_is_quest_marker (const object *marker, int task); |
189 | int quest_is_in_progress (const object *marker, int task); |
180 | int quest_is_in_progress (const object *marker, int task); |
190 | int quest_is_completed (const object *marker, int task); |
181 | int quest_is_completed (const object *marker, int task); |
191 | const char *quest_get_name (const object *marker); |
182 | const char *quest_get_name (const object *marker); |
… | |
… | |
238 | void fix_flesh_item (object *item, object *donor); |
229 | void fix_flesh_item (object *item, object *donor); |
239 | /* utils.c */ |
230 | /* utils.c */ |
240 | int random_roll (int min, int max, const object *op, int goodbad); |
231 | int random_roll (int min, int max, const object *op, int goodbad); |
241 | sint64 random_roll64 (sint64 min, sint64 max, const object *op, int goodbad); |
232 | sint64 random_roll64 (sint64 min, sint64 max, const object *op, int goodbad); |
242 | int die_roll (int num, int size, const object *op, int goodbad); |
233 | int die_roll (int num, int size, const object *op, int goodbad); |
243 | materialtype_t *name_to_material (const shstr_cmp name); |
234 | materialtype_t *name_to_material (const shstr_tmp name); |
244 | void transmute_materialname (object *op, const object *change); |
235 | void transmute_materialname (object *op, const object *change); |
245 | void set_materialname (object *op, int difficulty, materialtype_t *nmt); |
|
|
246 | void strip_media_tag (char *message); |
|
|
247 | void strip_endline (char *buf); |
236 | void strip_endline (char *buf); |
248 | void replace (const char *src, const char *key, const char *replacement, char *result, size_t resultsize); |
237 | void replace (const char *src, const char *key, const char *replacement, char *result, size_t resultsize); |
249 | /* loader.c */ |
238 | /* loader.c */ |
250 | int set_variable (object *op, char *buf); |
239 | int set_variable (object *op, char *buf); |
251 | void init_vars (); |
240 | void init_vars (); |
252 | char *get_ob_diff (object *op, object *op2); |
241 | char *get_ob_diff (object *op, object *op2); |
|
|
242 | bool load_resource_file_ (const char *filename); |
253 | /* map.c */ |
243 | /* map.c */ |
254 | maptile *find_style (const char *dirname, const char *stylename, int difficulty); |
244 | maptile *find_style (const char *dirname, const char *stylename, int difficulty, bool recurse = false); |
255 | object *pick_random_object (maptile *style); |
245 | object *pick_random_object (maptile *style); |
256 | |
246 | |
257 | /* former funcpoint.h */ |
247 | /* former funcpoint.h */ |
258 | /* |
248 | /* |
259 | * These function-pointers are defined in common/glue.c |
249 | * These function-pointers are defined in common/glue.c |