version 1.39 | | version 1.40 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.39 2002/11/26 07:44:28 garbled Exp $"; | | * "$Id: init.c,v 1.40 2002/11/26 08:08:00 garbled Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
{"-d", 0, 1, set_debug}, | | {"-d", 0, 1, set_debug}, |
{"+d", 0, 1, unset_debug}, | | {"+d", 0, 1, unset_debug}, |
{"-mon", 0, 1, set_mondebug}, | | {"-mon", 0, 1, set_mondebug}, |
#ifndef SECURE | | |
{"-data",1,1, set_datadir}, | | {"-data",1,1, set_datadir}, |
{"-conf",1,1, set_confdir}, | | {"-conf",1,1, set_confdir}, |
{"-local",1,1, set_localdir}, | | {"-local",1,1, set_localdir}, |
| | |
{"-treasures", 1, 1, set_treasures}, | | {"-treasures", 1, 1, set_treasures}, |
{"-uniquedir", 1, 1, set_uniquedir}, | | {"-uniquedir", 1, 1, set_uniquedir}, |
{"-tmpdir", 1, 1, set_tmpdir}, | | {"-tmpdir", 1, 1, set_tmpdir}, |
#endif | | |
{"-log", 1, 1, set_logfile}, | | {"-log", 1, 1, set_logfile}, |
| | |
/* Pass 2 functions. Most of these could probably be in pass 1, | | /* Pass 2 functions. Most of these could probably be in pass 1, |
| | |
* and defaults should have been set up. | | * and defaults should have been set up. |
*/ | | */ |
{"-o", 0, 3, compile_info}, | | {"-o", 0, 3, compile_info}, |
#ifdef DUMP_SWITCHES | | |
{"-m", 0, 3, set_dumpmon1}, | | {"-m", 0, 3, set_dumpmon1}, |
{"-m2", 0, 3, set_dumpmon2}, | | {"-m2", 0, 3, set_dumpmon2}, |
{"-m3", 0, 3, set_dumpmon3}, | | {"-m3", 0, 3, set_dumpmon3}, |
| | |
{"-m9", 0, 3, set_dumpmon9}, | | {"-m9", 0, 3, set_dumpmon9}, |
{"-mt", 1, 3, set_dumpmont}, | | {"-mt", 1, 3, set_dumpmont}, |
{"-mexp", 0, 3, dump_experience}, | | {"-mexp", 0, 3, dump_experience}, |
#endif | | |
{"-s", 0, 3, showscores}, | | {"-s", 0, 3, showscores}, |
{"-score", 1, 3, showscoresparm} | | {"-score", 1, 3, showscoresparm} |
}; | | }; |
| | |
printf(" -s Display the high-score list.\n"); | | printf(" -s Display the high-score list.\n"); |
printf(" -score <name or class> Displays all high scores with matching name/class.\n"); | | printf(" -score <name or class> Displays all high scores with matching name/class.\n"); |
printf(" -v Print version and contributors.\n"); | | printf(" -v Print version and contributors.\n"); |
| | |
#ifndef SECURE | | |
printf("\nThe following options are only available if a secure server was not compiled.\n"); | | |
printf(" -data Sets the lib dir (archetypes, treasures, etc.)\n"); | | printf(" -data Sets the lib dir (archetypes, treasures, etc.)\n"); |
printf(" -local Read/write local data (hiscore, unique items, etc.)\n"); | | printf(" -local Read/write local data (hiscore, unique items, etc.)\n"); |
printf(" -maps Sets the directory for maps.\n"); | | printf(" -maps Sets the directory for maps.\n"); |
| | |
printf(" -treasures Sets the treasures file to use.\n"); | | printf(" -treasures Sets the treasures file to use.\n"); |
printf(" -uniquedir Sets the unique items/maps directory.\n"); | | printf(" -uniquedir Sets the unique items/maps directory.\n"); |
printf(" -tmpdir Sets the directory for temporary files (mostly maps.)\n"); | | printf(" -tmpdir Sets the directory for temporary files (mostly maps.)\n"); |
#endif | | |
| | |
#ifdef DUMP_SWITCHES | | |
printf("\nThe following are only available in DUMP_SWITCHES was compiled in.\n"); | | |
printf(" -m Lists out suggested experience for all monsters.\n"); | | printf(" -m Lists out suggested experience for all monsters.\n"); |
printf(" -m2 Dumps out abilities.\n"); | | printf(" -m2 Dumps out abilities.\n"); |
printf(" -m3 Dumps out artifactt information.\n"); | | printf(" -m3 Dumps out artifactt information.\n"); |
| | |
printf(" -m8 Dumps out gods information.\n"); | | printf(" -m8 Dumps out gods information.\n"); |
printf(" -m9 Dumps out more alchemy information (formula checking).\n"); | | printf(" -m9 Dumps out more alchemy information (formula checking).\n"); |
printf(" -mt <name> Dumps out list of treasures for a monster.\n"); | | printf(" -mt <name> Dumps out list of treasures for a monster.\n"); |
#endif | | |
exit(0); | | exit(0); |
} | | } |
| | |
| | |
init_formulae(); /* If not called before, reads formulae from file */ | | init_formulae(); /* If not called before, reads formulae from file */ |
init_new_exp_system(); /* If not called before, inits experience system */ | | init_new_exp_system(); /* If not called before, inits experience system */ |
| | |
#ifdef DUMP_SWITCHES | | |
switch(settings.dumpvalues) { | | switch(settings.dumpvalues) { |
case 1: | | case 1: |
print_monsters(); | | print_monsters(); |
| | |
dump_monster_treasure(settings.dumparg); | | dump_monster_treasure(settings.dumparg); |
exit(0); | | exit(0); |
} | | } |
#endif | | |
} | | } |
| | |
void init_startup() { | | void init_startup() { |
| | |
#endif | | #endif |
if(!i) | | if(!i) |
printf("(none)\n"); | | printf("(none)\n"); |
#ifdef SECURE | | |
printf("Secure:\t\t<true>\n"); | | |
#else | | |
printf("Secure:\t\t<false>\n"); | | |
#endif | | |
printf("Datadir:\t\t%s\n",settings.datadir); | | printf("Datadir:\t\t%s\n",settings.datadir); |
printf("Localdir:\t\t%s\n",settings.localdir); | | printf("Localdir:\t\t%s\n",settings.localdir); |
#ifdef PERM_FILE | | #ifdef PERM_FILE |
| | |
printf("Editor:\t\t%s\n",X_EDITOR); | | printf("Editor:\t\t%s\n",X_EDITOR); |
#endif | | #endif |
| | |
#ifdef SHOP_LISTINGS | | |
printf("Shop listings:\t<true>\n"); | | |
#else | | |
printf("Shop listings:\t<false>\n"); | | |
#endif | | |
printf("Max_time:\t%d\n",MAX_TIME); | | printf("Max_time:\t%d\n",MAX_TIME); |
| | |
#ifdef WIN32 /* ***win32 compile_info(): remove execl... */ | | #ifdef WIN32 /* ***win32 compile_info(): remove execl... */ |