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 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | * |
20 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
22 | */ |
|
|
23 | |
|
|
24 | #ifndef LIBPROTO_H_ |
|
|
25 | #define LIBPROTO_H_ |
23 | |
26 | |
24 | /* anim.c */ |
27 | /* anim.c */ |
25 | extern void free_all_anim(); |
28 | extern void free_all_anim(); |
26 | extern void init_anim(); |
29 | extern void init_anim(); |
27 | extern int find_animation(const char *name); |
30 | extern int find_animation(const char *name); |
… | |
… | |
39 | extern void dump_arch(archetype *at); |
42 | extern void dump_arch(archetype *at); |
40 | extern void dump_all_archetypes(); |
43 | extern void dump_all_archetypes(); |
41 | extern void free_all_archs(); |
44 | extern void free_all_archs(); |
42 | extern void check_generators(); |
45 | extern void check_generators(); |
43 | extern bool load_archetype_file(const char *filename); |
46 | extern bool load_archetype_file(const char *filename); |
44 | extern object *arch_to_object(archetype *at); |
|
|
45 | extern object *create_singularity(const char *name); |
47 | extern object *create_singularity(const char *name); |
46 | extern object *get_archetype(const char *name); |
48 | extern object *get_archetype(const char *name); |
47 | extern unsigned long hasharch(const char *str, int tablesize); |
49 | extern unsigned long hasharch(const char *str, int tablesize); |
48 | extern archetype *type_to_archetype(int type); |
50 | extern archetype *type_to_archetype(int type); |
49 | extern object *clone_arch(int type); |
51 | extern object *clone_arch(int type); |
… | |
… | |
150 | extern void clear_los(player *pl); |
152 | extern void clear_los(player *pl); |
151 | extern int has_carried_lights(const object *op); |
153 | extern int has_carried_lights(const object *op); |
152 | extern void update_los(object *op); |
154 | extern void update_los(object *op); |
153 | extern void update_all_map_los(maptile *map); |
155 | extern void update_all_map_los(maptile *map); |
154 | extern void update_all_los(const maptile *map, int x, int y); |
156 | extern void update_all_los(const maptile *map, int x, int y); |
155 | extern void print_los(object *op); |
|
|
156 | extern void make_sure_seen(const object *op); |
157 | extern void make_sure_seen(const object *op); |
157 | extern void make_sure_not_seen(const object *op); |
158 | extern void make_sure_not_seen(const object *op); |
158 | /* map.c */ |
159 | /* map.c */ |
159 | extern const char *create_pathname (const char *name); |
160 | extern const char *create_pathname (const char *name); |
160 | extern int blocked_link(object *ob, maptile *m, int sx, int sy); |
161 | extern int blocked_link(object *ob, maptile *m, int sx, int sy); |
… | |
… | |
170 | extern void update_object(object *op, int action); |
171 | extern void update_object(object *op, int action); |
171 | extern object *merge_ob(object *op, object *top); |
172 | extern object *merge_ob(object *op, object *top); |
172 | extern object *insert_ob_in_map_at(object *op, maptile *m, object *originator, int flag, int x, int y); |
173 | extern object *insert_ob_in_map_at(object *op, maptile *m, object *originator, int flag, int x, int y); |
173 | extern object *insert_ob_in_map(object *op, maptile *m, object *originator, int flag); |
174 | extern object *insert_ob_in_map(object *op, maptile *m, object *originator, int flag); |
174 | extern void replace_insert_ob_in_map(const char *arch_string, object *op); |
175 | extern void replace_insert_ob_in_map(const char *arch_string, object *op); |
175 | extern object *get_split_ob(object *orig_ob, uint32 nr); |
|
|
176 | extern object *decrease_ob_nr(object *op, uint32 i); |
|
|
177 | extern object *insert_ob_in_ob(object *op, object *where); |
176 | extern object *insert_ob_in_ob(object *op, object *where); |
178 | extern int check_move_on(object *op, object *originator); |
177 | extern int check_move_on(object *op, object *originator); |
179 | extern object *present_arch(const archetype *at, maptile *m, int x, int y); |
178 | extern object *present_arch(const archetype *at, maptile *m, int x, int y); |
180 | extern object *present(unsigned char type, maptile *m, int x, int y); |
179 | extern object *present(unsigned char type, maptile *m, int x, int y); |
181 | extern object *present_in_ob(unsigned char type, const object *op); |
180 | extern object *present_in_ob(unsigned char type, const object *op); |
… | |
… | |
190 | extern int distance(const object *ob1, const object *ob2); |
189 | extern int distance(const object *ob1, const object *ob2); |
191 | extern int find_dir_2(int x, int y); |
190 | extern int find_dir_2(int x, int y); |
192 | extern int dirdiff(int dir1, int dir2); |
191 | extern int dirdiff(int dir1, int dir2); |
193 | extern int can_see_monsterP(maptile *m, int x, int y, int dir); |
192 | extern int can_see_monsterP(maptile *m, int x, int y, int dir); |
194 | extern int can_pick(const object *who, const object *item); |
193 | extern int can_pick(const object *who, const object *item); |
195 | extern object *object_create_clone(object *asrc); |
|
|
196 | extern object *find_obj_by_type_subtype(const object *who, int type, int subtype); |
194 | extern object *find_obj_by_type_subtype(const object *who, int type, int subtype); |
197 | extern key_value *get_ob_key_link(const object *ob, const char *key); |
|
|
198 | extern const char *get_ob_key_value(const object *op, const char *const key); |
|
|
199 | extern int set_ob_key_value_s(object *op, const char *canonical_key, const char *value, int add_key); |
|
|
200 | extern int set_ob_key_value(object *op, const char *key, const char *value, int add_key); |
|
|
201 | /* path.c */ |
195 | /* path.c */ |
202 | extern char *path_combine(const char *src, const char *dst); |
196 | extern char *path_combine(const char *src, const char *dst); |
203 | extern void path_normalize(char *path); |
197 | extern void path_normalize(char *path); |
204 | extern char *path_combine_and_normalize(const char *src, const char *dst); |
198 | extern char *path_combine_and_normalize(const char *src, const char *dst); |
205 | /* porting.c */ |
199 | /* porting.c */ |
… | |
… | |
311 | extern void make_list_like(char *input); |
305 | extern void make_list_like(char *input); |
312 | /* loader.c */ |
306 | /* loader.c */ |
313 | extern int set_variable(object *op, char *buf); |
307 | extern int set_variable(object *op, char *buf); |
314 | extern void init_vars(); |
308 | extern void init_vars(); |
315 | extern char *get_ob_diff(object *op, object *op2); |
309 | extern char *get_ob_diff(object *op, object *op2); |
|
|
310 | /* map.c */ |
|
|
311 | extern maptile *find_style (const char *dirname, const char *stylename, int difficulty); |
|
|
312 | extern object *pick_random_object (maptile *style); |
|
|
313 | |
|
|
314 | /* former funcpoint.h */ |
|
|
315 | /* |
|
|
316 | * These function-pointers are defined in common/glue.c |
|
|
317 | * The functions used to set and initialise them are also there. |
|
|
318 | * |
|
|
319 | * Massive change. Those functions are just defined, no callback, and they should be implemented. |
|
|
320 | * This means glue.c code & such can go away almost entirely. |
|
|
321 | * Ryo 2005-07-15 |
|
|
322 | */ |
|
|
323 | |
|
|
324 | extern void move_apply(object *, object *, object *); |
|
|
325 | extern void draw_info(int, int, object *, const char *); |
|
|
326 | extern void clean_tmp_files(void); |
|
|
327 | extern void fix_auto_apply(maptile *); |
|
|
328 | extern void init_blocksview_players(void); |
|
|
329 | extern void monster_check_apply(object *, object *); |
|
|
330 | extern void process_active_maps(void); |
|
|
331 | extern void remove_friendly_object(object *); |
|
|
332 | extern void update_buttons(maptile *); |
|
|
333 | extern void move_teleporter(object *); |
|
|
334 | extern void move_firewall(object *); |
|
|
335 | extern void move_creator(object *); |
|
|
336 | extern void move_marker(object *); |
|
|
337 | extern void move_duplicator(object *); |
|
|
338 | extern void trap_adjust(object *, int); |
|
|
339 | extern void esrv_send_item(object *, object *); |
|
|
340 | extern void esrv_del_item(player *, int); |
|
|
341 | extern void esrv_update_item(int, object *, object *); |
|
|
342 | extern void esrv_update_spells(player *); |
|
|
343 | extern void set_darkness_map(maptile *m); |
|
|
344 | extern void dragon_ability_gain(object *, int, int); |
|
|
345 | extern void weather_effect(const char *); |
|
|
346 | extern object * find_skill_by_number(object *, int); |
|
|
347 | |
|
|
348 | #endif |
|
|
349 | |