ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/init.C
(Generate patch)

Comparing deliantra/server/server/init.C (file contents):
Revision 1.61 by root, Thu Apr 10 15:35:16 2008 UTC vs.
Revision 1.64 by root, Tue Apr 22 23:50:24 2008 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
278 {"-m6", 0, 3, set_dumpmon6}, 278 {"-m6", 0, 3, set_dumpmon6},
279 {"-m7", 0, 3, set_dumpmon7}, 279 {"-m7", 0, 3, set_dumpmon7},
280 {"-m8", 0, 3, set_dumpmon8}, 280 {"-m8", 0, 3, set_dumpmon8},
281 {"-m9", 0, 3, set_dumpmon9}, 281 {"-m9", 0, 3, set_dumpmon9},
282 {"-mt", 1, 3, (void (*)()) set_dumpmont}, 282 {"-mt", 1, 3, (void (*)()) set_dumpmont},
283 {"-mexp", 0, 3, dump_experience},
284 {"-s", 0, 3, showscores}, 283 {"-s", 0, 3, showscores},
285 {"-score", 1, 3, (void (*)()) showscoresparm} 284 {"-score", 1, 3, (void (*)()) showscoresparm}
286}; 285};
287 286
288 287
915init (int argc, char **argv) 914init (int argc, char **argv)
916{ 915{
917 init_done = 0; /* Must be done before init_signal() */ 916 init_done = 0; /* Must be done before init_signal() */
918 rndm.seed (time (0)); 917 rndm.seed (time (0));
919 918
920 logfile = stderr;
921 init_environ (); 919 init_environ ();
922 parse_args (argc, argv, 1); /* First arg pass - right now it does 920 parse_args (argc, argv, 1); /* First arg pass - right now it does
923 * nothing, but in future specifying the 921 * nothing, but in future specifying the
924 * LibDir in this pass would be reasonable*/ 922 * LibDir in this pass would be reasonable*/
925 923
931 init_block (); 929 init_block ();
932 cfperl_init (); 930 cfperl_init ();
933 load_settings (); /* Load the settings file */ 931 load_settings (); /* Load the settings file */
934 load_materials (); 932 load_materials ();
935 parse_args (argc, argv, 2); 933 parse_args (argc, argv, 2);
936 fprintf (logfile, "Welcome to Deliantra, v%s\n", VERSION); 934 LOG (llevInfo, "Welcome to Deliantra, v" VERSION);
937 fprintf (logfile, "Copyright (C) 2005, 2006, 2007 Marc Lehmann.\n"); 935 LOG (llevInfo, "Copyright (C) Marc Alexander Lehmann / Robin Redeker / the Deliantra team.");
938 fprintf (logfile, "Copyright (C) 1994 Mark Wedel.\n"); 936 LOG (llevInfo, "Copyright (C) 1994 Mark Wedel.");
939 fprintf (logfile, "Copyright (C) 1992 Frank Tore Johansen.\n"); 937 LOG (llevInfo, "Copyright (C) 1992 Frank Tore Johansen.");
940 938
941 if (strcmp (settings.dm_mail, "") != 0) 939 if (strcmp (settings.dm_mail, "") != 0)
942 { 940 {
943 fprintf (logfile, "Maintained locally by: %s\n", settings.dm_mail); 941 LOG (llevInfo, "Maintained locally by: %s\n", settings.dm_mail);
944 fprintf (logfile, "Questions and bugs should be mailed to above address.\n"); 942 LOG (llevInfo, "Questions and bugs should be mailed to above address.\n");
945 } 943 }
946 944
947 UUID::init (); 945 UUID::init ();
948 init_signals (); /* Sets up signal interceptions */ 946 init_signals (); /* Sets up signal interceptions */
949 init_commands (); /* Sort command tables */ 947 init_commands (); /* Sort command tables */
956} 954}
957 955
958void 956void
959usage (void) 957usage (void)
960{ 958{
961 (void) fprintf (logfile, "Usage: deliantra-server [-h] [-<flags>]...\n"); 959 fprintf (stderr, "Usage: deliantra-server [-h] [-<flags>]...\n");
962} 960}
963 961
964void 962void
965help (void) 963help (void)
966{ 964{
1008 1006
1009void 1007void
1010init_beforeplay (void) 1008init_beforeplay (void)
1011{ 1009{
1012 init_artifacts (); /* If not called before, reads all artifacts from file */ 1010 init_artifacts (); /* If not called before, reads all artifacts from file */
1013 init_spells (); /* If not called before, links archtypes used by spells */
1014 init_archetype_pointers (); /* Setup global pointers to archetypes */
1015 init_races (); /* overwrite race designations using entries in lib/races file */ 1011 init_races (); /* overwrite race designations using entries in lib/races file */
1016 init_gods (); /* init linked list of gods from archs */ 1012 init_gods (); /* init linked list of gods from archs */
1017 init_readable (); /* inits useful arrays for readable texts */ 1013 init_readable (); /* inits useful arrays for readable texts */
1018 init_formulae (); /* If not called before, reads formulae from file */ 1014 init_formulae (); /* If not called before, reads formulae from file */
1019} 1015}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines