|
Atrinik Server 2.5
|
#include <global.h>Go to the source code of this file.
Data Structures | |
| struct | Command_Line_Options |
Defines | |
| #define | INIT_C |
| #define | EXTERN |
| #define | ARCHETYPE_LEVEL_UP "level_up" |
Functions | |
| static void | usage () |
| static void | help () |
| static void | init_beforeplay () |
| static void | fatal_signal (int make_core) |
| static void | init_signals () |
| static void | dump_level_colors_table () |
| static void | init_environ () |
| static void | init_defaults () |
| static void | init_dynamic () |
| static void | init_clocks () |
| static void | init_strings () |
| void | free_strings () |
| void | init_library () |
| void | init_globals () |
| void | write_todclock () |
| static void | parse_args (int argc, char *argv[], int pass) |
| static void | load_settings () |
| void | init (int argc, char **argv) |
| void | compile_info () |
Variables | |
| struct Settings | settings |
| int | world_darkness |
| unsigned long | todtick |
| archetype * | level_up_arch = NULL |
| struct Command_Line_Options | options [] |
Server initialization, settings loading, command line handling and such.
Definition in file init.c.
| #define ARCHETYPE_LEVEL_UP "level_up" |
| void compile_info | ( | ) |
| static void dump_level_colors_table | ( | ) | [static] |
| static void fatal_signal | ( | int | make_core | ) | [static] |
| static void help | ( | ) | [static] |
| void init | ( | int | argc, |
| char ** | argv | ||
| ) |
| static void init_beforeplay | ( | ) | [static] |
| static void init_clocks | ( | ) | [static] |
Initializes the gametime and TOD counters.
Called by init_library().
| static void init_defaults | ( | ) | [static] |
Initializes global variables which can be changed by options.
Called by init_library().
| static void init_dynamic | ( | ) | [static] |
| static void init_environ | ( | ) | [static] |
| void init_globals | ( | ) |
| void init_library | ( | ) |
It is vital that init_library() is called by any functions using this library.
If you want to lessen the size of the program using the library, you can replace the call to init_library() with init_globals() and init_function_pointers(). Good idea to also call init_vars() and init_hash_table() if you are doing any object loading.
| static void init_signals | ( | ) | [static] |
| static void init_strings | ( | ) | [static] |
| static void load_settings | ( | ) | [static] |
| static void parse_args | ( | int | argc, |
| char * | argv[], | ||
| int | pass | ||
| ) | [static] |
| void write_todclock | ( | ) |
| archetype* level_up_arch = NULL |
| struct Command_Line_Options options[] |
Valid command line options.
The way this system works is pretty simple - parse_args takes the options passed to the program and a pass number. If an option matches both in name and in pass (and we have enough options), we call the associated function. This makes writing a multi pass system very easy, and it is very easy to add in new options.
You unfortunately need to looking in include/global.h to see what these correspond to.
| int world_darkness |
1.7.4