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 | * |
5 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * the terms of the Affero GNU General Public License as published by the |
7 | * the terms of the Affero GNU General Public License as published by the |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * option) any later version. |
9 | * option) any later version. |
… | |
… | |
37 | void move_apply (object *trap, object *victim, object *originator); |
37 | void move_apply (object *trap, object *victim, object *originator); |
38 | void do_learn_spell (object *op, object *spell, int special_prayer); |
38 | void do_learn_spell (object *op, object *spell, int special_prayer); |
39 | void do_forget_spell (object *op, const char *spell); |
39 | void do_forget_spell (object *op, const char *spell); |
40 | void apply_scroll (object *op, object *tmp, int dir); |
40 | void apply_scroll (object *op, object *tmp, int dir); |
41 | void apply_poison (object *op, object *tmp); |
41 | void apply_poison (object *op, object *tmp); |
42 | int manual_apply (object *op, object *tmp, int aflag); |
|
|
43 | int player_apply (object *pl, object *op, int aflag, int quiet); |
42 | bool player_apply (object *pl, object *op, int aflag); |
44 | void player_apply_below (object *pl); |
43 | void player_apply_below (object *pl); |
45 | int can_apply_object (object *who, object *op); |
44 | int can_apply_object (object *who, object *op); |
46 | int apply_special (object *who, object *op, int aflags); |
45 | int apply_special (object *who, object *op, int aflags); |
47 | int auto_apply (object *op); |
46 | int auto_apply (object *op); |
48 | void fix_auto_apply (maptile *m); |
47 | void fix_auto_apply (maptile *m); |
49 | void eat_special_food (object *who, object *food); |
48 | void eat_special_food (object *who, object *food); |
50 | void apply_changes_to_player (object *pl, object *change); |
49 | void apply_changes_to_player (object *pl, object *change); |
51 | extern void handle_apply_yield (object *op); |
50 | void handle_apply_yield (object *op); |
52 | void apply_lamp (object *op, bool switch_on); |
51 | void apply_lamp (object *op, bool switch_on); |
53 | void get_animation_from_arch (object *op, arch_ptr a); |
52 | void get_animation_from_arch (object *op, arch_ptr a); |
54 | extern int convert_item (object *item, object *converter); |
53 | int convert_item (object *item, object *converter); |
55 | |
54 | |
56 | /* attack.c */ |
55 | /* attack.c */ |
57 | void cancellation (object *op); |
56 | void cancellation (object *op); |
58 | void save_throw_object (object *op, int type, object *originator); |
57 | void save_throw_object (object *op, int type, object *originator); |
59 | int hit_map (object *op, int dir, int type, int full_hit); |
58 | int hit_map (object *op, int dir, uint32_t type, int full_hit); |
60 | int attack_ob (object *op, object *hitter); |
59 | int attack_ob (object *op, object *hitter); |
61 | object *hit_with_arrow (object *op, object *victim); |
60 | object *hit_with_arrow (object *op, object *victim); |
62 | int hit_player_attacktype (object *op, object *hitter, int dam, uint32 attacknum, int magic); |
61 | int hit_player_attacktype (object *op, object *hitter, int dam, uint32_t attacknum, int magic); |
63 | int kill_object (object *op, int dam, object *hitter, int type); |
62 | int kill_object (object *op, int dam, object *hitter, int type); |
64 | int friendly_fire (object *op, object *hitter); |
63 | int friendly_fire (object *op, object *hitter); |
65 | int hit_player (object *op, int dam, object *hitter, int type, int full_hit); |
64 | int hit_player (object *op, int dam, object *hitter, uint32_t type, int full_hit); |
66 | void confuse_player (object *op, object *hitter, int dam); |
65 | void confuse_player (object *op, object *hitter, int dam); |
67 | void blind_player (object *op, object *hitter, int dam); |
66 | void blind_player (object *op, object *hitter, int dam); |
68 | void paralyze_player (object *op, object *hitter, int dam); |
67 | void paralyze_player (object *op, object *hitter, int dam); |
69 | |
68 | |
70 | /* build_map.c */ |
69 | /* build_map.c */ |
… | |
… | |
145 | void examine (object *op, object *tmp); |
144 | void examine (object *op, object *tmp); |
146 | int command_pickup (object *op, char *params); |
145 | int command_pickup (object *op, char *params); |
147 | void set_pickup_mode (object *op, int i); |
146 | void set_pickup_mode (object *op, int i); |
148 | int command_search_items (object *op, char *params); |
147 | int command_search_items (object *op, char *params); |
149 | int command_rename_item (object *op, char *params); |
148 | int command_rename_item (object *op, char *params); |
|
|
149 | int command_unlock (object *op, char *params); |
|
|
150 | int command_lock (object *op, char *params); |
150 | |
151 | |
151 | /* c_party.c */ |
152 | /* c_party.c */ |
152 | partylist *get_firstparty (void); |
153 | partylist *get_firstparty (); |
153 | void obsolete_parties (void); |
154 | void obsolete_parties (); |
154 | void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); |
155 | void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); |
155 | void receive_party_password (object *op, char k); |
156 | void receive_party_password (object *op, char k); |
156 | int command_gsay (object *op, char *params); |
157 | int command_gsay (object *op, char *params); |
157 | int command_party (object *op, char *params); |
158 | int command_party (object *op, char *params); |
158 | |
159 | |
… | |
… | |
199 | int command_stack_clear (object *op, char *params); |
200 | int command_stack_clear (object *op, char *params); |
200 | int command_diff (object *op, char *params); |
201 | int command_diff (object *op, char *params); |
201 | int command_insert_into (object *op, char *params); |
202 | int command_insert_into (object *op, char *params); |
202 | |
203 | |
203 | /* commands.c */ |
204 | /* commands.c */ |
204 | void init_commands (void); |
205 | void init_commands (); |
205 | CommFunc find_oldsocket_command (char *cmd); |
206 | CommFunc find_oldsocket_command (char *cmd); |
206 | CommFunc find_oldsocket_command2 (char *cmd); |
207 | CommFunc find_oldsocket_command2 (char *cmd); |
207 | |
208 | |
208 | /* daemon.c */ |
209 | /* daemon.c */ |
209 | FILE *BecomeDaemon (const char *filename); |
210 | FILE *BecomeDaemon (const char *filename); |
… | |
… | |
228 | void become_follower (object *op, object *new_god); |
229 | void become_follower (object *op, object *new_god); |
229 | archetype *determine_holy_arch (object *god, shstr_cmp type); |
230 | archetype *determine_holy_arch (object *god, shstr_cmp type); |
230 | int tailor_god_spell (object *spellop, object *caster); |
231 | int tailor_god_spell (object *spellop, object *caster); |
231 | |
232 | |
232 | /* init.c */ |
233 | /* init.c */ |
233 | void load_settings (void); |
234 | void load_settings (); |
234 | void load_materials (void); |
|
|
235 | void init (int argc, char **argv); |
235 | void init (int argc, char **argv); |
236 | void usage (void); |
236 | void usage (); |
237 | void help (void); |
237 | void help (); |
238 | void init_beforeplay (void); |
238 | void init_beforeplay (); |
239 | void init_signals (void); |
239 | void init_signals (); |
240 | racelink *find_racelink (const char *name); |
240 | racelink *find_racelink (const char *name); |
241 | |
241 | |
242 | /* login.c */ |
242 | /* login.c */ |
243 | void delete_character (const char *name); |
243 | void delete_character (const char *name); |
244 | int verify_player (const char *name, char *password); |
244 | int verify_player (const char *name, char *password); |
… | |
… | |
254 | void enter_player_savebed (object *op); |
254 | void enter_player_savebed (object *op); |
255 | void leave_map (object *op); |
255 | void leave_map (object *op); |
256 | char *clean_path (const char *file); |
256 | char *clean_path (const char *file); |
257 | char *unclean_path (const char *src); |
257 | char *unclean_path (const char *src); |
258 | void enter_exit (object *op, object *exit_ob); |
258 | void enter_exit (object *op, object *exit_ob); |
259 | void clean_tmp_files (void); |
259 | void clean_tmp_files (); |
260 | void leave (player *pl,int draw_exit); |
260 | void leave (player *pl,int draw_exit); |
261 | int main (int argc, char **argv); |
261 | int main (int argc, char **argv); |
262 | |
262 | |
263 | /* monster.c */ |
263 | /* monster.c */ |
264 | object *check_enemy (object *npc, rv_vector *rv); |
264 | object *check_enemy (object *npc, rv_vector *rv); |
… | |
… | |
275 | int can_detect_enemy (object *op, object *enemy, rv_vector *rv); |
275 | int can_detect_enemy (object *op, object *enemy, rv_vector *rv); |
276 | int stand_in_light (object *op); |
276 | int stand_in_light (object *op); |
277 | int can_see_enemy (object *op, object *enemy); |
277 | int can_see_enemy (object *op, object *enemy); |
278 | |
278 | |
279 | /* move.c */ |
279 | /* move.c */ |
280 | int move_object (object *op, int dir); |
|
|
281 | int move_ob (object *op, int dir, object *originator); |
|
|
282 | int transfer_ob (object *op, int x, int y, int randomly, object *originator); |
280 | int transfer_ob (object *op, int x, int y, int randomly, object *originator); |
283 | int teleport (object *teleporter, uint8 tele_type, object *user); |
281 | int teleport (object *teleporter, uint8 tele_type, object *user); |
284 | void recursive_roll (object *op, int dir, object *pusher); |
282 | void recursive_roll (object *op, int dir, object *pusher); |
285 | int push_ob (object *who, int dir, object *pusher); |
283 | int push_ob (object *who, int dir, object *pusher); |
286 | |
284 | |
… | |
… | |
314 | int key_roll_stat (object *op, char key); |
312 | int key_roll_stat (object *op, char key); |
315 | int key_change_class (object *op, char key); |
313 | int key_change_class (object *op, char key); |
316 | int key_confirm_quit (object *op, char key); |
314 | int key_confirm_quit (object *op, char key); |
317 | int check_pick (object *op); |
315 | int check_pick (object *op); |
318 | int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); |
316 | int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); |
319 | bool fire (object *op, int dir); |
317 | bool fire (object *who, int dir); |
320 | object *find_key (object *pl, object *container, object *door); |
318 | object *find_key (object *pl, object *container, object *door); |
321 | bool move_player_attack (object *op, int dir); |
319 | bool move_player_attack (object *op, int dir); |
322 | bool move_player (object *op, int dir); |
320 | bool move_player (object *op, int dir); |
323 | bool handle_newcs_player (object *op); |
321 | bool handle_newcs_player (object *op); |
324 | void do_some_living (object *op); |
322 | void do_some_living (object *op); |
325 | void kill_player (object *op); |
323 | void kill_player (object *op); |
326 | void fix_weight (void); |
324 | void fix_weight (); |
327 | void fix_luck (void); |
325 | void fix_luck (); |
328 | void cast_dust (object *op, object *throw_ob, int dir); |
326 | void cast_dust (object *op, object *throw_ob, int dir); |
329 | void make_visible (object *op); |
327 | void make_visible (object *op); |
330 | int is_true_undead (object *op); |
328 | int is_true_undead (object *op); |
331 | int hideability (object *ob); |
329 | int hideability (object *ob); |
332 | void do_hidden_move (object *op); |
330 | void do_hidden_move (object *op); |
333 | int stand_near_hostile (object *who); |
331 | int stand_near_hostile (object *who); |
334 | int player_can_view (object *pl, object *op); |
332 | int player_can_view (object *pl, object *op); |
335 | int op_on_battleground (object *op, int *x, int *y); |
333 | int op_on_battleground (object *op, int *x, int *y); |
336 | void dragon_ability_gain (object *who, int atnr, int level); |
334 | void dragon_ability_gain (object *who, int atnr, int level); |
337 | void player_unready_range_ob (player *pl, object *ob); |
|
|
338 | |
335 | |
339 | /* resurrection.c */ |
336 | /* resurrection.c */ |
340 | int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg); |
337 | int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg); |
341 | |
338 | |
342 | /* rune.c */ |
339 | /* rune.c */ |
… | |
… | |
376 | int remove_trap (object *op, int dir, object *skill); |
373 | int remove_trap (object *op, int dir, object *skill); |
377 | int pray (object *pl, object *skill); |
374 | int pray (object *pl, object *skill); |
378 | void meditate (object *pl, object *skill); |
375 | void meditate (object *pl, object *skill); |
379 | int write_on_item (object *pl, const char *params, object *skill); |
376 | int write_on_item (object *pl, const char *params, object *skill); |
380 | int skill_throw (object *op, object *part, int dir, const char *params, object *skill); |
377 | int skill_throw (object *op, object *part, int dir, const char *params, object *skill); |
|
|
378 | bool skill_mining (object *who, object *tool, object *skill, int dir, const char *string); |
|
|
379 | bool skill_fishing (object *who, object *tool, object *skill, int dir, const char *string); |
381 | |
380 | |
382 | /* skill_util.c */ |
381 | /* skill_util.c */ |
383 | void init_skills (void); |
382 | void init_skills (); |
384 | void link_player_skills (object *op); |
383 | void link_player_skills (object *op); |
385 | int do_skill (object *op, object *part, object *skill, int dir, const char *string); |
384 | int do_skill (object *op, object *part, object *skill, int dir, const char *string); |
386 | int calc_skill_exp (object *who, object *op, object *skill); |
385 | int calc_skill_exp (object *who, object *op, object *skill); |
387 | int learn_skill (object *pl, object *scroll); |
386 | int learn_skill (object *pl, object *scroll); |
388 | void show_skills (object *op, const char *search); |
387 | void show_skills (object *op, const char *search); |
… | |
… | |
480 | /* swamp.c */ |
479 | /* swamp.c */ |
481 | void walk_on_deep_swamp (object *op, object *victim); |
480 | void walk_on_deep_swamp (object *op, object *victim); |
482 | void move_deep_swamp (object *op); |
481 | void move_deep_swamp (object *op); |
483 | |
482 | |
484 | /* swap.c */ |
483 | /* swap.c */ |
485 | void read_map_log (void); |
484 | void read_map_log (); |
486 | void swap_map (maptile *map); |
485 | void swap_map (maptile *map); |
487 | void check_active_maps (void); |
486 | void check_active_maps (); |
488 | maptile *map_least_timeout (char *except_level); |
487 | maptile *map_least_timeout (char *except_level); |
489 | void swap_below_max (char *except_level); |
488 | void swap_below_max (char *except_level); |
490 | int players_on_map (maptile *m, int show_all); |
489 | int players_on_map (maptile *m, int show_all); |
491 | void flush_old_maps (void); |
490 | void flush_old_maps (); |
492 | |
491 | |
493 | /* time.c */ |
492 | /* time.c */ |
494 | void remove_door (object *op); |
493 | void remove_door (object *op); |
495 | void remove_door2 (object *op); |
494 | void remove_door2 (object *op); |
496 | void animate_trigger (object *op); |
495 | void animate_trigger (object *op); |
… | |
… | |
504 | void move_creator (object *creator); |
503 | void move_creator (object *creator); |
505 | void move_marker (object *op); |
504 | void move_marker (object *op); |
506 | void process_object (object *op); |
505 | void process_object (object *op); |
507 | |
506 | |
508 | /* weather.c */ |
507 | /* weather.c */ |
509 | void adjust_daylight (void); |
508 | void adjust_daylight (); |