--- deliantra/server/include/global.h 2006/04/28 13:56:26 1.3 +++ deliantra/server/include/global.h 2006/09/11 01:49:03 1.16 @@ -77,7 +77,6 @@ typedef signed char sint8; #define SINT8_MAX 127 - typedef unsigned short Fontindex; #ifdef WIN32 @@ -107,6 +106,17 @@ #endif +#include + +#define ACC_CLASS(name) +#define ACC(meta,member) member + +#include "keyword.h" +#include "traits.h" +#include "dynbuf.h" +#include "util.h" +#include "shstr.h" + /* This blob, in this order, is needed to actually define maps */ #include "face.h" /* Include the basic defines from spells.h */ @@ -137,11 +147,10 @@ * (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; - /* Pull in artifacts */ #include "artifact.h" @@ -178,8 +187,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 +198,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: */ @@ -218,9 +225,8 @@ * 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 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 */ @@ -267,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 @@ -403,11 +401,22 @@ #define GETTIMEOFDAY(last_time) gettimeofday(last_time); #endif -/* GROS: Those are used by plugin events (argument fixthem) */ -#define SCRIPT_FIX_ACTIVATOR 2 -#define SCRIPT_FIX_ALL 1 -#define SCRIPT_FIX_NOTHING 0 - #include "plugin.h" +#include "cfperl.h" + +//TODO: various TEMPORARY link guards to avoid doing the wrong thing +void free (object *); +void free (archetype *); +void free (recipe *); +void free (linked_char *); +void free (godlink *); +void free (mapstruct *); +void free (key_value *); +void free (treasure *); +void free (materialtype_t *); +void free (player *); +void free (New_Face *); +void free (racelink *); #endif /* GLOBAL_H */ +