ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/libproto.h
(Generate patch)

Comparing deliantra/server/include/libproto.h (file contents):
Revision 1.45 by root, Mon Apr 16 11:09:31 2007 UTC vs.
Revision 1.64 by root, Sat Dec 20 02:32:31 2008 UTC

1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 *
4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 *
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
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
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/>.
20 *
21 * The authors can be reached via e-mail to <support@deliantra.net>
22 */
23
24#ifndef LIBPROTO_H_
25#define LIBPROTO_H_
26
1/* anim.c */ 27/* anim.c */
2extern void free_all_anim(); 28extern void free_all_anim();
3extern void init_anim(); 29extern void init_anim();
4extern int find_animation(const char *name); 30extern int find_animation(const char *name);
5extern void animate_object(object *op, int dir); 31extern void animate_object(object *op, int dir);
16extern void dump_arch(archetype *at); 42extern void dump_arch(archetype *at);
17extern void dump_all_archetypes(); 43extern void dump_all_archetypes();
18extern void free_all_archs(); 44extern void free_all_archs();
19extern void check_generators(); 45extern void check_generators();
20extern bool load_archetype_file(const char *filename); 46extern bool load_archetype_file(const char *filename);
21extern object *arch_to_object(archetype *at);
22extern object *create_singularity(const char *name); 47extern object *create_singularity(const char *name);
23extern object *get_archetype(const char *name); 48extern object *get_archetype(const char *name);
24extern unsigned long hasharch(const char *str, int tablesize); 49extern unsigned long hasharch(const char *str, int tablesize);
25extern archetype *type_to_archetype(int type); 50extern archetype *type_to_archetype(int type);
26extern object *clone_arch(int type); 51extern object *clone_arch(int type);
105extern objectlink *get_objectlink(); 130extern objectlink *get_objectlink();
106extern oblinkpt *get_objectlinkpt(); 131extern oblinkpt *get_objectlinkpt();
107extern void free_objectlink(objectlink *ol); 132extern void free_objectlink(objectlink *ol);
108extern void free_objectlinkpt(oblinkpt *obp); 133extern void free_objectlinkpt(oblinkpt *obp);
109/* living.c */ 134/* living.c */
110extern void set_attr_value(living *stats, int attr, sint8 value);
111extern void change_attr_value(living *stats, int attr, sint8 value); 135extern void change_attr_value(living *stats, int attr, sint8 value);
112extern sint8 get_attr_value(const living *stats, int attr);
113extern void check_stat_bounds(living *stats); 136extern void check_stat_bounds(living *stats);
114extern int change_abil(object *op, object *tmp); 137extern int change_abil(object *op, object *tmp);
115extern int allowed_class(const object *op); 138extern int allowed_class(const object *op);
116extern void set_dragon_name(object *pl, const object *abil, const object *skin); 139extern void set_dragon_name(object *pl, const object *abil, const object *skin);
117extern void dragon_level_gain(object *who); 140extern void dragon_level_gain(object *who);
124extern void change_exp(object *op, sint64 exp, const char *skill_name, int flag); 147extern void change_exp(object *op, sint64 exp, const char *skill_name, int flag);
125extern void apply_death_exp_penalty(object *op); 148extern void apply_death_exp_penalty(object *op);
126extern int did_make_save(const object *op, int level, int bonus); 149extern int did_make_save(const object *op, int level, int bonus);
127/* los.c */ 150/* los.c */
128extern void init_block(); 151extern void init_block();
129extern void clear_los(object *op);
130extern int has_carried_lights(const object *op); 152extern int has_carried_lights(const object *op);
131extern void update_los(object *op); 153extern void update_los(object *op);
132extern void update_all_map_los(maptile *map); 154extern void update_all_map_los(maptile *map);
133extern void update_all_los(const maptile *map, int x, int y); 155extern void update_all_los(const maptile *map, int x, int y);
134extern void print_los(object *op);
135extern void make_sure_seen(const object *op); 156extern void make_sure_seen(const object *op);
136extern void make_sure_not_seen(const object *op); 157extern void make_sure_not_seen(const object *op);
137/* map.c */ 158/* map.c */
138extern const char *create_pathname (const char *name); 159extern const char *create_pathname (const char *name);
139extern int check_path(const char *name, int prepend_dir);
140extern int blocked_link(object *ob, maptile *m, int sx, int sy); 160extern int blocked_link(object *ob, maptile *m, int sx, int sy);
141extern void fix_container(object *container); 161extern void fix_container(object *container);
142/* object.c */ 162/* object.c */
143extern signed long sum_weight(object *op);
144extern object *object_get_env_recursive(object *op);
145extern char *dump_object(object *op); 163extern char *dump_object(object *op);
146extern void dump_me(object *op, char *outstr); 164extern void dump_me(object *op, char *outstr);
147extern object *get_nearest_part(object *op, const object *pl); 165extern object *get_nearest_part(object *op, const object *pl);
148extern object *find_object(tag_t i); 166extern object *find_object(tag_t i);
149extern object *find_object_name(const char *str); 167extern object *find_object_name(const char *str);
150extern void free_all_object_data(); 168extern void free_all_object_data();
151extern void update_turn_face(object *op); 169extern void update_turn_face(object *op);
152extern void update_object(object *op, int action); 170extern void update_object(object *op, int action);
153extern void sub_weight(object *op, signed long weight);
154extern object *merge_ob(object *op, object *top); 171extern object *merge_ob(object *op, object *top);
155extern object *insert_ob_in_map_at(object *op, maptile *m, object *originator, int flag, int x, int y); 172extern object *insert_ob_in_map_at(object *op, maptile *m, object *originator, int flag, int x, int y);
156extern object *insert_ob_in_map(object *op, maptile *m, object *originator, int flag); 173extern object *insert_ob_in_map(object *op, maptile *m, object *originator, int flag);
157extern void replace_insert_ob_in_map(const char *arch_string, object *op); 174extern void replace_insert_ob_in_map(const char *arch_string, object *op);
158extern object *get_split_ob(object *orig_ob, uint32 nr);
159extern object *decrease_ob_nr(object *op, uint32 i);
160extern void add_weight(object *op, signed long weight);
161extern object *insert_ob_in_ob(object *op, object *where); 175extern object *insert_ob_in_ob(object *op, object *where);
162extern int check_move_on(object *op, object *originator); 176extern int check_move_on(object *op, object *originator);
163extern object *present_arch(const archetype *at, maptile *m, int x, int y); 177extern object *present_arch(const archetype *at, maptile *m, int x, int y);
164extern object *present(unsigned char type, maptile *m, int x, int y); 178extern object *present(unsigned char type, maptile *m, int x, int y);
165extern object *present_in_ob(unsigned char type, const object *op); 179extern object *present_in_ob(unsigned char type, const object *op);
166extern object *present_in_ob_by_name(int type, const char *str, const object *op); 180extern object *present_in_ob_by_name(int type, const char *str, const object *op);
167extern object *present_arch_in_ob(const archetype *at, const object *op); 181extern object *present_arch_in_ob(const archetype *at, const object *op);
168extern void flag_inv(object *op, int flag); 182extern void flag_inv(object *op, int flag);
169extern void unflag_inv(object *op, int flag); 183extern void unflag_inv(object *op, int flag);
170extern void set_cheat(object *op);
171extern int find_free_spot(const object *ob, maptile *m, int x, int y, int start, int stop); 184extern int find_free_spot(const object *ob, maptile *m, int x, int y, int start, int stop);
172extern int find_first_free_spot(const object *ob, maptile *m, int x, int y); 185extern int find_first_free_spot(const object *ob, maptile *m, int x, int y);
173extern void get_search_arr(int *search_arr); 186extern void get_search_arr(int *search_arr);
174extern int find_dir(maptile *m, int x, int y, object *exclude); 187extern int find_dir(maptile *m, int x, int y, object *exclude);
175extern int distance(const object *ob1, const object *ob2); 188extern int distance(const object *ob1, const object *ob2);
176extern int find_dir_2(int x, int y); 189extern int find_dir_2(int x, int y);
177extern int dirdiff(int dir1, int dir2); 190extern int dirdiff(int dir1, int dir2);
178extern int can_see_monsterP(maptile *m, int x, int y, int dir); 191extern int can_see_monsterP(maptile *m, int x, int y, int dir);
179extern int can_pick(const object *who, const object *item); 192extern int can_pick(const object *who, const object *item);
180extern object *object_create_clone(object *asrc);
181extern object *find_obj_by_type_subtype(const object *who, int type, int subtype); 193extern object *find_obj_by_type_subtype(const object *who, int type, int subtype);
182extern key_value *get_ob_key_link(const object *ob, const char *key);
183extern const char *get_ob_key_value(const object *op, const char *const key);
184extern int set_ob_key_value_s(object *op, const char *canonical_key, const char *value, int add_key);
185extern int set_ob_key_value(object *op, const char *key, const char *value, int add_key);
186/* path.c */ 194/* path.c */
187extern char *path_combine(const char *src, const char *dst); 195extern char *path_combine(const char *src, const char *dst);
188extern void path_normalize(char *path); 196extern void path_normalize(char *path);
189extern char *path_combine_and_normalize(const char *src, const char *dst); 197extern char *path_combine_and_normalize(const char *src, const char *dst);
190/* porting.c */ 198/* porting.c */
257extern void sleep_delta(); 265extern void sleep_delta();
258extern void get_tod(timeofday_t *tod); 266extern void get_tod(timeofday_t *tod);
259extern void print_tod(object *op); 267extern void print_tod(object *op);
260extern void time_info(object *op); 268extern void time_info(object *op);
261/* treasure.c */ 269/* treasure.c */
262extern void init_archetype_pointers();
263extern bool load_treasure_file(const char *filename); 270extern bool load_treasure_file(const char *filename);
264extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries);
265extern object *generate_treasure(treasurelist *t, int difficulty); 271extern object *generate_treasure(treasurelist *t, int difficulty);
266extern int level_for_item(const object *op, int difficulty); 272extern int level_for_item(const object *op, int difficulty);
267extern int magic_from_difficulty(int difficulty); 273extern int magic_from_difficulty(int difficulty);
268extern void set_abs_magic(object *op, int magic); 274extern void set_abs_magic(object *op, int magic);
269extern void set_ring_bonus(object *op, int bonus); 275extern void set_ring_bonus(object *op, int bonus);
298extern void make_list_like(char *input); 304extern void make_list_like(char *input);
299/* loader.c */ 305/* loader.c */
300extern int set_variable(object *op, char *buf); 306extern int set_variable(object *op, char *buf);
301extern void init_vars(); 307extern void init_vars();
302extern char *get_ob_diff(object *op, object *op2); 308extern char *get_ob_diff(object *op, object *op2);
309/* map.c */
310extern maptile *find_style (const char *dirname, const char *stylename, int difficulty);
311extern object *pick_random_object (maptile *style);
312
313/* former funcpoint.h */
314/*
315 * These function-pointers are defined in common/glue.c
316 * The functions used to set and initialise them are also there.
317 *
318 * Massive change. Those functions are just defined, no callback, and they should be implemented.
319 * This means glue.c code & such can go away almost entirely.
320 * Ryo 2005-07-15
321 */
322
323extern void move_apply(object *, object *, object *);
324extern void draw_info(int, int, object *, const char *);
325extern void clean_tmp_files(void);
326extern void fix_auto_apply(maptile *);
327extern void init_blocksview_players(void);
328extern void monster_check_apply(object *, object *);
329extern void process_active_maps(void);
330extern void remove_friendly_object(object *);
331extern void update_buttons(maptile *);
332extern void move_teleporter(object *);
333extern void move_firewall(object *);
334extern void move_creator(object *);
335extern void move_marker(object *);
336extern void move_duplicator(object *);
337extern void trap_adjust(object *, int);
338extern void esrv_send_item(object *, object *);
339extern void esrv_del_item(player *, int);
340extern void esrv_update_item(int, object *, object *);
341extern void esrv_update_spells(player *);
342extern void set_darkness_map(maptile *m);
343extern void dragon_ability_gain(object *, int, int);
344extern void weather_effect(const char *);
345extern object * find_skill_by_number(object *, int);
346
347#endif
348

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines