summaryrefslogtreecommitdiffstats
path: root/hunt/huntd/shots.c
diff options
context:
space:
mode:
Diffstat (limited to 'hunt/huntd/shots.c')
-rw-r--r--hunt/huntd/shots.c64
1 files changed, 20 insertions, 44 deletions
diff --git a/hunt/huntd/shots.c b/hunt/huntd/shots.c
index ecc08a48..4c524d3d 100644
--- a/hunt/huntd/shots.c
+++ b/hunt/huntd/shots.c
@@ -1,4 +1,4 @@
-/* $NetBSD: shots.c,v 1.8 2009/07/04 01:01:18 dholland Exp $ */
+/* $NetBSD: shots.c,v 1.9 2009/07/04 02:37:20 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: shots.c,v 1.8 2009/07/04 01:01:18 dholland Exp $");
+__RCSID("$NetBSD: shots.c,v 1.9 2009/07/04 02:37:20 dholland Exp $");
#endif /* not lint */
# include <err.h>
@@ -64,7 +64,7 @@ static void zapshot(BULLET *, BULLET *);
* Move the shots already in the air, taking explosions into account
*/
void
-moveshots()
+moveshots(void)
{
BULLET *bp, *next;
PLAYER *pp;
@@ -183,8 +183,7 @@ ret:
* Move a normal shot along its trajectory
*/
static int
-move_normal_shot(bp)
- BULLET *bp;
+move_normal_shot(BULLET *bp)
{
int i, x, y;
PLAYER *pp;
@@ -371,8 +370,7 @@ move_normal_shot(bp)
* Move the drone to the next square
*/
static void
-move_drone(bp)
- BULLET *bp;
+move_drone(BULLET *bp)
{
int mask, count;
int n, dir;
@@ -515,8 +513,7 @@ drone_move:
* Put this bullet back onto the bullet list
*/
static void
-save_bullet(bp)
- BULLET *bp;
+save_bullet(BULLET *bp)
{
bp->b_over = Maze[bp->b_y][bp->b_x];
switch (bp->b_over) {
@@ -567,8 +564,7 @@ save_bullet(bp)
* Update the position of a player in flight
*/
static void
-move_flyer(pp)
- PLAYER *pp;
+move_flyer(PLAYER *pp)
{
int x, y;
@@ -658,9 +654,7 @@ again:
* Handle explosions
*/
static void
-chkshot(bp, next)
- BULLET *bp;
- BULLET *next;
+chkshot(BULLET *bp, BULLET *next)
{
int y, x;
int dy, dx, absdy;
@@ -752,9 +746,7 @@ chkshot(bp, next)
* handle slime shot exploding
*/
static void
-chkslime(bp, next)
- BULLET *bp;
- BULLET *next;
+chkslime(BULLET *bp, BULLET *next)
{
BULLET *nbp;
@@ -800,10 +792,7 @@ chkslime(bp, next)
* it hasn't fizzled yet
*/
void
-move_slime(bp, speed, next)
- BULLET *bp;
- int speed;
- BULLET *next;
+move_slime(BULLET *bp, int speed, BULLET *next)
{
int i, j, dirmask, count;
PLAYER *pp;
@@ -960,8 +949,7 @@ move_slime(bp, speed, next)
* returns whether the given location is a wall
*/
static int
-iswall(y, x)
- int y, x;
+iswall(int y, int x)
{
if (y < 0 || x < 0 || y >= HEIGHT || x >= WIDTH)
return TRUE;
@@ -993,8 +981,7 @@ iswall(y, x)
* Take a shot out of the air.
*/
static void
-zapshot(blist, obp)
- BULLET *blist, *obp;
+zapshot(BULLET *blist, BULLET *obp)
{
BULLET *bp;
FLAG explode;
@@ -1018,9 +1005,7 @@ zapshot(blist, obp)
* Make all shots at this location blow up
*/
void
-explshot(blist, y, x)
- BULLET *blist;
- int y, x;
+explshot(BULLET *blist, int y, int x)
{
BULLET *bp;
@@ -1037,8 +1022,7 @@ explshot(blist, y, x)
* Return a pointer to the player at the given location
*/
PLAYER *
-play_at(y, x)
- int y, x;
+play_at(int y, int x)
{
PLAYER *pp;
@@ -1055,9 +1039,7 @@ play_at(y, x)
* of the player in the maze
*/
int
-opposite(face, dir)
- int face;
- char dir;
+opposite(int face, char dir)
{
switch (face) {
case LEFTS:
@@ -1079,8 +1061,7 @@ opposite(face, dir)
* a pointer to the bullet, otherwise return NULL
*/
BULLET *
-is_bullet(y, x)
- int y, x;
+is_bullet(int y, int x)
{
BULLET *bp;
@@ -1096,9 +1077,7 @@ is_bullet(y, x)
* to the given character.
*/
void
-fixshots(y, x, over)
- int y, x;
- char over;
+fixshots(int y, int x, char over)
{
BULLET *bp;
@@ -1113,8 +1092,7 @@ fixshots(y, x, over)
* on another bullet.
*/
static void
-find_under(blist, bp)
- BULLET *blist, *bp;
+find_under(BULLET *blist, BULLET *bp)
{
BULLET *nbp;
@@ -1130,8 +1108,7 @@ find_under(blist, bp)
* mark a player as under a shot
*/
static void
-mark_player(bp)
- BULLET *bp;
+mark_player(BULLET *bp)
{
PLAYER *pp;
@@ -1148,8 +1125,7 @@ mark_player(bp)
* mark a boot as under a shot
*/
static void
-mark_boot(bp)
- BULLET *bp;
+mark_boot(BULLET *bp)
{
PLAYER *pp;