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