From a3c14ba0770c1881e4a0af68d8b9f235968961d3 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 13 Jun 2017 10:20:15 -0400 Subject: [PATCH] Abolish setup check, there's no possibility of restart. Note, this silently breaks old saves. --- advent.h | 1 - adventure.text | 3 +-- init.c | 1 - main.c | 15 ++------------- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/advent.h b/advent.h index 9c07cf3..ae9ecba 100644 --- a/advent.h +++ b/advent.h @@ -52,7 +52,6 @@ struct game_t { long oldobj; long panic; long saved; - long setup; long tally; long thresh; long trndex; diff --git a/adventure.text b/adventure.text index 35468f9..290a0d0 100644 --- a/adventure.text +++ b/adventure.text @@ -1960,8 +1960,7 @@ 199 You prod the nearest dwarf, who wakes up grumpily, takes one look at 199 you, curses, and grabs for his axe. 200 Is this acceptable? -201 This adventure is already over. To start a new adventure, or to -201 resume an earlier adventure, please run a fresh copy of the program. +# 201 used to be an error on restart attempt. 202 The ogre doesn't appear to be hungry. 203 The ogre, who despite his bulk is quite agile, easily dodges your 203 attack. He seems almost amused by your puny effort. diff --git a/init.c b/init.c index cabe574..1752553 100644 --- a/init.c +++ b/init.c @@ -383,6 +383,5 @@ void initialise(void) game.closed=false; game.clshnt=false; game.novice=false; - game.setup=1; game.blklin=true; } diff --git a/main.c b/main.c index 374df37..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; -- 2.31.1