#include <time.h>\r
+#ifdef SERGEEV\r
+#include <sys/stat.h>\r
+#include <conio.h>\r
+#endif /* SERGEEV */\r
#include "sst.h"\r
\r
+#ifdef SERGEEV\r
+#ifdef __linux__\r
+static long filelength(int fd) {\r
+struct stat buf;\r
+ fstat(fd, &buf);\r
+ return buf.st_size;\r
+}\r
+#endif\r
+#endif /* SERGEEV */\r
+\r
void prelim(void) {\r
skip(2);\r
prout("-SUPER- STAR TREK");\r
skip(1);\r
+#ifndef SERGEEV\r
prout("Latest update-21 Sept 78");\r
skip(1);\r
+#endif /* SERGEEV */\r
}\r
\r
void freeze(int boss) {\r
- char *x, *y;\r
FILE *fp;\r
int key;\r
if (boss) {\r
skip(2);\r
prout("Good Luck!");\r
if (game.state.nscrem) prout(" YOU'LL NEED IT.");\r
+#ifdef SERGEEV\r
+ getche();\r
+#endif /* SERGEEV */\r
newqad(0);\r
if (nenhere-iqhere-ithere) shldup=1.0;\r
if (neutz) attack(0); // bad luck to start in a Romulan Neutral Zone\r
else {\r
chew();\r
if (length==0) proutn("Would you like a Short, Medium, or Long game? ");\r
- else if (skill == 0) proutn("Are you a Novice, Fair, Good, Expert, or Emeritus player?");\r
+ else if (skill == 0) proutn("Are you a Novice, Fair, Good, Expert, or Emeritus player? ");\r
}\r
}\r
+#ifndef SERGEEV\r
while (TRUE) {\r
scan();\r
strcpy(game.passwd, citem);\r
if (*game.passwd != 0) break;\r
proutn("Please type in a secret password-");\r
}\r
+#else\r
+ for(i=0;i<3;i++) game.passwd[i]=(char)(97+(int)(Rand()*25));\r
+ game.passwd[3]=0;\r
+#endif /* SERGEEV */\r
#ifdef DEBUG\r
if (strcmp(game.passwd, "debug")==0) idebug = 1;\r
#endif\r
if (energy < 1000.0) condit = IHYELLOW;\r
if (game.state.galaxy[quadx][quady] > 99 || game.state.newstuf[quadx][quady] > 9)\r
condit = IHRED;\r
+ if (!alive) condit=IHDEAD;\r
}\r
\r
\r