X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.c;h=d19698491d71a64611cf7b7a0fd6a99591a9d6cd;hp=cef3f7a8dd9ca9f9f1d40f6e4edc04fc2ee17fd7;hb=0f68a074434296ae409accdc39ba0142600ea255;hpb=093f7d420e9cf92fbaf751f57a199c56562ae4b5 diff --git a/src/sst.c b/src/sst.c index cef3f7a..d196984 100644 --- a/src/sst.c +++ b/src/sst.c @@ -168,6 +168,11 @@ for a lot of magic numbers and refactored the heck out of it. worlds enabled, they must have one in the quadrant to beam down to; otherwise they die in space and this counts heavily against your score. Docking at a starbase replenishes your crew. + + 8. Still more BSD-Trek: we now have a weighted damage table. + Also, the nav subsystem (enabling automatic course + setting) can be damaged separately from the main computer (which + handles weapons targeting, ETA calculation, and self-destruct). */ /* the input queue */ @@ -196,6 +201,7 @@ char *device[NDEVICES] = { "Subspace Radio", "Shuttle Craft", "Computer", + "Navigation System", "Transporter", "Shield Control", "Death Ray", @@ -403,7 +409,7 @@ static void makemoves(void) drawmaps(1); for(;;) { /* get a command */ hitme = false; - game.justin = 0; + game.justin = false; game.optime = 0.0; i = -1; chew(); @@ -460,10 +466,10 @@ static void makemoves(void) warp(false); break; case SHIELDS: // shields - doshield(1); + doshield(false); if (game.ididit) { - hitme=true; - game.shldchg = 0; + hitme = true; + game.shldchg = false; } break; case DOCK: // dock @@ -675,7 +681,7 @@ int main(int argc, char **argv) } -void cramen(int i) +void cramen(feature i) /* print the name of an enemy */ { /* return an enemy */ @@ -709,7 +715,7 @@ char *cramlc(enum loctype key, coord w) return buf; } -void crmena(bool stars, int enemy, enum loctype key, coord w) +void crmena(bool stars, feature enemy, enum loctype key, coord w) /* print an enemy and his location */ { if (stars) proutn("***"); @@ -747,7 +753,7 @@ double Rand(void) return rand()/(1.0 + (double)RAND_MAX); } -coord iran(int size) +coord randplace(int size) /* choose a random location */ { coord w; @@ -845,7 +851,7 @@ void huh(void) prout("Beg your pardon, Captain?"); } -int isit(char *s) +bool isit(char *s) /* compares s to citem and returns true if it matches to the length of s */ { return strncasecmp(s, citem, max(1, strlen(citem))) == 0;