… | |
… | |
22 | */ |
22 | */ |
23 | |
23 | |
24 | #include <global.h> |
24 | #include <global.h> |
25 | #include <material.h> |
25 | #include <material.h> |
26 | #include <loader.h> |
26 | #include <loader.h> |
27 | #ifndef __CEXTRACT__ |
|
|
28 | # include <sproto.h> |
27 | #include <sproto.h> |
29 | #endif |
|
|
30 | |
|
|
31 | /* global weathermap */ |
|
|
32 | weathermap_t **weathermap; |
|
|
33 | |
28 | |
34 | void |
29 | void |
35 | set_logfile (char *val) |
30 | set_logfile (char *val) |
36 | { |
31 | { |
37 | settings.logfilename = val; |
32 | settings.logfilename = val; |
… | |
… | |
1015 | * LibDir in this pass would be reasonable*/ |
1010 | * LibDir in this pass would be reasonable*/ |
1016 | |
1011 | |
1017 | cfperl_init (); |
1012 | cfperl_init (); |
1018 | init_library (); /* Must be called early */ |
1013 | init_library (); /* Must be called early */ |
1019 | load_settings (); /* Load the settings file */ |
1014 | load_settings (); /* Load the settings file */ |
1020 | init_weather (); |
|
|
1021 | load_materials (); |
1015 | load_materials (); |
1022 | parse_args (argc, argv, 2); |
1016 | parse_args (argc, argv, 2); |
1023 | fprintf (logfile, "Welcome to CrossFire, v%s\n", VERSION); |
1017 | fprintf (logfile, "Welcome to CrossFire, v%s\n", VERSION); |
1024 | fprintf (logfile, "Copyright (C) 1994 Mark Wedel.\n"); |
1018 | fprintf (logfile, "Copyright (C) 1994 Mark Wedel.\n"); |
1025 | fprintf (logfile, "Copyright (C) 1992 Frank Tore Johansen.\n"); |
1019 | fprintf (logfile, "Copyright (C) 1992 Frank Tore Johansen.\n"); |
… | |
… | |
1034 | |
1028 | |
1035 | init_startup (); /* Write (C), check shutdown/forbid files */ |
1029 | init_startup (); /* Write (C), check shutdown/forbid files */ |
1036 | init_uuid (); |
1030 | init_uuid (); |
1037 | init_signals (); /* Sets up signal interceptions */ |
1031 | init_signals (); /* Sets up signal interceptions */ |
1038 | init_commands (); /* Sort command tables */ |
1032 | init_commands (); /* Sort command tables */ |
1039 | read_map_log (); /* Load up the old temp map files */ |
|
|
1040 | init_skills (); |
1033 | init_skills (); |
1041 | |
1034 | |
1042 | parse_args (argc, argv, 3); |
1035 | parse_args (argc, argv, 3); |
1043 | |
1036 | |
1044 | if (settings.daemonmode) |
1037 | if (settings.daemonmode) |
… | |
… | |
1255 | rec_sighup (int i) |
1248 | rec_sighup (int i) |
1256 | { |
1249 | { |
1257 | LOG (llevInfo, "SIGHUP received\n"); |
1250 | LOG (llevInfo, "SIGHUP received\n"); |
1258 | |
1251 | |
1259 | if (init_done) |
1252 | if (init_done) |
1260 | cleanup (); |
1253 | cleanup (0); |
1261 | |
1254 | |
1262 | exit (0); |
1255 | exit (0); |
1263 | } |
1256 | } |
1264 | |
1257 | |
1265 | void |
1258 | void |