X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=planets.c;h=87ca4add8f14c365e53f39819d32798130c20f6d;hb=0e1982742e811243ff7887fbc8e1963f31138608;hp=1d1d1b882cfd37812980baf3a5a7879cd8e05c5b;hpb=29e44720be26859f91e028a538336493368756b3;p=super-star-trek.git diff --git a/planets.c b/planets.c index 1d1d1b8..87ca4ad 100644 --- a/planets.c +++ b/planets.c @@ -1,7 +1,5 @@ #include "sst.h" -static int height; - static char *classes[] = {"M","N","O"}; static int consumeTime(void) @@ -23,7 +21,7 @@ static int consumeTime(void) events(); /* Used to avoid if future[FSCMOVE] within time */ // future[FSNOVA] = asave; /*fails if game over, quadrant super-novas or we've moved to new quadrant*/ - if (alldone || game.state.galaxy[quadx][quady] == SUPERNOVA_PLACE || justin != 0) return 1; + if (alldone || game.state.galaxy[quadx][quady].supernova || justin != 0) return 1; return 0; } @@ -71,15 +69,15 @@ void orbit(void) } if (plnetx == 0 || abs(sectx-plnetx) > 1 || abs(secty-plnety) > 1) { crmshp(); - prout(" not adjacient to planet.\n"); + prout(" not adjacent to planet.\n"); return; } Time = 0.02+0.03*Rand(); prout("Helmsman Sulu- \"Entering standard orbit, Sir.\""); newcnd(); if (consumeTime()) return; - height = (1400.+7200.*Rand()); - prout("Sulu- \"Entered orbit at altitude %.2f kilometers.\"", height); + game.height = (1400.0+7200.0*Rand()); + prout("Sulu- \"Entered orbit at altitude %.2f kilometers.\"", game.height); inorbit = 1; ididit=1; } @@ -319,7 +317,7 @@ void shuttle(void) prout(" you may not fly down.\""); return; } - Time = 3.0e-5*height; + Time = 3.0e-5*game.height; if (Time >= 0.8*game.state.remtime) { prout("First Officer Spock- \"Captain, I compute that such"); proutn(" a maneuver would require approximately 2d%% of our", @@ -469,7 +467,7 @@ void deathray(void) skip(1); prout("Lt. Uhura- \"Graaeek! Graaeek!\""); skip(1); - prout("Spock- \"Facinating! . . . All humans aboard"); + prout("Spock- \"Fascinating! . . . All humans aboard"); prout(" have apparently been transformed into strange mutations."); prout(" Vulcans do not seem to be affected."); skip(1); @@ -484,8 +482,8 @@ void deathray(void) proutn("Spock- \"I believe the word is"); prouts(" *ASTONISHING*"); prout(" Mr. Sulu."); - for (i=1; i<=QUADSIZE; i++) - for (j=1; j<=QUADSIZE; j++) + for_sectors(i) + for_sectors(j) if (game.quad[i][j] == IHDOT) game.quad[i][j] = IHQUEST; prout(" Captain, our quadrant is now infested with"); prouts(" - - - - - - *THINGS*.");