X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=main.c;h=345a7b23343daa4d55b5ab96bdf43036498c612d;hp=766082b13bf481d348417ffb9dc2de9b7576b8d5;hb=3d3cd4ba397018aa9d245b5ce8cb7b4802a82304;hpb=a6954db376c00b4457d7cc8f4fa4ef32deb9397d diff --git a/main.c b/main.c index 766082b..345a7b2 100644 --- a/main.c +++ b/main.c @@ -25,7 +25,7 @@ #define DIM(a) (sizeof(a)/sizeof(a[0])) -FILE *logfp = NULL, *rfp = NULL; +FILE *logfp = NULL; bool oldstyle = false; bool prompt = true; @@ -61,8 +61,9 @@ int main(int argc, char *argv[]) /* Options. */ #ifndef ADVENT_NOSAVE - const char* opts = "l:or"; + const char* opts = "l:or:"; const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename]\n"; + FILE *rfp = NULL; #else const char* opts = "l:o"; const char* usage = "Usage: %s [-l logfilename] [-o]\n"; @@ -110,9 +111,6 @@ int main(int argc, char *argv[]) /* Initialize game variables */ long seedval = initialise(); - /* Start-up, dwarf stuff */ - make_zzword(game.zzword); - #ifndef ADVENT_NOSAVE if (!rfp) { game.novice = yes(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]); @@ -144,8 +142,6 @@ static bool fallback_handler(char *buf) printf("Seed set to %ld\n", sv); // autogenerated, so don't charge user time for it. --game.turns; - // here we reconfigure any global game state that uses random numbers - make_zzword(game.zzword); return true; } return false;