Clean up some boolean arguments.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 20 Sep 2006 18:10:28 +0000 (18:10 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 20 Sep 2006 18:10:28 +0000 (18:10 +0000)
src/events.c
src/moving.c
src/setup.c
src/sst.c

index 207df90b66088ecba942b22b2b5763d7ae719536..3fc27e61b67d9701c95cf80b8f98c16d14ff4650 100644 (file)
@@ -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;
index 80d6660dc5dae5cb4cb0350c5ea395c635f146e6..534c13f1e9277c63d2f3d3fd840b0db399ce573a 100644 (file)
@@ -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();
index 06ff22ac3f8e7271cc1263e8c5ca3d1bb5734c1f..e4ee63def95f31f8d1baa964333c5b441adb237c 100644 (file)
@@ -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) 
index 00e384e0520f2b4f6af7f3e6a7d8624c43e0bb60..ed1fa124d16c4ca8ab83ebd30bac292ff938a865 100644 (file)
--- 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);