--- deliantra/server/include/libproto.h 2010/01/16 13:41:37 1.81
+++ deliantra/server/include/libproto.h 2012/11/14 06:21:39 1.105
@@ -1,24 +1,24 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
- *
- * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
- * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
- * Copyright (©) 1992,2007 Frank Tore Johansen
- *
+ *
+ * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
+ * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
+ * Copyright (©) 1992 Frank Tore Johansen
+ *
* Deliantra is free software: you can redistribute it and/or modify it under
* the terms of the Affero 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 Affero GNU General Public License
* and the GNU General Public License along with this program. If not, see
* .
- *
+ *
* The authors can be reached via e-mail to
*/
@@ -28,7 +28,6 @@
/* anim.c */
void free_all_anim ();
void init_anim ();
-int find_animation (const char *name);
void animate_object (object *op, int dir);
/* arch.c */
archetype *find_archetype_by_object_name (const char *name);
@@ -45,7 +44,6 @@
void free_all_archs ();
void check_generators ();
bool load_archetype_file (const char *filename);
-object *get_archetype (const char *name);
unsigned long hasharch (const char *str, int tablesize);
object *clone_arch (int type);
object *object_create_arch (archetype *at);
@@ -63,16 +61,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 (int err);
/* holy.c */
void init_gods ();
godlink *get_rand_god ();
@@ -103,10 +100,9 @@
const typedata *get_typedata (int itemtype);
const typedata *get_typedata_by_name (const char *name);
const char *describe_resistance (const object *op, int newline);
-const char *get_levelnumber (int i);
+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 */
@@ -118,14 +114,13 @@
void change_attr_value (living *stats, int attr, sint8 value);
void check_stat_bounds (living *stats);
int change_abil (object *op, object *tmp);
-int allowed_class (const object *op);
void set_dragon_name (object *pl, const object *abil, const object *skin);
object *give_skill_by_name (object *op, const char *skill_name);
void player_lvl_adj (object *who, object *op);
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 */
@@ -141,6 +136,7 @@
char *dump_object (object *op);
void dump_me (object *op, char *outstr);
object *find_object (tag_t i);
+object *find_object_uuid (UUID i);
object *find_object_name (const char *str);
void free_all_object_data ();
void update_turn_face (object *op);
@@ -150,7 +146,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);
@@ -171,17 +167,9 @@
/* 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);
-int is_dragon_pl (const object *op);
/* quest.c */
int quest_is_quest_marker (const object *marker, int task);
int quest_is_in_progress (const object *marker, int task);
@@ -235,12 +223,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 */
@@ -249,7 +235,7 @@
char *get_ob_diff (object *op, object *op2);
bool load_resource_file_ (const char *filename);
/* map.c */
-maptile *find_style (const char *dirname, const char *stylename, int difficulty);
+maptile *find_style (const char *dirname, const char *stylename, int difficulty, bool recurse = false);
object *pick_random_object (maptile *style);
/* former funcpoint.h */