summaryrefslogtreecommitdiffstats
path: root/robots
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1999-05-16 00:03:35 +0000
committerchristos <christos@NetBSD.org>1999-05-16 00:03:35 +0000
commit7e276a03812df02c083eaffc9cc2d5fff4bcf11d (patch)
treee40fd969e0946393e66943d2046cc006c8867dd5 /robots
parent36e0b3e5fe951ef4265a0da56201960d52ed7ee6 (diff)
downloadbsdgames-darwin-7e276a03812df02c083eaffc9cc2d5fff4bcf11d.tar.gz
bsdgames-darwin-7e276a03812df02c083eaffc9cc2d5fff4bcf11d.tar.zst
bsdgames-darwin-7e276a03812df02c083eaffc9cc2d5fff4bcf11d.zip
Add missing prototypes
Diffstat (limited to 'robots')
-rw-r--r--robots/auto.c18
-rw-r--r--robots/robots.h3
-rw-r--r--robots/score.c7
3 files changed, 20 insertions, 8 deletions
diff --git a/robots/auto.c b/robots/auto.c
index f2621fff..defe195d 100644
--- a/robots/auto.c
+++ b/robots/auto.c
@@ -1,4 +1,4 @@
-/* $NetBSD: auto.c,v 1.1 1999/05/15 23:56:35 christos Exp $ */
+/* $NetBSD: auto.c,v 1.2 1999/05/16 00:03:35 christos Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,6 +67,16 @@
#define CONSDEBUG(a)
+static int distance __P((int, int, int, int));
+static int xinc __P((int));
+static int yinc __P((int));
+static char *find_moves __P((void));
+static COORD *closest_robot __P((int *));
+static COORD *closest_heap __P((int *));
+static char move_towards __P((int, int));
+static char move_away __P((COORD *));
+static char move_between __P((COORD *, COORD *));
+static int between __P((COORD *, COORD *));
/* distance():
* return "move" number distance of the two coordinates
@@ -266,9 +276,7 @@ move_between(rob, hp)
COORD *rob;
COORD *hp;
{
- char ok_moves[10], best_move;
- char *ptr;
- int move_judge, cur_judge, dx, dy, mvx, mvy;
+ int dx, dy;
float slope, cons;
/* equation of the line between us and the closest robot */
@@ -377,4 +385,4 @@ automove()
return move_between(robot_close, heap_close);
#endif
-} /* end get_move */
+} /* end automove */
diff --git a/robots/robots.h b/robots/robots.h
index d0737505..a93e07b4 100644
--- a/robots/robots.h
+++ b/robots/robots.h
@@ -1,4 +1,4 @@
-/* $NetBSD: robots.h,v 1.9 1999/05/15 23:56:36 christos Exp $ */
+/* $NetBSD: robots.h,v 1.10 1999/05/16 00:03:35 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -141,3 +141,4 @@ void score __P((void));
void set_name __P((SCORE *));
void show_score __P((void));
int sign __P((int));
+char automove __P((void));
diff --git a/robots/score.c b/robots/score.c
index 7781e3ad..aacb07ec 100644
--- a/robots/score.c
+++ b/robots/score.c
@@ -1,4 +1,4 @@
-/* $NetBSD: score.c,v 1.6 1999/05/15 23:56:36 christos Exp $ */
+/* $NetBSD: score.c,v 1.7 1999/05/16 00:03:35 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: score.c,v 1.6 1999/05/15 23:56:36 christos Exp $");
+__RCSID("$NetBSD: score.c,v 1.7 1999/05/16 00:03:35 christos Exp $");
#endif
#endif /* not lint */
@@ -53,6 +53,9 @@ static SCORE Top[MAXSCORES];
static u_int32_t numscores, max_uid;
+static void read_score __P((int));
+static void write_score __P((int));
+
/*
* read_score:
* Read the score file in MI format