--- deliantra/server/common/init.C 2006/09/04 11:07:59 1.5 +++ deliantra/server/common/init.C 2006/09/07 13:52:08 1.8 @@ -1,6 +1,6 @@ /* * static char *rcsid_init_c = - * "$Id: init.C,v 1.5 2006/09/04 11:07:59 root Exp $"; + * "$Id: init.C,v 1.8 2006/09/07 13:52:08 root Exp $"; */ /* @@ -26,11 +26,41 @@ The authors can be reached via e-mail at crossfire-devel@real-time.com */ -#define EXTERN -#define INIT_C +#define EXTERN // horrible hack + #include #include +extern const char* const attacktype_desc[NROFATTACKS] = { +# define def(uc, name, lc, plus, change) # name, +# include "attackinc.h" +# undef def +}; + +extern const keyword resist_save[NROFATTACKS] = { +# define def(uc, name, lc, plus, change) KW_resist_ ## lc, +# include "attackinc.h" +# undef def +}; + +extern const char* const resist_plus[NROFATTACKS] = { +# define def(uc, name, lc, plus, change) # plus, +# include "attackinc.h" +# undef def +}; + +extern const char* const change_resist_msg[NROFATTACKS] = { +# define def(uc, name, lc, plus, change) # change, +# include "attackinc.h" +# undef def +}; + +int resist_table[NROFATTACKS] = { +# define def(uc, name, lc, plus, change) ATNR_ ## uc, +# include "attackinc.h" +# undef def +}; + /* You unforunately need to looking in include/global.h to see what these * correspond to. */ @@ -268,10 +298,11 @@ * Called by init_library(); */ -void init_objects(void) { - int i; -/* Initialize all objects: */ - objects=NULL; +void +init_objects(void) +{ + /* Initialize all objects: */ + objects = NULL; active_objects = NULL; }