version 1.43 | | version 1.44 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.43 2005/10/28 19:08:53 akirschbaum Exp $"; | | * "$Id: init.c,v 1.44 2005/12/05 23:34:03 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* this could not be re-loaded during play, but it seems | | * this could not be re-loaded during play, but it seems |
* like there should be little reason to do that. | | * like there should be little reason to do that. |
*/ | | */ |
static void init_emergency_mappath() | | static void init_emergency_mappath(void) |
{ | | { |
char filename[MAX_BUF], tmpbuf[MAX_BUF]; | | char filename[MAX_BUF], tmpbuf[MAX_BUF]; |
FILE *fp; | | FILE *fp; |
| | |
* init_hash_table if you are doing any object loading. | | * init_hash_table if you are doing any object loading. |
*/ | | */ |
| | |
void init_library() { | | void init_library(void) { |
init_environ(); | | init_environ(); |
init_globals(); | | init_globals(); |
init_hash_table(); | | init_hash_table(); |
| | |
* it needs to be called very early, since command line options should | | * it needs to be called very early, since command line options should |
* overwrite these if specified. | | * overwrite these if specified. |
*/ | | */ |
void init_environ() { | | void init_environ(void) { |
char *cp; | | char *cp; |
| | |
cp=getenv("CROSSFIRE_LIBDIR"); | | cp=getenv("CROSSFIRE_LIBDIR"); |
| | |
* Might use environment-variables as default for some of them. | | * Might use environment-variables as default for some of them. |
*/ | | */ |
| | |
void init_globals() { | | void init_globals(void) { |
if (settings.logfilename[0] == 0) { | | if (settings.logfilename[0] == 0) { |
logfile = stderr; | | logfile = stderr; |
} | | } |
| | |
* Called by init_library(); | | * Called by init_library(); |
*/ | | */ |
| | |
void init_objects() { | | void init_objects(void) { |
int i; | | int i; |
/* Initialize all objects: */ | | /* Initialize all objects: */ |
objects=NULL; | | objects=NULL; |
| | |
* Called by init_library(). | | * Called by init_library(). |
*/ | | */ |
| | |
void init_defaults() { | | void init_defaults(void) { |
editor=0; | | editor=0; |
nroferrors=0; | | nroferrors=0; |
} | | } |
| | |
| | |
void init_dynamic () { | | void init_dynamic (void) { |
archetype *at = first_archetype; | | archetype *at = first_archetype; |
while (at) { | | while (at) { |
if (at->clone.type == MAP && EXIT_PATH (&at->clone)) { | | if (at->clone.type == MAP && EXIT_PATH (&at->clone)) { |
| | |
* reset every time the server reboots. | | * reset every time the server reboots. |
*/ | | */ |
| | |
void write_todclock() | | void write_todclock(void) |
{ | | { |
char filename[MAX_BUF]; | | char filename[MAX_BUF]; |
FILE *fp; | | FILE *fp; |
| | |
* Called by init_library(). | | * Called by init_library(). |
*/ | | */ |
| | |
void init_clocks() | | void init_clocks(void) |
{ | | { |
char filename[MAX_BUF]; | | char filename[MAX_BUF]; |
FILE *fp; | | FILE *fp; |
| | |
| | |
attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; | | attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; |
| | |
void init_attackmess(){ | | void init_attackmess(void){ |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
char filename[MAX_BUF]; | | char filename[MAX_BUF]; |
char *cp, *p; | | char *cp, *p; |