X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=setup.c;h=4df870978b1397a20951c92743f4500336b38591;hb=226428aac31ae604029f55c3c2fb7fff59e10009;hp=ca00504d5f424c772a7b2e91159b0a05a1622b89;hpb=c1bda490aef42a6b3d0e8d97a20fb58236d02ee7;p=super-star-trek.git diff --git a/setup.c b/setup.c index ca00504..4df8709 100644 --- a/setup.c +++ b/setup.c @@ -1,8 +1,6 @@ #include #include -#ifdef SERGEEV -#include -#endif /* SERGEEV */ +#include "conio.h" #include "sst.h" #ifdef __linux__ @@ -17,10 +15,10 @@ void prelim(void) { skip(2); prout("-SUPER- STAR TREK"); skip(1); -#ifndef SERGEEV +#ifndef __HISTORICAL__ prout("Latest update-21 Sept 78"); skip(1); -#endif /* SERGEEV */ +#endif /* __HISTORICAL__ */ } void freeze(int boss) { @@ -387,9 +385,7 @@ void setup(int needprompt) { skip(2); prout("Good Luck!"); if (game.state.nscrem) prout(" YOU'LL NEED IT."); -#ifdef SERGEEV - getche(); -#endif /* SERGEEV */ + waitfor(); newqad(0); if (nenhere-iqhere-ithere) shldup=1.0; if (neutz) attack(0); // bad luck to start in a Romulan Neutral Zone @@ -400,9 +396,6 @@ void randomize(void) { } int choose(int needprompt) { -#ifdef SERGEEV - int i; -#endif /* SERGEEV */ while (TRUE) { tourn = 0; thawed = 0; @@ -425,24 +418,13 @@ int choose(int needprompt) { srand((unsigned int)(int)aaitem); break; } -#ifdef SERGEEV - if (isit("saved")) { + if (isit("saved") || isit("frozen")) { if (thaw()) continue; -#else - if (isit("frozen")) { - thaw(); -#endif /* SERGEEV */ chew(); -#ifndef SERGEEV if (*game.passwd==0) continue; - randomize(); - Rand(); Rand(); Rand(); Rand(); -#endif if (!alldone) thawed = 1; // No plaque if not finished report(); -#ifdef SERGEEV - getche(); -#endif /* SERGEEV */ + waitfor(); return TRUE; } if (isit("regular")) break; @@ -473,18 +455,7 @@ int choose(int needprompt) { else if (skill == 0) proutn("Are you a Novice, Fair, Good, Expert, or Emeritus player? "); } } -#ifndef SERGEEV - while (TRUE) { - scan(); - strcpy(game.passwd, citem); - chew(); - 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 */ + setpassword(); #ifdef DEBUG if (strcmp(game.passwd, "debug")==0) idebug = 1; #endif