X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.c;h=07b7da5cef805bca47a59a279237eee70611f9c1;hp=f6b86b1cedb6f876bb9d92e3747696183214e206;hb=a8f5216ff30142b93e4ff3e9bc12535ed0792563;hpb=a6127a240c143e22ec9acca5bf1dd61b66fa9638 diff --git a/sst.c b/sst.c index f6b86b1..07b7da5 100644 --- a/sst.c +++ b/sst.c @@ -49,47 +49,48 @@ Here are Tom Almy's changes: 6. Perhaps cloaking to be added later? BSD version -Here are Stas Sergeev's changes (controlled by the proprocessor symbol -SERGEEV, not yet completely merged): +Here are Stas Sergeev's changes: 1. The Space Thingy can be shoved, if you it ram, and can fire back if fired upon. - 1 The Tholian can be hit with phasers + 2. The Tholian can be hit with phasers - 2. When you are docked, base covers you with an almost invincible shields + 3. When you are docked, base covers you with an almost invincible shields (a commander can still ram you, or a Romulan can destroy the base, or a SCom can even succeed with direct attack IIRC, but this rarely happens). - 3. SCom can't escape from you if no more enemies remain (without this, - chasing SCom can take an eternity). + 4. SCom can't escape from you if no more enemies remain (without this, + chasing SCom can take an eternity). - 4. Probe target you enter is now the destination quadrant. Before I don't - remember what it was, but it was something I had difficulty using) + 5. Probe target you enter is now the destination quadrant. Before I don't + remember what it was, but it was something I had difficulty using) - 5. Secret password is now autogenerated. + 6. Secret password is now autogenerated. - 6. "Plaque" is adjusted for A4 paper:) + 7. "Plaque" is adjusted for A4 paper :-) - 7. Phasers now tells you how much energy needed, but only if the computer + 8. Phasers now tells you how much energy needed, but only if the computer is alive. - 8. Planets are auto-scanned when you enter the quadrant. + 9. Planets are auto-scanned when you enter the quadrant. - 9. Mining or using crystals in presense of enemy now yields an attack. + 10. Mining or using crystals in presense of enemy now yields an attack. There are other minor adjustments to what yields an attack and what does not. - 10. Ramming a black hole is no longer instant death. There is a - chance you might get timewarped instead. + 11. Ramming a black hole is no longer instant death. There is a + chance you might get timewarped instead. - 11. "freeze" command reverts to "save", most people will understand this + 12. "freeze" command reverts to "save", most people will understand this better anyway. + 13. Screen-oriented interface, with sensor scans always up. + Eric Raymond's changes: - 1. "sos" and "call" becomes "mayday", "freeze" and "save" are both good. + 1. "sos" and "call" becomes "mayday", "freeze" and "save" are both good. */ @@ -99,13 +100,11 @@ static struct int value; } commands[] = { -#ifndef SERGEEV #define SRSCAN 1 {"SRSCAN", SRSCAN}, {"STATUS", SRSCAN}, #define LRSCAN 2 {"LRSCAN", LRSCAN}, -#endif /* SERGEEV */ #define PHASERS 3 {"PHASERS", PHASERS}, #define TORPEDO 4 @@ -129,10 +128,8 @@ commands[] = { {"WARP", WARP}, #define SCORE 13 {"SCORE", SCORE}, -#ifndef SERGEEV #define SENSORS 14 {"SENSORS", SENSORS}, -#endif /* SERGEEV */ #define ORBIT 15 {"ORBIT", ORBIT}, #define TRANSPORT 16 @@ -264,28 +261,6 @@ static void helpme(void) { fclose(fp); } -void drawmaps(short l) { -/* hook to be called after moving to redraw maps */ -#ifdef SERGEEV - _setcursortype(_NOCURSOR); - if (l==1) sensor(); - if (l!=2) setwnd(LEFTUPPER_WINDOW); - gotoxy(1,1); - strcpy(line,"s"); - srscan(1); - if (l!=2){ - setwnd(SRSCAN_WINDOW); - clrscr(); - srscan(2); - setwnd(LRSCAN_WINDOW); - clrscr(); - strcpy(line,"l"); - lrscan(); - _setcursortype(_NORMALCURSOR); - } -#endif /* SERGEEV */ -} - static void makemoves(void) { int i, hitme; clrscr(); @@ -302,13 +277,7 @@ static void makemoves(void) { clrscr(); proutn("COMMAND> "); if (scan() == IHEOL) { -#ifdef SERGEEV - _setcursortype(_NOCURSOR); - setwnd(LOWER_WINDOW); - clrscr(); - chart(0); - _setcursortype(_NORMALCURSOR); -#endif /* SERGEEV */ + makechart(); continue; } ididit=0; @@ -332,14 +301,12 @@ static void makemoves(void) { } commandhook(commands[i].name, TRUE); switch (i) { /* command switch */ -#ifndef SERGEEV case SRSCAN: // srscan srscan(1); break; case LRSCAN: // lrscan lrscan(); break; -#endif /* SERGEEV */ case PHASERS: // phasers phasers(); if (ididit) hitme = TRUE; @@ -381,11 +348,9 @@ static void makemoves(void) { case SCORE: // score score(); break; -#ifndef SERGEEV case SENSORS: // sensors sensor(); break; -#endif /* SERGEEV */ case ORBIT: // orbit orbit(); if (ididit) hitme = TRUE; @@ -505,14 +470,9 @@ int main(int argc, char **argv) { } } -#ifndef SERGEEV - iostart(usecurses); -#else randomize(); - textattr(7); - clrscr(); - setwnd(FULLSCREEN_WINDOW); -#endif /* SERGEEV */ + iostart(usecurses); + line[0] = '\0'; for (i = optind; i < argc; i++) { strcat(line, argv[i]); @@ -543,9 +503,7 @@ int main(int argc, char **argv) { clrscr(); } skip(1); -#ifndef SERGEEV ioend(); -#endif /* SERGEEV */ prout("May the Great Bird of the Galaxy roost upon your home planet."); return 0; } @@ -647,14 +605,12 @@ int scan(void) { return IHEOL; } cgetline(line, sizeof(line)); -#ifdef SERGEEV fflush(stdin); if (curwnd==BOTTOM_WINDOW){ clrscr(); setwnd(LOWER_WINDOW); clrscr(); } -#endif /* SERGEEV */ linep = line; } // Skip leading white space