From a8f5216ff30142b93e4ff3e9bc12535ed0792563 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 4 Feb 2005 13:57:04 +0000 Subject: [PATCH] Pull SERGEEV dependencies out of sst.c, fix docs. --- io.c | 10 +++++ sst-doc.xml | 116 +++++++++++++++++++++++++++++++++++++++++++++------- sst.c | 51 +++++++++-------------- sst.h | 1 + 4 files changed, 131 insertions(+), 47 deletions(-) diff --git a/io.c b/io.c index a436c33..bff7d46 100644 --- a/io.c +++ b/io.c @@ -449,6 +449,16 @@ void tracktorpedo(int x, int y, int ix, int iy, int wait, int l, int i, int n, i #endif /* SERGEEV */ } +void makechart(void) { +#ifdef SERGEEV + _setcursortype(_NOCURSOR); + setwnd(LOWER_WINDOW); + clrscr(); + chart(0); + _setcursortype(_NORMALCURSOR); +#endif /* SERGEEV */ +} + void setpassword(void) { #ifndef SERGEEV while (TRUE) { diff --git a/sst-doc.xml b/sst-doc.xml index e810746..b068e7c 100644 --- a/sst-doc.xml +++ b/sst-doc.xml @@ -20,6 +20,10 @@ Tom Almy + + Stas + Sergeev + Eric Steven @@ -72,6 +76,12 @@ Resurrected By Tom Almy + + Curses Interface By + Stas Sergeev + + SST 2K polishing by + Eric S. Raymond @@ -284,7 +294,7 @@ abandon ship) must be written out in full. Also, in a few cases two or more commands begin with the same letter, and in this case that letter refers to a particular one of the commands; to get the other, your abbreviation must be two or more characters long. This sounds -complicated, but you will learn the abbreviations quickly enough. +complicated, but you will learn the abbreviations qGuickly enough. What this all boils down to is: @@ -314,6 +324,11 @@ Full commands: SRSCAN SRSCAN CHART + +If you are using the screen-oriented interface, it should never +be necessary to call this command explicitly; a short-range scan will +always be present on the screen. + The short-range scan gives you a considerable amount of information about the quadrant your starship is in. A short-range scan is best described by an example. @@ -357,7 +372,6 @@ short-range scan anytime you like. If your short-range sensors are damaged, this command will only show the contents of adjacent sectors. - Status Report @@ -475,6 +489,11 @@ Mnemonic: LRSCAN Shortest abbreviation: L + +If you are using the screen-oriented interface, it should never +be necessary to call this command explicitly; a long-range scan will +always be present on the screen. + A long-range scan gives you general information about where you are and what is around you. Here is an example output. @@ -1605,6 +1624,67 @@ the algorithm. The DECUS version had a Deep Space Probe. Looked like a good idea so I implemented it based on its description. + +Stas Sergeev's story + +I started from an older Tom Almy version and added features I had +seen in mainframe variants of the game, I wrote a screen-oriented +interface for it based on the curses library. + + + +The Space Thingy can be shoved, if you ram it, and can fire back if +fired upon. + + +The Tholian can be hit with phasers. + + +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). + + +SCom can't escape from you if no more enemies remain (without this, + chasing SCom can take an eternity). + + +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) + + +Secret password is now autogenerated. + + +Victory plaque is adjusted for A4 paper rather than 132-column greenbar +:-) + + +Phasers now tells you how much energy needed, but only if the computer +is alive. + + +Planets are auto-scanned when you enter the quadrant. + + +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. + + +Ramming a black hole is no longer instant death. There is a +chance you might get timewarped instead. + + +"freeze" command reverts to "save", most people will understand this +better anyway. + + +Screen-oriented interface, with sensor scans always up. + + + Eric Raymond's story @@ -1638,19 +1718,8 @@ quadrants introduced into many BASIC versions. url='http://developer.berlios.de/projects/sst/'>project site. -Here are some good pages on the history of Star Trek games: - - - -http://www.dunnington.u-net.com/public/startrek/ - - -http://www3.sympatico.ca/maury/games/space/star_trek.html - - -http://www.cactus.org/%7Enystrom/startrek.html - - +After I launched the Berlios project, Stas Sergeev contacted me +me. We worked together to merge in his changes. Modifications I've made: @@ -1683,6 +1752,23 @@ an identifiable magic number and the thaw logic checks for same. I made the internal pager work, nd in the process got rid of a number of platform dependencies in the code. + +The HELP/CALL/SOS command is now MAYDAY. SOS and CALL are still accepted. + + + +Here are some good pages on the history of Star Trek games: + + + +http://www.dunnington.u-net.com/public/startrek/ + + +http://www3.sympatico.ca/maury/games/space/star_trek.html + + +http://www.cactus.org/%7Enystrom/startrek.html + diff --git a/sst.c b/sst.c index 2e1038b..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 @@ -280,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; @@ -310,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; @@ -359,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; diff --git a/sst.h b/sst.h index 0e3e524..aef476b 100644 --- a/sst.h +++ b/sst.h @@ -444,6 +444,7 @@ void waitfor(void); void setpassword(void); void commandhook(char *, int); void c_printf (char *format, ... ); +void makechart(void); typedef struct { int wndleft,wndtop,wndright,wndbottom; -- 2.31.1