mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
new upstream
git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@10080 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: auto.c,v 1.5 2002/01/31 17:35:52 christos Exp $ */
|
||||
/* $NetBSD: auto.c,v 1.6 2004/01/27 20:30:30 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@@ -67,16 +67,16 @@
|
||||
|
||||
#define CONSDEBUG(a)
|
||||
|
||||
static int distance __P((int, int, int, int));
|
||||
static int xinc __P((int));
|
||||
static int yinc __P((int));
|
||||
static const 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 *));
|
||||
static int distance(int, int, int, int);
|
||||
static int xinc(int);
|
||||
static int yinc(int);
|
||||
static const char *find_moves(void);
|
||||
static COORD *closest_robot(int *);
|
||||
static COORD *closest_heap(int *);
|
||||
static char move_towards(int, int);
|
||||
static char move_away(COORD *);
|
||||
static char move_between(COORD *, COORD *);
|
||||
static int between(COORD *, COORD *);
|
||||
|
||||
/* distance():
|
||||
* return "move" number distance of the two coordinates
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.19 2003/08/07 09:37:36 agc Exp $ */
|
||||
/* $NetBSD: main.c,v 1.20 2004/01/27 20:30:30 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -39,13 +39,13 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.19 2003/08/07 09:37:36 agc Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.20 2004/01/27 20:30:30 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
# include "robots.h"
|
||||
|
||||
int main __P((int, char **));
|
||||
int main(int, char **);
|
||||
|
||||
extern const char *Scorefile;
|
||||
extern int Max_per_uid;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: robots.h,v 1.16 2003/08/07 09:37:37 agc Exp $ */
|
||||
/* $NetBSD: robots.h,v 1.18 2004/01/27 20:30:30 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -32,12 +32,12 @@
|
||||
*/
|
||||
|
||||
# include <sys/ttydefaults.h>
|
||||
# include <sys/endian.h>
|
||||
# include <ctype.h>
|
||||
# include <curses.h>
|
||||
# include <err.h>
|
||||
# include <errno.h>
|
||||
# include <fcntl.h>
|
||||
# include <netinet/in.h>
|
||||
# include <pwd.h>
|
||||
# include <setjmp.h>
|
||||
# include <signal.h>
|
||||
@@ -120,27 +120,27 @@ extern jmp_buf End_move;
|
||||
* functions types
|
||||
*/
|
||||
|
||||
void add_score __P((int));
|
||||
bool another __P((void));
|
||||
char automove __P((void));
|
||||
int cmp_sc __P((const void *, const void *));
|
||||
bool do_move __P((int, int));
|
||||
bool eaten __P((const COORD *));
|
||||
void flush_in __P((void));
|
||||
void get_move __P((void));
|
||||
void init_field __P((void));
|
||||
bool jumping __P((void));
|
||||
void make_level __P((void));
|
||||
void move_robots __P((int));
|
||||
bool must_telep __P((void));
|
||||
void play_level __P((void));
|
||||
int query __P((const char *));
|
||||
void quit __P((int)) __attribute__((__noreturn__));
|
||||
void reset_count __P((void));
|
||||
int rnd __P((int));
|
||||
COORD *rnd_pos __P((void));
|
||||
void score __P((int));
|
||||
void set_name __P((SCORE *));
|
||||
void show_score __P((void));
|
||||
int sign __P((int));
|
||||
void telmsg __P((int));
|
||||
void add_score(int);
|
||||
bool another(void);
|
||||
char automove(void);
|
||||
int cmp_sc(const void *, const void *);
|
||||
bool do_move(int, int);
|
||||
bool eaten(const COORD *);
|
||||
void flush_in(void);
|
||||
void get_move(void);
|
||||
void init_field(void);
|
||||
bool jumping(void);
|
||||
void make_level(void);
|
||||
void move_robots(int);
|
||||
bool must_telep(void);
|
||||
void play_level(void);
|
||||
int query(const char *);
|
||||
void quit(int) __attribute__((__noreturn__));
|
||||
void reset_count(void);
|
||||
int rnd(int);
|
||||
COORD *rnd_pos(void);
|
||||
void score(int);
|
||||
void set_name(SCORE *);
|
||||
void show_score(void);
|
||||
int sign(int);
|
||||
void telmsg(int);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: score.c,v 1.16 2003/08/07 09:37:37 agc Exp $ */
|
||||
/* $NetBSD: score.c,v 1.17 2004/01/27 20:30:30 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: score.c,v 1.16 2003/08/07 09:37:37 agc Exp $");
|
||||
__RCSID("$NetBSD: score.c,v 1.17 2004/01/27 20:30:30 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -49,8 +49,8 @@ static SCORE Top[MAXSCORES];
|
||||
|
||||
static u_int32_t numscores, max_uid;
|
||||
|
||||
static void read_score __P((int));
|
||||
static void write_score __P((int));
|
||||
static void read_score(int);
|
||||
static void write_score(int);
|
||||
|
||||
/*
|
||||
* read_score:
|
||||
|
||||
Reference in New Issue
Block a user