version 1.48 | | version 1.49 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.48 2006/03/07 18:46:21 cavesomething Exp $"; | | * "$Id: init.c,v 1.49 2006/03/18 15:05:31 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#include <global.h> | | #include <global.h> |
#include <object.h> | | #include <object.h> |
| | |
/* You unforunately need to looking in include/global.h to see what these | | /** You unforunately need to looking in include/global.h to see what these |
* correspond to. | | * correspond to. |
*/ | | */ |
struct Settings settings = { | | struct Settings settings = { |
| | |
1, /* no_player_stealing */ | | 1, /* no_player_stealing */ |
}; | | }; |
| | |
/* perhaps not the best place for this, but needs to be | | /** perhaps not the best place for this, but needs to be |
* in some file in the common area so that standalone | | * in some file in the common area so that standalone |
* programs, like the random map generator, can be built. | | * programs, like the random map generator, can be built. |
*/ | | */ |
| | |
}; | | }; |
| | |
| | |
/* This loads the emergency map information from a | | /** This loads the emergency map information from a |
* .emergency file in the map directory. Doing this makes | | * .emergency file in the map directory. Doing this makes |
* it easier to switch between map distributions (don't need | | * it easier to switch between map distributions (don't need |
* to recompile. Note that there is no reason I see that | | * to recompile. Note that there is no reason I see that |
| | |
} | | } |
| | |
| | |
/* | | /** |
* It is vital that init_library() is called by any functions | | * It is vital that init_library() is called by any functions |
* using this library. | | * using this library. |
* If you want to lessen the size of the program using the library, | | * If you want to lessen the size of the program using the library, |
| | |
init_objects(); | | init_objects(); |
init_vars(); | | init_vars(); |
init_block(); | | init_block(); |
ReadBmapNames (); | | read_bmap_names (); |
ReadSmooth(); | | read_smooth(); |
init_anim(); /* Must be after we read in the bitmaps */ | | init_anim(); /* Must be after we read in the bitmaps */ |
init_archetypes(); /* Reads all archetypes from file */ | | init_archetypes(); /* Reads all archetypes from file */ |
init_dynamic (); | | init_dynamic (); |
| | |
} | | } |
| | |
| | |
/* init_environ initializes values from the environmental variables. | | /** init_environ initializes values from the environmental variables. |
* 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. |
*/ | | */ |
| | |
} | | } |
| | |
| | |
/* | | /** |
* Initialises all global variables. | | * Initialises all global variables. |
* Might use environment-variables as default for some of them. | | * Might use environment-variables as default for some of them. |
*/ | | */ |
| | |
init_defaults(); | | init_defaults(); |
} | | } |
| | |
/* | | /** |
* Sets up and initialises the linked list of free and used objects. | | * Sets up and initialises the linked list of free and used objects. |
* Allocates a certain chunk of objects and puts them on the free list. | | * Allocates a certain chunk of objects and puts them on the free list. |
* Called by init_library(); | | * Called by init_library(); |
| | |
#endif | | #endif |
} | | } |
| | |
/* | | /** |
* Initialises global variables which can be changed by options. | | * Initialises global variables which can be changed by options. |
* Called by init_library(). | | * Called by init_library(). |
*/ | | */ |
| | |
nroferrors=0; | | nroferrors=0; |
} | | } |
| | |
| | /** |
| | * Initializes first_map_path from the archetype collection. |
| | */ |
void init_dynamic (void) { | | void init_dynamic (void) { |
archetype *at = first_archetype; | | archetype *at = first_archetype; |
while (at) { | | while (at) { |
| | |
| | |
unsigned long todtick; | | unsigned long todtick; |
| | |
/* | | /** |
* Write out the current time to the file so time does not | | * Write out the current time to the file so time does not |
* reset every time the server reboots. | | * reset every time the server reboots. |
*/ | | */ |
| | |
fclose(fp); | | fclose(fp); |
} | | } |
| | |
/* | | /** |
* Initializes the gametime and TOD counters | | * Initializes the gametime and TOD counters |
* Called by init_library(). | | * Called by init_library(). |
*/ | | */ |
| | |
fclose(fp); | | fclose(fp); |
} | | } |
| | |
/* | | attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; |
| | |
| | /** |
* Initializes the attack messages. | | * Initializes the attack messages. |
* Called by init_library(). | | * Called by init_library(). |
*/ | | */ |
| | |
attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; | | |
| | |
void init_attackmess(void){ | | void init_attackmess(void){ |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
char filename[MAX_BUF]; | | char filename[MAX_BUF]; |