X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fmoving.c;h=2ee44367afd1417e41fb897ebb11a060f446814e;hp=44a4945040bf8c006f255cf84b19f1188964a2be;hb=cbb2d987e8c23c6c25bd441fdef5401d5a89289e;hpb=9ae916e9144e84ef1de4a86ea73a45a2bc4cc1be diff --git a/src/moving.c b/src/moving.c index 44a4945..2ee4436 100644 --- a/src/moving.c +++ b/src/moving.c @@ -109,7 +109,8 @@ void imove(bool novapush) prout(_("YOU WILL BE DESTROYED.")); } /* Compute final position in new quadrant */ - if (trbeam) return; /* Don't bother if we are to be beamed */ + if (trbeam) /* Don't bother if we are to be beamed */ + return; game.quadrant.x = (w.x+(QUADSIZE-1))/QUADSIZE; game.quadrant.y = (w.y+(QUADSIZE-1))/QUADSIZE; game.sector.x = w.x - QUADSIZE*(game.quadrant.x-1); @@ -199,7 +200,7 @@ no_quad_change: game.kavgd[m] = 0.5 * (finald+game.kdist[m]); game.kdist[m] = finald; } - sortkl(); + sortklings(); if (!game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) attack(false); for_local_enemies(m) game.kavgd[m] = game.kdist[m]; @@ -241,7 +242,7 @@ void dock(bool verbose) (is_scheduled(FCDBAS) || game.isatb == 1) && !game.iseenit) { /* get attack report from base */ prout(_("Lt. Uhura- \"Captain, an important message from the starbase:\"")); - attakreport(false); + attackreport(false); game.iseenit = true; } } @@ -437,7 +438,7 @@ static void getcd(bool isprobe, int akey) -void impuls(void) +void impulse(void) /* move under impulse power */ { double power; @@ -564,7 +565,11 @@ void warp(bool timewarp) 100.0*game.optime/game.state.remtime); prout(_(" percent of our")); proutn(_(" remaining time. Are you sure this is wise?\" ")); - if (ja() == false) { game.ididit = false; game.optime=0; return;} + if (ja() == false) { + game.ididit = false; + game.optime=0; + return; + } } } /* Entry WARPX */ @@ -641,7 +646,7 @@ void warp(bool timewarp) -void setwrp(void) +void setwarp(void) /* change the warp factor */ { int key; @@ -823,7 +828,7 @@ void timwrp() when on planet, which would give us two Galileos! */ gotit = false; for (l = 0; l < game.inplan; l++) { - if (game.state.plnets[l].known == shuttle_down) { + if (game.state.planets[l].known == shuttle_down) { gotit = true; if (game.iscraft == onship && game.ship==IHE) { prout(_("Checkov- \"Security reports the Galileo has disappeared, Sir!")); @@ -1081,7 +1086,7 @@ void mayday(void) ** */ -void abandn(void) +void abandon(void) /* abandon ship */ { int nb, l; @@ -1165,7 +1170,8 @@ void abandn(void) if (VALID_SECTOR(game.sector.x, game.sector.y) && game.quad[game.sector.x][game.sector.y] == IHDOT) break; } - if (l < QUADSIZE+1) break; /* found a spot */ + if (l < QUADSIZE+1) + break; /* found a spot */ game.sector.x=QUADSIZE/2; game.sector.y=QUADSIZE/2; newqad(true);