From: Eric S. Raymond Date: Wed, 20 Sep 2006 18:10:28 +0000 (+0000) Subject: Clean up some boolean arguments. X-Git-Tag: 2.0~209 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=c4d3d7faa3e4fe1acd11997d0a600b0e2ca93107;p=super-star-trek.git Clean up some boolean arguments. --- diff --git a/src/events.c b/src/events.c index 207df90..3fc27e6 100644 --- a/src/events.c +++ b/src/events.c @@ -244,7 +244,7 @@ void events(void) newqad(false); /* Adjust finish time to time of tractor beaming */ fintim = game.state.date+game.optime; - attack(0); + attack(false); if (game.state.remcom <= 0) unschedule(FTBEAM); else schedule(FTBEAM, game.optime+expran(1.5*game.intime/game.state.remcom)); break; @@ -585,7 +585,7 @@ void wait(void) if (rtime < temp) temp = rtime; game.optime = temp; } - if (game.optime < delay) attack(0); + if (game.optime < delay) attack(false); if (game.alldone) return; events(); game.ididit = true; diff --git a/src/moving.c b/src/moving.c index 80d6660..534c13f 100644 --- a/src/moving.c +++ b/src/moving.c @@ -63,7 +63,7 @@ void imove(void) * are present and your skill is good. */ if (game.skill > SKILL_GOOD && game.klhere > 0 && !game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) - attack(0); + attack(false); if (game.alldone) return; } /* compute final position -- new quadrant and sector */ @@ -116,7 +116,7 @@ void imove(void) prout(_("Entering %s."), cramlc(quadrant, game.quadrant)); game.quad[game.sector.x][game.sector.y] = game.ship; newqad(false); - if (game.skill>SKILL_NOVICE) attack(0); + if (game.skill>SKILL_NOVICE) attack(false); return; } iquad = game.quad[w.x][w.y]; @@ -198,7 +198,7 @@ no_quad_change: } sortkl(); if (!game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova && game.iattak == 0) - attack(0); + attack(false); for_local_enemies(m) game.kavgd[m] = game.kdist[m]; } newcnd(); diff --git a/src/setup.c b/src/setup.c index 06ff22a..e4ee63d 100644 --- a/src/setup.c +++ b/src/setup.c @@ -407,7 +407,7 @@ void setup(bool needprompt) waitfor(); newqad(false); if (game.nenhere-iqhere-game.ithere) game.shldup = true; - if (game.neutz) attack(0); // bad luck to start in a Romulan Neutral Zone + if (game.neutz) attack(false); // bad luck to start in a Romulan Neutral Zone } bool choose(bool needprompt) diff --git a/src/sst.c b/src/sst.c index 00e384e..ed1fa12 100644 --- a/src/sst.c +++ b/src/sst.c @@ -469,8 +469,8 @@ static void makemoves(void) } break; case DOCK: // dock - dock(1); - if (game.ididit) attack(0); + dock(true); + if (game.ididit) attack(false); break; case DAMAGES: // damages dreprt(); @@ -586,7 +586,7 @@ static void makemoves(void) continue; } if (hitme && !game.justin) { - attack(2); + attack(true); if (game.alldone) break; if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // went NOVA! atover(false);