X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=setup.c;h=9de1a9590dc0bd9c6685f361dd274bb2ad052a3a;hb=1072751ee59a11b65fe84d0314fee4bbcf14990e;hp=1d7dd0153679b77abc4e5d21520c216fb44bb48e;hpb=cf91699c89b88f76dcf63c60624635184e8cb7eb;p=super-star-trek.git diff --git a/setup.c b/setup.c index 1d7dd01..9de1a95 100644 --- a/setup.c +++ b/setup.c @@ -1,16 +1,27 @@ #include #include "sst.h" +#ifdef SERGEEV +#ifdef __linux__ +static long filelength(int fd) { +struct stat buf; + fstat(fd, &buf); + return buf.st_size; +} +#endif +#endif /* SERGEEV */ + void prelim(void) { skip(2); prout("-SUPER- STAR TREK"); skip(1); +#ifndef SERGEEV prout("Latest update-21 Sept 78"); skip(1); +#endif /* SERGEEV */ } void freeze(int boss) { - char *x, *y; FILE *fp; int key; if (boss) { @@ -374,6 +385,9 @@ void setup(int needprompt) { skip(2); prout("Good Luck!"); if (game.state.nscrem) prout(" YOU'LL NEED IT."); +#ifdef SERGEEV + getche(); +#endif /* SERGEEV */ newqad(0); if (nenhere-iqhere-ithere) shldup=1.0; if (neutz) attack(0); // bad luck to start in a Romulan Neutral Zone @@ -446,9 +460,10 @@ int choose(int needprompt) { else { chew(); if (length==0) proutn("Would you like a Short, Medium, or Long game? "); - else if (skill == 0) proutn("Are you a Novice, Fair, Good, Expert, or Emeritus player?"); + else if (skill == 0) proutn("Are you a Novice, Fair, Good, Expert, or Emeritus player? "); } } +#ifndef SERGEEV while (TRUE) { scan(); strcpy(game.passwd, citem); @@ -456,6 +471,10 @@ int choose(int needprompt) { if (*game.passwd != 0) break; proutn("Please type in a secret password-"); } +#else + for(i=0;i<3;i++) game.passwd[i]=(char)(97+(int)(Rand()*25)); + game.passwd[3]=0; +#endif /* SERGEEV */ #ifdef DEBUG if (strcmp(game.passwd, "debug")==0) idebug = 1; #endif @@ -493,6 +512,7 @@ void newcnd(void) { if (energy < 1000.0) condit = IHYELLOW; if (game.state.galaxy[quadx][quady] > 99 || game.state.newstuf[quadx][quady] > 9) condit = IHRED; + if (!alive) condit=IHDEAD; }