From: Eric S. Raymond Date: Mon, 7 Feb 2005 16:17:08 +0000 (+0000) Subject: Yet more origin-hiding. X-Git-Tag: 2.0~336 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=070639b283c6f4e324a24bbf604f3ce2b6900899;p=super-star-trek.git Yet more origin-hiding. --- diff --git a/ai.c b/ai.c index 33e4873..fd9cf8c 100644 --- a/ai.c +++ b/ai.c @@ -185,10 +185,10 @@ static void movebaddy(int comx, int comy, int loccom, int ienm) nextx = comx; nexty = comy; /* main move loop */ - for (ll = 1; ll <= nsteps; ll++) { + for (ll = 0; ll < nsteps; ll++) { #ifdef DEBUG if (idebug) { - prout("%d", ll); + prout("%d", ll+1); } #endif /* Check if preferred position available */ diff --git a/battle.c b/battle.c index 5e1c404..4b3cf90 100644 --- a/battle.c +++ b/battle.c @@ -299,7 +299,7 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait, i case IHB: /* Hit a base */ skip(1); prout("***STARBASE DESTROYED.."); - for (ll=1; ll<=game.state.rembase; ll++) { + for_starbases(ll) { if (game.state.baseqx[ll]==quadx && game.state.baseqy[ll]==quady) { game.state.baseqx[ll]=game.state.baseqx[game.state.rembase]; game.state.baseqy[ll]=game.state.baseqy[game.state.rembase]; diff --git a/events.c b/events.c index fc03bb0..d65b188 100644 --- a/events.c +++ b/events.c @@ -18,7 +18,7 @@ void events(void) line = FSPY; if (alldone) return; datemin = fintim; - for (l=1; l<=NEVENTS; l++) + for (l = 1; l <= NEVENTS; l++) if (game.future[l] < datemin) { line = l; datemin = game.future[l];