--- deliantra/server/include/sproto.h 2006/08/31 10:15:15 1.16 +++ deliantra/server/include/sproto.h 2007/03/02 15:04:56 1.53 @@ -1,11 +1,10 @@ -/* arch.c */ -archetype *find_archetype (const char *name); +int same_party (partylist *a, partylist *b); /* alchemy.c */ int need_identify (const object *obj); int apply_shop_mat (object *shop_mat, object *op); -const char *cost_string_from_value(uint64 cost, int approx); -void pay_player (object *pl, uint64 amount); -uint64 pay_player_arch (object *pl, const char *arch, uint64 amount); +const char *cost_string_from_value(sint64 cost, int approx); +void pay_player (object *pl, sint64 amount); +sint64 pay_player_arch (object *pl, const char *arch, sint64 amount); void attempt_do_alchemy(object *caster, object *cauldron); int content_recipe_value(object *op); int numb_ob_inside(object *op); @@ -45,7 +44,7 @@ int apply_special(object *who, object *op, int aflags); int monster_apply_special(object *who, object *op, int aflags); int auto_apply(object *op); -void fix_auto_apply(mapstruct *m); +void fix_auto_apply(maptile *m); void eat_special_food(object *who, object *food); void apply_lighter(object *who, object *lighter); void scroll_failure(object *op, int failure, int power); @@ -83,92 +82,20 @@ object *get_connection_rune(object *pl, short x, short y); object *get_msg_book(object *pl, short x, short y); object *get_wall(struct mapdef *map, int x, int y); -void fix_walls(struct mapdef *map, int x, int y); +void fix_walls(maptile *map, int x, int y); +void fix_walls_around(maptile *map, int x, int y); void apply_builder_floor(object *pl, object *material, short x, short y); void apply_builder_wall(object *pl, object *material, short x, short y); void apply_builder_item(object *pl, object *item, short x, short y); void apply_builder_remove(object *pl, int dir); void apply_map_builder(object *pl, int dir); int adjust_sign_msg(object *pl, short x, short y, object *tmp); -/* c_chat.c */ -int command_say(object *op, char *params); -int command_me(object *op, char *params); -int command_cointoss(object *op, char *params); -int command_orcknuckle(object *op, char *params); -int command_shout(object *op, char *params); -int command_chat(object *op, char *params); -int command_tell(object *op, char *params); -int command_reply(object *op, char *params); -int command_nod(object *op, char *params); -int command_dance(object *op, char *params); -int command_kiss(object *op, char *params); -int command_bounce(object *op, char *params); -int command_smile(object *op, char *params); -int command_cackle(object *op, char *params); -int command_laugh(object *op, char *params); -int command_giggle(object *op, char *params); -int command_shake(object *op, char *params); -int command_puke(object *op, char *params); -int command_growl(object *op, char *params); -int command_scream(object *op, char *params); -int command_sigh(object *op, char *params); -int command_sulk(object *op, char *params); -int command_hug(object *op, char *params); -int command_cry(object *op, char *params); -int command_poke(object *op, char *params); -int command_accuse(object *op, char *params); -int command_grin(object *op, char *params); -int command_bow(object *op, char *params); -int command_clap(object *op, char *params); -int command_blush(object *op, char *params); -int command_burp(object *op, char *params); -int command_chuckle(object *op, char *params); -int command_cough(object *op, char *params); -int command_flip(object *op, char *params); -int command_frown(object *op, char *params); -int command_gasp(object *op, char *params); -int command_glare(object *op, char *params); -int command_groan(object *op, char *params); -int command_hiccup(object *op, char *params); -int command_lick(object *op, char *params); -int command_pout(object *op, char *params); -int command_shiver(object *op, char *params); -int command_shrug(object *op, char *params); -int command_slap(object *op, char *params); -int command_smirk(object *op, char *params); -int command_snap(object *op, char *params); -int command_sneeze(object *op, char *params); -int command_snicker(object *op, char *params); -int command_sniff(object *op, char *params); -int command_snore(object *op, char *params); -int command_spit(object *op, char *params); -int command_strut(object *op, char *params); -int command_thank(object *op, char *params); -int command_twiddle(object *op, char *params); -int command_wave(object *op, char *params); -int command_whistle(object *op, char *params); -int command_wink(object *op, char *params); -int command_yawn(object *op, char *params); -int command_beg(object *op, char *params); -int command_bleed(object *op, char *params); -int command_cringe(object *op, char *params); -int command_think(object *op, char *params); /* c_misc.c */ -void map_info(object *op, char *search); -int command_body(object *op, char *params); int command_motd(object *op, char *params); int command_bug(object *op, char *params); void malloc_info(object *op); -void current_region_info(object *op); -void current_map_info(object *op); int command_whereabouts(object *op, char *params); -int command_who(object *op, char *params); -void display_who_entry(object *op, player *pl, const char *format); -void get_who_escape_code_value(char *return_val, const char letter, player *pl); -int command_afk(object *op, char *params); int command_malloc(object *op, char *params); -int command_mapinfo(object *op, char *params); -int command_whereami(object *op, char *params); int command_maps(object *op, char *params); int command_strings(object *op, char *params); int command_sstable(object *op, char *params); @@ -189,34 +116,20 @@ int command_printlos(object *op, char *params); int command_version(object *op, char *params); void bug_report(const char *reportstring); -int command_output_sync(object *op, char *params); -int command_output_count(object *op, char *params); -int command_listen(object *op, char *params); int command_statistics(object *pl, char *params); int command_fix_me(object *op, char *params); int command_players(object *op, char *paramss); int command_logs(object *op, char *params); -int command_applymode(object *op, char *params); int command_bowmode(object *op, char *params); -int command_petmode(object *op, char *params); int command_showpets(object *op, char *params); -int command_usekeys(object *op, char *params); int command_resistances(object *op, char *params); int command_help(object *op, char *params); int onoff_value(const char *line); int command_quit(object *op, char *params); int command_real_quit(object *op, char *params); -int command_explore(object *op, char *params); -int command_sound(object *op, char *params); void receive_player_name(object *op, char k); void receive_player_password(object *op, char k); -int explore_mode(void); int command_title(object *op, char *params); -int command_save(object *op, char *params); -int command_peaceful(object *op, char *params); -int command_wimpy(object *op, char *params); -int command_brace(object *op, char *params); -int command_style_map_info(object *op, char *params); int command_kill_pets(object *op, char *params); int command_quests(object *pl, char *params); /* c_move.c */ @@ -230,11 +143,7 @@ int command_west(object *op, char *params); int command_stay(object *op, char *params); /* c_new.c */ -int execute_newserver_command(object *pl, char *command); -int command_run(object *op, char *params); -int command_run_stop(object *op, char *params); -int command_fire(object *op, char *params); -int command_fire_stop(object *op, char *params); +void execute_newserver_command(object *pl, char *command); int bad_command(object *op, char *params); /* c_object.c */ object *find_best_object_match(object *pl, const char *params); @@ -255,7 +164,6 @@ int command_drop(object *op, char *params); int command_examine(object *op, char *params); object *find_marked_object(object *op); -int command_mark(object *op, char *params); void examine_monster(object *op, object *tmp); char *long_desc(object *tmp, object *pl); void examine(object *op, object *tmp); @@ -289,12 +197,8 @@ int command_hide(object *op, char *params); int command_setgod(object *op, char *params); int command_banish(object *op, char *params); -int command_kick(object *op, char *params); int command_save_overlay(object *op, char *params); int command_toggle_shout(object *op, char *params); -int command_shutdown(object *op, char *params); -int command_goto(object *op, char *params); -int command_generate(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); @@ -303,8 +207,6 @@ int command_inventory(object *op, char *params); int command_skills(object *op, char *params); int command_dump(object *op, char *params); -int command_mon_aggr(object *op, char *params); -int command_possess(object *op, char *params); int command_patch(object *op, char *params); int command_remove(object *op, char *params); int command_free(object *op, char *params); @@ -420,7 +322,6 @@ void rec_sigpipe(int i); void rec_sigbus(int i); void rec_sigterm(int i); -void fatal_signal(int make_core, int close_sockets); void init_signals(void); void init_races(void); void dump_races(void); @@ -428,34 +329,26 @@ racelink *get_racelist(void); racelink *find_racelink(const char *name); /* login.c */ -void emergency_save(int flag); -void delete_character(const char *name, int); +void delete_character(const char *name); int verify_player(const char *name, char *password); int check_name(player *me, const char *name); int create_savedir_if_needed(char *savedir); void destroy_object(object *op); -int save_player(object *op, int flag); void copy_file(const char *filename, FILE *fpout); -void check_login(object *op); /* main.c */ void server_tick (); void version(object *op); void info_keys(object *op); -void start_info(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(mapstruct *oldmap); +void set_map_timeout(maptile *oldmap); char *clean_path(const char *file); char *unclean_path(const char *src); void enter_exit(object *op, object *exit_ob); -void process_active_maps(void); -void process_players1(mapstruct *map); -void process_players2(mapstruct *map); -void process_events(mapstruct *map); +void process_events(); void clean_tmp_files(void); -void cleanup(void); void leave(player *pl,int draw_exit); int forbid_play(void); void do_specials(void); @@ -494,8 +387,8 @@ void pace2_movev(object *ob); void pace2_moveh(object *ob); void rand_move(object *ob); -void check_earthwalls(object *op, mapstruct *m, int x, int y); -void check_doors(object *op, mapstruct *m, int x, int y); +void check_earthwalls(object *op, maptile *m, int x, int y); +void check_doors(object *op, maptile *m, int x, int y); void communicate(object *op, const char *txt); int talk_to_npc(object *op, object *npc, const char *txt); int talk_to_wall(object *pl, object *npc, const char *txt); @@ -509,13 +402,13 @@ int transfer_ob(object *op, int x, int y, int randomly, object *originator); int teleport(object *teleporter, uint8 tele_type, object *user); void recursive_roll(object *op, int dir, object *pusher); -int try_fit(object *op, mapstruct *m, int x, int y); +int try_fit(object *op, maptile *m, int x, int y); int roll_ob(object *op, int dir, object *pusher); int push_ob(object *who, int dir, object *pusher); /* pets.c */ object *get_pet_enemy(object *pet, rv_vector *rv); void terminate_all_pets(object *owner); -void remove_all_pets(mapstruct *map); +void remove_all_pets(maptile *map); int follow_owner(object *ob, object *owner); void pet_move(object *ob); object *fix_summon_pet(archetype *at, object *op, int dir, int is_golem); @@ -533,7 +426,6 @@ void send_rules(const object *op); void send_news(const object *op); int playername_ok(const char *cp); -int add_player(NewSocket *ns); archetype *get_player_archetype(archetype *at); object *get_nearest_player(object *mon); int path_to_player(object *mon, object *pl, unsigned mindiff); @@ -544,8 +436,6 @@ int receive_play_again(object *op, char key); void confirm_password(object *op); void get_party_password(object *op, partylist *party); -int roll_stat(void); -void roll_stats(object *op); void Roll_Again(object *op); void Swap_Stat(object *op, int Swap_Second); int key_roll_stat(object *op, char key); @@ -592,11 +482,9 @@ 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_local(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_add_string(int *type, ...); -void *cfapi_system_remove_string(int *type, ...); void *cfapi_system_check_path(int *type, ...); void *cfapi_system_re_cmp(int *type, ...); void *cfapi_system_directory(int *type, ...); @@ -684,19 +572,19 @@ int trap_disarm(object *disarmer, object *trap, int risk, object *skill); void trap_adjust(object *trap, int difficulty); /* shop.c */ -uint64 query_cost(const object *tmp, object *who, int flag); +int get_payment(object *pl); +sint64 query_cost(const object *tmp, object *who, int flag); const char *query_cost_string(const object *tmp, object *who, int flag); -uint64 query_money(const object *op); -int pay_for_amount(uint64 to_pay, object *pl); +sint64 query_money(const object *op); +int pay_for_amount(sint64 to_pay, object *pl); int pay_for_item(object *op, object *pl); int can_pay(object *pl); -int get_payment(object *pl, object *op); void sell_item(object *op, object *pl); -double shopkeeper_approval(const mapstruct *map, const object *player); +double shopkeeper_approval(const maptile *map, const object *player); int describe_shop(const object *op); void shop_listing(object *op); bool is_in_shop (object *o); -bool is_in_shop (mapstruct *map, int x, int y); +bool is_in_shop (maptile *map, int x, int y); /* skills.c */ int steal(object *op, int dir, object *skill); int pick_lock(object *pl, int dir, object *skill); @@ -794,7 +682,7 @@ 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, mapstruct *map, object *originator); +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); sint16 SP_level_spellpoint_cost(object *caster, object *spell, int flags); @@ -803,14 +691,14 @@ int SP_level_range_adjust(object *caster, object *spob); object *check_spell_known(object *op, const char *name); object *lookup_spell_by_name(object *op, const char *spname); -int reflwall(mapstruct *m, int x, int y, object *sp_op); +int reflwall(maptile *m, int x, int y, object *sp_op); int cast_create_obj(object *op, object *caster, object *new_op, int dir); -int ok_to_put_more(mapstruct *m, sint16 x, sint16 y, object *op, int immune_stop); +int ok_to_put_more(maptile *m, sint16 x, sint16 y, object *op, int immune_stop); int fire_arch_from_position(object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); void regenerate_rod(object *rod); void drain_rod_charge(object *rod); object *find_target_for_friendly_spell(object *op, int dir); -int spell_find_dir(mapstruct *m, int x, int y, object *exclude); +int spell_find_dir(maptile *m, int x, int y, object *exclude); void put_a_monster(object *op, const char *monstername); int summon_hostile_monsters(object *op, int n, const char *monstername); void shuffle_attack(object *op, int change_face); @@ -826,11 +714,11 @@ void move_deep_swamp(object *op); /* swap.c */ void read_map_log(void); -void swap_map(mapstruct *map); +void swap_map(maptile *map); void check_active_maps(void); -mapstruct *map_least_timeout(char *except_level); +maptile *map_least_timeout(char *except_level); void swap_below_max(char *except_level); -int players_on_map(mapstruct *m, int show_all); +int players_on_map(maptile *m, int show_all); void flush_old_maps(void); /* time.c */ void remove_door(object *op); @@ -847,7 +735,7 @@ void animate_trigger(object *op); void move_hole(object *op); object *stop_item(object *op); -void fix_stopped_item(object *op, mapstruct *map, object *originator); +void fix_stopped_item(object *op, maptile *map, object *originator); object *fix_stopped_arrow(object *op); void move_arrow(object *op); void change_object(object *op); @@ -866,10 +754,10 @@ int cftimer_destroy(int id); int cftimer_find_free_id(void); /* weather.c */ -void set_darkness_map(mapstruct *m); +void set_darkness_map(maptile *m); void tick_the_clock(void); void init_weather(void); void weather_effect(const char *filename); -int worldmap_to_weathermap(int x, int y, int *wx, int *wy, mapstruct *m); -int real_world_temperature(int x, int y, mapstruct *m); +int worldmap_to_weathermap(int x, int y, int *wx, int *wy, maptile *m); +int real_world_temperature(int x, int y, maptile *m); int similar_direction(int a, int b);