From: Eric S. Raymond Date: Thu, 20 Jan 2005 06:30:21 +0000 (+0000) Subject: More merging of SERGEEV changes. X-Git-Tag: 2.0~417 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=93ede5b2bb8928b8aa17e750f48e6c5e59b81ab1 More merging of SERGEEV changes. --- diff --git a/events.c b/events.c index 10c030a..641b77a 100644 --- a/events.c +++ b/events.c @@ -222,7 +222,7 @@ void events(void) { prout(".\""); if (resting) { skip(1); - proutn("Mr. Spock- \"Captain, shall we cancel the rest period?\""); + proutn("Mr. Spock- \"Captain, shall we cancel the rest period?\" "); if (ja()) { resting = 0; Time = 0.0; diff --git a/moving.c b/moving.c index 0690ac8..b0e68cd 100644 --- a/moving.c +++ b/moving.c @@ -201,6 +201,9 @@ label100: } newcnd(); iattak = 0; +#ifdef SERGEEV + drawmaps(0); +#endif /* SERGEEV */ return; } @@ -812,6 +815,9 @@ void timwrp() { game.damage[DRADIO] += Time; } newqad(0); +#ifdef SERGEEV + events(); +#endif /* SERGEEV */ } void probe(void) { @@ -882,6 +888,7 @@ void probe(void) { probecy = quady; game.future[FDSPROB] = game.state.date + 0.01; // Time to move one sector prout("Ensign Chekov- \"The deep space probe is launched, Captain.\""); + ididit = 1; return; } diff --git a/setup.c b/setup.c index 8bd5bd1..55db1d9 100644 --- a/setup.c +++ b/setup.c @@ -373,6 +373,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 @@ -445,9 +448,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); @@ -455,6 +459,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 @@ -492,6 +500,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; } diff --git a/sst.c b/sst.c index 050f670..330d8de 100644 --- a/sst.c +++ b/sst.c @@ -78,7 +78,8 @@ SERGEEV, not yet merged): There are other minor adjustments to what yields an attack and what does not. - 10. Ramming a black hole is no longer instant death. + 10. Ramming a black hole is no longer instant death. There is a + chance you might get timewarped instead. */ @@ -199,6 +200,27 @@ static void helpme(void) { fclose(fp); } +#ifdef SERGEEV +void drawmaps(short l){ + _setcursortype(_NOCURSOR); + if (l==1) sensor(); + if (l!=2) setwnd(1); + gotoxy(1,1); + strcpy(line,"s"); + srscan(1); + if (l!=2){ + setwnd(2); + clrscr(); + srscan(2); + setwnd(3); + clrscr(); + strcpy(line,"l"); + lrscan(); + _setcursortype(_NORMALCURSOR); + } +} +#endif /* SERGEEV */ + static void makemoves(void) { int i, hitme; while (TRUE) { /* command loop */ diff --git a/sst.h b/sst.h index 49cd217..0e198f4 100644 --- a/sst.h +++ b/sst.h @@ -421,6 +421,9 @@ int isit(char *); void preport(void); void orbit(void); void sensor(void); +#ifdef SERGEEV +void drawmaps(short); +#endif /* SERGEEV */ void beam(void); void mine(void); void usecrystals(void);