]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - hunt/huntd/execute.c
cgram: rename local functions
[bsdgames-darwin.git] / hunt / huntd / execute.c
index e3e5ba2b4ce22284baedb31d5fbc62f5f904c272..98ffe377751ca868fea7a7d4cb1733262a5a10a5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: execute.c,v 1.10 2011/08/31 16:24:56 plunky Exp $      */
+/*     $NetBSD: execute.c,v 1.12 2014/03/29 21:38:54 dholland Exp $    */
 /*
  * Copyright (c) 1983-2003, Regents of the University of California.
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: execute.c,v 1.10 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: execute.c,v 1.12 2014/03/29 21:38:54 dholland Exp $");
 #endif /* not lint */
 
 #include <stdlib.h>
@@ -194,7 +194,7 @@ move_player(PLAYER *pp, int dir)
 {
        PLAYER *newp;
        int x, y;
-       FLAG moved;
+       bool moved;
        BULLET *bp;
 
        y = pp->p_y;
@@ -215,13 +215,13 @@ move_player(PLAYER *pp, int dir)
                break;
        }
 
-       moved = FALSE;
+       moved = false;
        switch (Maze[y][x]) {
          case SPACE:
 #ifdef RANDOM
          case DOOR:
 #endif
-               moved = TRUE;
+               moved = true;
                break;
          case WALL1:
          case WALL2:
@@ -240,7 +240,7 @@ move_player(PLAYER *pp, int dir)
                else
                        pickup(pp, y, x, 50, Maze[y][x]);
                Maze[y][x] = SPACE;
-               moved = TRUE;
+               moved = true;
                break;
          case SHOT:
          case GRENADE:
@@ -254,9 +254,9 @@ move_player(PLAYER *pp, int dir)
 #endif
                bp = is_bullet(y, x);
                if (bp != NULL)
-                       bp->b_expl = TRUE;
+                       bp->b_expl = true;
                Maze[y][x] = SPACE;
-               moved = TRUE;
+               moved = true;
                break;
          case LEFTS:
          case RIGHT:
@@ -297,7 +297,7 @@ move_player(PLAYER *pp, int dir)
                else
                        message(pp, "You can hobble around on one boot.");
                Maze[y][x] = SPACE;
-               moved = TRUE;
+               moved = true;
                break;
 #endif
        }
@@ -309,13 +309,13 @@ move_player(PLAYER *pp, int dir)
                        }
                if (pp->p_undershot) {
                        fixshots(pp->p_y, pp->p_x, pp->p_over);
-                       pp->p_undershot = FALSE;
+                       pp->p_undershot = false;
                }
-               drawplayer(pp, FALSE);
+               drawplayer(pp, false);
                pp->p_over = Maze[y][x];
                pp->p_y = y;
                pp->p_x = x;
-               drawplayer(pp, TRUE);
+               drawplayer(pp, true);
        }
 }
 
@@ -328,7 +328,7 @@ turn_player(PLAYER *pp, int dir)
 {
        if (pp->p_face != dir) {
                pp->p_face = dir;
-               drawplayer(pp, TRUE);
+               drawplayer(pp, true);
        }
 }
 
@@ -363,8 +363,8 @@ fire(PLAYER *pp, int req_index)
        outstr(pp, Buf, 3);
 
        add_shot(shot_type[req_index], pp->p_y, pp->p_x, pp->p_face,
-               shot_req[req_index], pp, FALSE, pp->p_face);
-       pp->p_undershot = TRUE;
+               shot_req[req_index], pp, false, pp->p_face);
+       pp->p_undershot = true;
 
        /*
         * Show the object to everyone
@@ -410,8 +410,8 @@ fire_slime(PLAYER *pp, int req_index)
        outstr(pp, Buf, 3);
 
        add_shot(SLIME, pp->p_y, pp->p_x, pp->p_face,
-               slime_req[req_index] * SLIME_FACTOR, pp, FALSE, pp->p_face);
-       pp->p_undershot = TRUE;
+               slime_req[req_index] * SLIME_FACTOR, pp, false, pp->p_face);
+       pp->p_undershot = true;
 
        /*
         * Show the object to everyone
@@ -550,7 +550,7 @@ scan(PLAYER *pp)
  * pickup:
  *     check whether the object blew up or whether he picked it up
  */
-void
+static void
 pickup(PLAYER *pp, int y, int x, int prob, int obj)
 {
        int req;
@@ -566,7 +566,7 @@ pickup(PLAYER *pp, int y, int x, int prob, int obj)
                abort();
        }
        if (rand_num(100) < prob)
-               add_shot(obj, y, x, LEFTS, req, NULL, TRUE, pp->p_face);
+               add_shot(obj, y, x, LEFTS, req, NULL, true, pp->p_face);
        else {
                pp->p_ammo += req;
                (void) snprintf(Buf, sizeof(Buf), "%3d", pp->p_ammo);