--- deliantra/server/include/sproto.h 2007/04/28 05:55:55 1.60 +++ deliantra/server/include/sproto.h 2008/04/20 00:44:12 1.83 @@ -1,5 +1,23 @@ -// server/c_party.C -int same_party (partylist *a, partylist *b); +/* + * This file is part of Deliantra, the Roguelike Realtime MMORPG. + * + * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * + * Deliantra is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * The authors can be reached via e-mail to + */ /* alchemy.c */ int need_identify (const object *obj); @@ -23,12 +41,10 @@ int apply_transport (object *pl, object *transport, int aflag); int should_director_abort (object *op, object *victim); int apply_potion (object *op, object *tmp); -int improve_weapon_stat (object *op, object *improver, object *weapon, signed char *stat, int sacrifice_count, const char *statname); int prepare_weapon (object *op, object *improver, object *weapon); int improve_weapon (object *op, object *improver, object *weapon); int check_improve_weapon (object *op, object *tmp); int improve_armour (object *op, object *improver, object *armour); -int convert_item (object *item, object *converter); int apply_container (object *op, object *sack); int esrv_apply_container (object *op, object *sack); void move_apply (object *trap, object *victim, object *originator); @@ -41,7 +57,6 @@ int manual_apply (object *op, object *tmp, int aflag); int player_apply (object *pl, object *op, int aflag, int quiet); void player_apply_below (object *pl); -object *get_item_from_body_location (object *start, int loc); int unapply_for_ob (object *who, object *op, int aflags); int can_apply_object (object *who, object *op); int apply_special (object *who, object *op, int aflags); @@ -53,6 +68,7 @@ void scroll_failure (object *op, int failure, int power); void apply_changes_to_player (object *pl, object *change); void apply_item_transformer (object *pl, object *transformer); +extern void handle_apply_yield (object *op); /* attack.c */ void cancellation (object *op); @@ -109,14 +125,9 @@ int command_hiscore (object *op, char *params); int command_debug (object *op, char *params); int command_dumpbelow (object *op, char *params); +int command_dumpfriendlyobjects (object *op, char *params); int command_wizpass (object *op, char *params); int command_wizcast (object *op, char *params); -int command_dumpallobjects (object *op, char *params); -int command_dumpfriendlyobjects (object *op, char *params); -int command_dumpallarchetypes (object *op, char *params); -int command_ssdumptable (object *op, char *params); -int command_dumpmap (object *op, char *params); -int command_dumpallmaps (object *op, char *params); int command_printlos (object *op, char *params); int command_version (object *op, char *params); void bug_report (const char *reportstring); @@ -166,6 +177,7 @@ int command_take (object *op, char *params); void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof); void drop_object (object *op, object *tmp, uint32 nrof); +void update_after_inventory_change (object *op); void drop (object *op, object *tmp); int command_dropall (object *op, char *params); int command_drop (object *op, char *params); @@ -174,14 +186,12 @@ void examine_monster (object *op, object *tmp); const char *long_desc (object *tmp, object *pl); void examine (object *op, object *tmp); -void inventory (object *op, object *inv); int command_pickup (object *op, char *params); void set_pickup_mode (object *op, int i); int command_search_items (object *op, char *params); int command_rename_item (object *op, char *params); /* c_party.c */ -int same_party (partylist *a, partylist *b); partylist *get_firstparty (void); void remove_party (partylist *target_party); void obsolete_parties (void); @@ -208,7 +218,6 @@ int command_setgod (object *op, char *params); int command_banish (object *op, char *params); int command_save_overlay (object *op, char *params); -int command_toggle_shout (object *op, char *params); int command_freeze (object *op, char *params); int command_arrest (object *op, char *params); int command_summon (object *op, char *params); @@ -232,9 +241,6 @@ int command_learn_spell (object *op, char *params); int command_learn_special_prayer (object *op, char *params); int command_forget_spell (object *op, char *params); -int command_listplugins (object *op, char *params); -int command_loadplugin (object *op, char *params); -int command_unloadplugin (object *op, char *params); int command_dmhide (object *op, char *params); void dm_stack_pop (player *pl); object *dm_stack_peek (player *pl); @@ -266,7 +272,7 @@ int move_symptom (object *symptom); int check_physically_infect (object *victim, object *hitter); object *find_disease (object *victim); -int cure_disease (object *sufferer, object *caster); +int cure_disease (object *sufferer, object *caster, object *spell); int reduce_symptoms (object *sufferer, int reduction); /* egoitem.c */ @@ -330,8 +336,6 @@ void usage (void); void help (void); void init_beforeplay (void); -void init_startup (void); -void compile_info (void); void init_signals (void); void init_races (void); void dump_races (void); @@ -352,7 +356,6 @@ void version (object *op); void info_keys (object *op); char *crypt_string (char *str, char *salt); -int check_password (char *typed, char *crypted); void enter_player_savebed (object *op); void leave_map (object *op); void set_map_timeout (maptile *oldmap); @@ -362,7 +365,6 @@ void process_events (); void clean_tmp_files (void); void leave (player *pl,int draw_exit); -int forbid_play (void); void do_specials (void); int main (int argc, char **argv); @@ -465,13 +467,12 @@ int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); int player_fire_bow (object *op, int dir); void fire_misc_object (object *op, int dir); -void fire (object *op, int dir); +bool fire (object *op, int dir); object *find_key (object *pl, object *container, object *door); -void move_player_attack (object *op, int dir); -int move_player (object *op, int dir); -int handle_newcs_player (object *op); +bool move_player_attack (object *op, int dir); +bool move_player (object *op, int dir); +bool handle_newcs_player (object *op); int save_life (object *op); -void remove_unpaid_objects (object *op, object *env); char *gravestone_text (object *op); void do_some_living (object *op); void kill_player (object *op); @@ -490,89 +491,6 @@ void dragon_ability_gain (object *who, int atnr, int level); void player_unready_range_ob (player *pl, object *ob); -/* plugins.c */ -int execute_event (object *op, int eventcode, object *activator, object *third, const char *message, int fix); -int execute_global_event (int eventcode, ...); -int plugins_init_plugin (const char *libfile); -void *cfapi_get_hooks (int *type, ...); -int plugins_remove_plugin (const char *id); -crossfire_plugin *plugins_find_plugin (const char *id); -void plugins_display_list (object *op); -void *cfapi_system_find_animation (int *type, ...); -void *cfapi_system_strdup (int *type, ...); -void *cfapi_system_register_global_event (int *type, ...); -void *cfapi_system_unregister_global_event (int *type, ...); -void *cfapi_system_check_path (int *type, ...); -void *cfapi_system_re_cmp (int *type, ...); -void *cfapi_system_directory (int *type, ...); -void *cfapi_map_get_map (int *type, ...); -void *cfapi_map_has_been_loaded (int *type, ...); -void *cfapi_map_create_path (int *type, ...); -void *cfapi_map_get_map_property (int *type, ...); -void *cfapi_map_set_map_property (int *type, ...); -void *cfapi_map_out_of_map (int *type, ...); -void *cfapi_map_update_position (int *type, ...); -void *cfapi_map_delete_map (int *type, ...); -void *cfapi_map_message (int *type, ...); -void *cfapi_map_get_object_at (int *type, ...); -void *cfapi_map_get_flags (int *type, ...); -void *cfapi_map_present_arch_by_name (int *type, ...); -void *cfapi_object_move (int *type, ...); -void *cfapi_object_get_key (int *type, ...); -void *cfapi_object_set_key (int *type, ...); -void *cfapi_object_get_property (int *type, ...); -void *cfapi_object_set_property (int *type, ...); -void *cfapi_object_apply_below (int *type, ...); -void *cfapi_object_apply (int *type, ...); -void *cfapi_object_identify (int *type, ...); -void *cfapi_object_describe (int *type, ...); -void *cfapi_object_drain (int *type, ...); -void *cfapi_object_fix (int *type, ...); -void *cfapi_object_give_skill (int *type, ...); -void *cfapi_object_transmute (int *type, ...); -void *cfapi_object_remove (int *type, ...); -void *cfapi_object_delete (int *type, ...); -void *cfapi_object_clone (int *type, ...); -void *cfapi_object_find (int *type, ...); -void *cfapi_object_create (int *type, ...); -void *cfapi_object_insert (int *type, ...); -void *cfapi_object_split (int *type, ...); -void *cfapi_object_merge (int *type, ...); -void *cfapi_object_distance (int *type, ...); -void *cfapi_object_update (int *type, ...); -void *cfapi_object_clear (int *type, ...); -void *cfapi_object_reset (int *type, ...); -void *cfapi_object_check_inventory (int *type, ...); -void *cfapi_object_clean_object (int *type, ...); -void *cfapi_object_on_same_map (int *type, ...); -void *cfapi_object_spring_trap (int *type, ...); -void *cfapi_object_check_trigger (int *type, ...); -void *cfapi_object_query_cost (int *type, ...); -void *cfapi_object_query_money (int *type, ...); -void *cfapi_object_cast (int *type, ...); -void *cfapi_object_learn_spell (int *type, ...); -void *cfapi_object_forget_spell (int *type, ...); -void *cfapi_object_check_spell (int *type, ...); -void *cfapi_object_pay_amount (int *type, ...); -void *cfapi_object_pay_item (int *type, ...); -void *cfapi_object_transfer (int *type, ...); -void *cfapi_object_find_archetype_inside (int *type, ...); -void *cfapi_object_drop (int *type, ...); -void *cfapi_object_take (int *type, ...); -void *cfapi_object_say (int *type, ...); -void *cfapi_object_speak (int *type, ...); -void *cfapi_player_find (int *type, ...); -void *cfapi_player_message (int *type, ...); -void *cfapi_player_send_inventory (int *type, ...); -void *cfapi_object_teleport (int *type, ...); -void *cfapi_object_pickup (int *type, ...); -void *cfapi_archetype_get_first (int *type, ...); -void *cfapi_archetype_get_property (int *type, ...); -void *cfapi_party_get_property (int *type, ...); -void *cfapi_region_get_property (int *type, ...); -CommArray_s *find_plugin_command (char *cmd, object *op); -int initPlugins (void); - /* resurrection.c */ int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg); int resurrection_fails (int levelcaster, int leveldead); @@ -625,10 +543,6 @@ /* skill_util.c */ void init_skills (void); void link_player_skills (object *op); -object *find_skill_by_name (object *who, const char *name); -object *find_skill_by_number (object *who, int skillno); -int change_skill (object *who, object *new_skill, int flag); -void clear_skill (object *who); int do_skill (object *op, object *part, object *skill, int dir, const char *string); int calc_skill_exp (object *who, object *op, object *skill); int learn_skill (object *pl, object *scroll); @@ -682,7 +596,6 @@ int cast_word_of_recall (object *op, object *caster, object *spell_ob); int cast_wonder (object *op, object *caster, int dir, object *spell_ob); int perceive_self (object *op); -int cast_create_town_portal (object *op, object *caster, object *spell, int dir); int magic_wall (object *op, object *caster, int dir, object *spell_ob); int dimension_door (object *op, object *caster, object *spob, int dir); int cast_heal (object *op, object *caster, object *spell, int dir); @@ -705,8 +618,6 @@ /* spell_util.c */ object *find_random_spell_in_ob (object *ob, const char *skill); void set_spell_skill (object *op, object *caster, object *spob, object *dest); -void init_spells (void); -void dump_spells (void); void spell_effect (object *spob, int x, int y, maptile *map, object *originator); int min_casting_level (object *caster, object *spell); int caster_level (object *caster, object *spell); @@ -772,14 +683,7 @@ void move_duplicator (object *op); void move_creator (object *creator); void move_marker (object *op); -int process_object (object *op); - -/* timers.c */ -void cftimer_process_timers (void); -void cftimer_process_event (object *ob); -int cftimer_create (int id, long delay, object *ob, int mode); -int cftimer_destroy (int id); -int cftimer_find_free_id (void); +void process_object (object *op); /* weather.c */ void set_darkness_map (maptile *m);