fp = fopen(SSTDOC, "r");
if (fp == NULL) {
prout("Spock- \"Captain, that information is missing from the");
- prout(" computer. You need to find SST.DOC and put it in the");
- prout(" current directory.\"");
+ prout(" computer.\"");
+ /*
+ * This used to continue: "You need to find SST.DOC and put
+ * it in the current directory."
+ */
return;
}
for (;;) {
clrscr();
#endif /* SERGEEV */
proutn("COMMAND> ");
-#ifdef SERGEEV
if (scan() == IHEOL) {
+#ifdef SERGEEV
_setcursortype(_NOCURSOR);
setwnd(4);
clrscr();
chart(0);
_setcursortype(_NORMALCURSOR);
+#endif /* SERGEEV */
continue;
}
+#ifdef SERGEEV
ididit=0;
clrscr();
setwnd(4);
srscan(2);
break;
case 21: // Game Report
- report(0);
+ report();
break;
case 22: // use COMPUTER!
eta();
listCommands(TRUE);
break;
case 24: // Emergency exit
- clearscreen(); // Hide screen
+#ifdef SERGEEV
+ clrscr(); // Hide screen
+#endif /* SERGEEV */
freeze(TRUE); // forced save
exit(1); // And quick exit
break;
case 25:
probe(); // Launch probe
+ if (ididit) hitme = TRUE;
break;
case 26: // Abandon Ship
abandn();
break;
case 28: // Save Game
freeze(FALSE);
+#ifdef SERGEEV
+ clrscr();
+#endif /* SERGEEV */
if (skill > 3)
- prout("WARNING--Frozen games produce no plaques!");
+ prout("WARNING--Saved games produce no plaques!");
break;
case 29: // Try a desparation measure
deathray();
atover(0);
continue;
}
- if (nenhere == 0) movetho();
if (hitme && justin==0) {
attack(2);
if (alldone) break;
int main(int argc, char **argv) {
- int i, option, usecurses = TRUE;
+ int i, option, usecurses = TRUE;
+
while ((option = getopt(argc, argv, "t")) != -1) {
switch (option) {
case 't':
}
}
+#ifndef SERGEEV
iostart(usecurses);
- prelim();
+#else
+ randomize();
+ textattr(7);
+ clrscr();
+ setwnd(0);
+#endif /* SERGEEV */
line[0] = '\0';
for (i = optind; i < argc; i++) {
strcat(line, argv[i]);
strcat(line, " ");
}
while (TRUE) { /* Play a game */
+ prelim();
setup(line[0] == '\0');
if (alldone) {
score();
alldone = 0;
}
else makemoves();
- skip(2);
+ skip(1);
stars();
skip(1);
buf[0] = '\0';
if (key == quadrant) strcpy(buf, "Quadrant ");
else if (key == sector) strcpy(buf, "Sector ");
- sprintf(buf+strlen(buf), "%d-%d", x, y);
+ sprintf(buf+strlen(buf), "%d - %d", x, y);
return buf;
}
return IHEOL;
}
getline(line, sizeof(line));
+#ifdef SERGEEV
+ fflush(stdin);
+ if (curwnd==5){
+ clrscr();
+ setwnd(4);
+ clrscr();
+ }
+#endif /* SERGEEV */
linep = line;
}
// Skip leading white space