--- deliantra/server/include/global.h 2006/02/03 07:12:49 1.1.1.1 +++ deliantra/server/include/global.h 2006/09/03 00:18:41 1.10 @@ -107,6 +107,14 @@ #endif +#include + +#include "keyword.h" +#include "traits.h" +#include "dynbuf.h" +#include "shstr.h" +#include "util.h" + /* This blob, in this order, is needed to actually define maps */ #include "face.h" /* Include the basic defines from spells.h */ @@ -137,7 +145,7 @@ * (now used by alchemy and other code too. Nov 95 b.t). */ typedef struct linked_char { - const char *name; + shstr name; struct linked_char *next; } linked_char; @@ -178,8 +186,6 @@ EXTERN godlink *first_god; EXTERN racelink *first_race; -#define NROF_COMPRESS_METHODS 4 -EXTERN char *uncomp[NROF_COMPRESS_METHODS][3]; /* * The editor uses these (will get them out of here later): */ @@ -191,13 +197,13 @@ */ EXTERN long warn_archetypes; /* If true, write warnings when failing */ - /* to find archetypes when loading from file */ + /* to find archetypes when loading from file */ EXTERN long init_done; /* Ignores signals until init_done is true */ EXTERN long trying_emergency_save; /* True when emergency_save() is reached */ EXTERN long nroferrors; /* If it exceeds MAX_ERRORS, call fatal() */ extern long pticks; /* used by various function to determine */ - /* how often to save the character */ + /* how often to save the character */ /* * Misc global variables: */ @@ -210,6 +216,7 @@ EXTERN archetype *empty_archetype; /* Nice to have fast access to it */ EXTERN archetype *map_archeytpe; EXTERN char first_map_path[MAX_BUF]; /* The start-level */ +EXTERN char first_map_ext_path[MAX_BUF]; /* Path used for per-race start maps */ EXTERN char errmsg[HUGE_BUF]; EXTERN long ob_count; @@ -217,9 +224,9 @@ * Used in treasure.c */ EXTERN archetype *ring_arch,*amulet_arch,*staff_arch,*crown_arch; -EXTERN const char *undead_name; /* Used in hit_player() in main.c */ +extern shstr undead_name; /* Used in hit_player() in main.c */ -EXTERN Animations *animations; +extern std::vector animations; EXTERN int num_animations,animations_allocated, bmaps_checksum; /* Rotate right from bsd sum. This is used in various places for checksumming */ @@ -266,14 +273,6 @@ * makes the code a bit cleaner when doing so. */ #define FREE_AND_CLEAR(xyz) {free(xyz); xyz=NULL; } -#define FREE_AND_CLEAR_STR(xyz) {free_string(xyz); xyz=NULL; } - -/* FREE_AND_COPY is for the shared string - it is handy enough - * to use all over the place. - */ -#define FREE_AND_COPY(sv,nv) { if (sv) free_string(sv); sv=add_string(nv); } - -#define DELETE_STRING(__str_) free_string(__str_);__str_=NULL; #ifdef CALLOC #undef CALLOC @@ -328,7 +327,9 @@ char *tmpdir; /* Directory to use for temporary files */ uint8 stat_loss_on_death; /* If true, chars lose a random stat when they die */ sint16 pk_luck_penalty; /* Amount by which player luck is reduced if they PK */ - uint8 use_permanent_experience; /* If true, players can gain perm exp */ + uint8 permanent_exp_ratio; /* how much exp should be 'permenant' and unable to be lost*/ + uint8 death_penalty_ratio; /* how much exp should be lost at death */ + uint8 death_penalty_level; /* how many levels worth of exp may be lost on one death */ uint8 balanced_stat_loss; /* If true, Death stat depletion based on level etc */ uint8 not_permadeth; /* if true, death is non-permament */ uint8 simple_exp; /* If true, use the simple experience system */ @@ -338,7 +339,7 @@ uint8 search_items; /* search_items command */ uint8 spell_encumbrance; /* encumbrance effects spells */ uint8 spell_failure_effects; /* nasty backlash to spell failures */ - uint16 set_friendly_fire; /* Percent of damage done by peaceful player vs player damage */ + uint16 set_friendly_fire; /* Percent of damage done by peaceful player vs player damage */ uint8 casting_time; /* it takes awhile to cast a spell */ uint8 real_wiz; /* use mud-like wizards */ uint8 recycle_tmp_maps; /* re-use tmp maps. */ @@ -381,6 +382,7 @@ int armor_speed_improvement; /* Speed improvement */ uint8 armor_speed_linear; /* If 1, speed improvement is linear, else exponantiel */ uint8 no_player_stealing; /* If 1, can not steal from other players */ + uint8 create_home_portals; /* If 1, can create portals in personal maps */ } Settings; extern Settings settings; @@ -405,5 +407,6 @@ #define SCRIPT_FIX_NOTHING 0 #include "plugin.h" +#include "cfperl.h" #endif /* GLOBAL_H */