X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=10fce6503f348e9673b9e70add4fa4eaf3d1e61c;hb=e07cedf332029369f2ce09a6f6ced3dda0de2558;hp=6ac17ce76b313889a1034a492b57b405f41e5034;hpb=43f0c07f1a755a68e77a8ae02ccedb0563d730a7;p=open-adventure.git diff --git a/main.c b/main.c index 6ac17ce..10fce65 100644 --- a/main.c +++ b/main.c @@ -122,20 +122,9 @@ int main(int argc, char *argv[]) set_seed(seedval); /* Initialize game variables */ - if (!game.setup) - initialise(); - - /* Unlike earlier versions, adventure is no longer restartable. (This - * lets us get away with modifying things such as OBJSND(BIRD) without - * having to be able to undo the changes later.) If a "used" copy is - * rerun, we come here and tell the player to run a fresh copy. */ - if (game.setup <= 0) { - RSPEAK(201); - exit(0); - } + initialise(); /* Start-up, dwarf stuff */ - game.setup= -1; game.zzword=RNDVOC(3,0); game.novice=YES(stdin, 65,1,0); game.newloc=1; @@ -146,7 +135,7 @@ int main(int argc, char *argv[]) if (logfp) fprintf(logfp, "seed %ld\n", seedval); - /* interpret commands ubtil EOF or interrupt */ + /* interpret commands until EOF or interrupt */ for (;;) { if (!do_command(stdin)) break; @@ -308,11 +297,8 @@ bool spotted_by_pirate(int i) game.dloc[PIRATE]=game.chloc; game.odloc[PIRATE]=game.chloc; game.dseen[PIRATE]=false; - /* C doesn't have what the Structured rogramming - * Theorem says we need here - multi-level loop - * breakout. We simulate with a goto. Irreducible, alas. - */ - return true; //goto jumpout; + + return true; } if (HERE(j)) k=1;