--- deliantra/server/include/libproto.h 2010/04/13 02:39:53 1.88 +++ deliantra/server/include/libproto.h 2010/05/06 22:35:41 1.98 @@ -63,16 +63,15 @@ void check_inv (object *op, object *trig); void verify_button_links (const maptile *map); /* exp.c */ +int exp_to_level (sint64 exp); +sint64 level_to_min_exp (int level); int new_exp (const object *ob); -void init_experience (); -void dump_experience (); +void reload_exp_table (); /* friend.c */ void add_friendly_object (object *op); void remove_friendly_object (object *op); void dump_friendly_objects (); void clean_friendly_list (); -/* glue.c */ -void fatal (const char *msg); /* holy.c */ void init_gods (); godlink *get_rand_god (); @@ -106,7 +105,6 @@ const char *ordinal (int i); const char *describe_item (const object *op, object *owner); int is_magical (const object *op); -int need_identify (const object *op); void identify (object *op); void examine (object *op, object *tmp); /* links.c */ @@ -125,7 +123,7 @@ sint64 level_exp (int level, double expmul); void calc_perm_exp (object *op); sint64 check_exp_adjust (const object *op, sint64 exp); -void change_exp (object *op, sint64 exp, const char *skill_name, int flag); +void change_exp (object *op, sint64 exp, shstr_tmp skill_name, int flag); void apply_death_exp_penalty (object *op); int did_make_save (const object *op, int level, int bonus); /* los.c */ @@ -151,7 +149,7 @@ object *insert_ob_in_map (object *op, maptile *m, object *originator, int flag); void replace_insert_ob_in_map (shstr_tmp archname, object *op); object *insert_ob_in_ob (object *op, object *where); -int check_move_on (object *op, object *originator); +int check_move_on (object *op, object *originator, int flags = 0); object *present_arch (const archetype *at, maptile *m, int x, int y); object *present (unsigned char type, maptile *m, int x, int y); object *present_in_ob (unsigned char type, const object *op); @@ -172,13 +170,6 @@ /* path.c */ char *path_combine (const char *src, const char *dst); char *path_combine_and_normalize (const char *src, const char *dst); -/* porting.c */ -void remove_directory (const char *path); -char *ltostr10 (signed long n); -char *doubletostr10 (double v); -FILE *open_and_uncompress (const char *name, int flag, int *compressed); -void close_and_delete (FILE *fp, int compressed); -void make_path_to_file (char *filename); /* player.c */ void free_player (player *pl); int atnr_is_dragon_enabled (int attacknr); @@ -235,12 +226,10 @@ void generate_artifact (object *op, int difficulty); void fix_flesh_item (object *item, object *donor); /* utils.c */ -int random_roll (int min, int max, const object *op, int goodbad); -sint64 random_roll64 (sint64 min, sint64 max, const object *op, int goodbad); -int die_roll (int num, int size, const object *op, int goodbad); -materialtype_t *name_to_material (const shstr_tmp name); +int random_roll (int min, int max, const object *op, bool prefer_high); +sint64 random_roll64 (sint64 min, sint64 max, const object *op, bool prefer_high); +int die_roll (int num, int size, const object *op, bool prefer_high); void transmute_materialname (object *op, const object *change); -void strip_media_tag (char *message); void strip_endline (char *buf); void replace (const char *src, const char *key, const char *replacement, char *result, size_t resultsize); /* loader.c */