X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.c;h=7c238fe28f39c3ddb35345673924c30bdb9cc7d2;hp=89e069d51696293328651b8a716f6754a14e7120;hb=5b0cc4a8a21c3d66e5a43abdb06f37df2d525e08;hpb=aba642f488174f640e8099f07d46f0a64dbb5052 diff --git a/sst.c b/sst.c index 89e069d..7c238fe 100644 --- a/sst.c +++ b/sst.c @@ -1,4 +1,4 @@ -#define INCLUDED // Define externs here +]#define INCLUDED // Define externs here #include #include #include @@ -11,6 +11,26 @@ /* +Dave Matuszek says: + + SRSCAN, MOVE, PHASERS, CALL, STATUS, IMPULSE, PHOTONS, ABANDON, + LRSCAN, WARP, SHIELDS, DESTRUCT, CHART, REST, DOCK, QUIT, and DAMAGE + were in the original non-"super" version. + + Tholians weren't in the original. Dave is dubious about their merits. + There weren't even planets. He says the bit about the Galileo getting + turned into a McDonald's is "consistant with our original vision". + + Dilithium crystals weren't in the original. Dave is OK with this idea. + + Dave also says the Space Thingy should not be preserved across saved games, + so you can't prove to others that you've seen it. He says it shouldn't + fire back, either. It should so nothing except scream and disappear + when hit by photon torpedos. It's OK that it moves when rammed, but it + didn't in the original. + + The Faerie Queen was in the original. + Here are Tom Almy's changes: Compared to original version, I've changed the "help" command to @@ -87,15 +107,20 @@ Here are Stas Sergeev's changes: Eric Raymond's changes: + Mainly, I translated this C code out of FORTRAN into C -- created #defines + for a lot of magic numbers. + 1. "sos" and "call" becomes "mayday", "freeze" and "save" are both good. 2. Status report now indicates when dilithium crystals are on board. + 3. Can now report starbases left in scrscan. + */ /* the input queue */ static char line[128], *linep = line; -static usecurses = TRUE; +static int usecurses = TRUE; static struct { @@ -367,7 +392,7 @@ static void makemoves(void) { score(); break; case SENSORS: // sensors - sensor(); + sensor(TRUE); break; case ORBIT: // orbit orbit(); @@ -418,7 +443,7 @@ static void makemoves(void) { case SAVE: // Save Game freeze(FALSE); clrscr(); - if (skill > 3) + if (skill > SKILL_GOOD) prout("WARNING--Saved games produce no plaques!"); break; case DEATHRAY: // Try a desparation measure @@ -454,14 +479,14 @@ static void makemoves(void) { events(); if (alldone) break; // Events did us in } - if (game.state.galaxy[quadx][quady] == 1000) { // Galaxy went Nova! + if (game.state.galaxy[quadx][quady] == SUPERNOVA_PLACE) { // Galaxy went Nova! atover(0); continue; } if (hitme && justin==0) { attack(2); if (alldone) break; - if (game.state.galaxy[quadx][quady] == 1000) { // went NOVA! + if (game.state.galaxy[quadx][quady] == SUPERNOVA_PLACE) { // went NOVA! atover(0); hitme = TRUE; continue; @@ -586,14 +611,9 @@ double Rand(void) { return rand()/(1.0 + (double)RAND_MAX); } -void iran8(int *i, int *j) { - *i = Rand()*8.0 + 1.0; - *j = Rand()*8.0 + 1.0; -} - -void iran10(int *i, int *j) { - *i = Rand()*10.0 + 1.0; - *j = Rand()*10.0 + 1.0; +void iran(int size, int *i, int *j) { + *i = Rand()*(size*1.0) + 1.0; + *j = Rand()*(size*1.0) + 1.0; } void chew(void) {