X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.c;h=23e10016f42312fd7c8994f33b0ecffe3b5f9f58;hp=a9884e71511f876f29db0a2f62c2ec712fdb541d;hb=8b0a1880ee115e281afe83e1cd0c90e3306dfed8;hpb=760ecf730c119682b414153a629ec2adc224434f diff --git a/sst.c b/sst.c index a9884e7..23e1001 100644 --- a/sst.c +++ b/sst.c @@ -87,10 +87,15 @@ 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 */ @@ -418,7 +423,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 @@ -586,14 +591,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) {