new upstream

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@10080 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2004-02-14 21:35:37 +00:00
parent 26fb70d304
commit a02c126403
224 changed files with 5624 additions and 2217 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: driver.c,v 1.9 2003/06/11 12:00:22 wiz Exp $ */
/* $NetBSD: driver.c,v 1.10 2004/01/27 20:30:29 jsm 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: driver.c,v 1.9 2003/06/11 12:00:22 wiz Exp $");
__RCSID("$NetBSD: driver.c,v 1.10 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
# include <sys/ioctl.h>
@@ -69,13 +69,13 @@ u_short stat_port; /* port # of statistics tcp socket */
# define DAEMON_SIZE (sizeof Daemon - 1)
# endif
static void clear_scores __P((void));
static int havechar __P((PLAYER *, int));
static void init __P((void));
int main __P((int, char *[], char *[]));
static void makeboots __P((void));
static void send_stats __P((void));
static void zap __P((PLAYER *, FLAG, int));
static void clear_scores(void);
static int havechar(PLAYER *, int);
static void init(void);
int main(int, char *[], char *[]);
static void makeboots(void);
static void send_stats(void);
static void zap(PLAYER *, FLAG, int);
/*

View File

@@ -1,4 +1,4 @@
/* $NetBSD: execute.c,v 1.3 2003/06/11 12:00:22 wiz Exp $ */
/* $NetBSD: execute.c,v 1.4 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,19 +32,19 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: execute.c,v 1.3 2003/06/11 12:00:22 wiz Exp $");
__RCSID("$NetBSD: execute.c,v 1.4 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
# include <stdlib.h>
# include "hunt.h"
static void cloak __P((PLAYER *));
static void face __P((PLAYER *, int));
static void fire __P((PLAYER *, int));
static void fire_slime __P((PLAYER *, int));
static void move_player __P((PLAYER *, int));
static void pickup __P((PLAYER *, int, int, int, int));
static void scan __P((PLAYER *));
static void cloak(PLAYER *);
static void face(PLAYER *, int);
static void fire(PLAYER *, int);
static void fire_slime(PLAYER *, int);
static void move_player(PLAYER *, int);
static void pickup(PLAYER *, int, int, int, int);
static void scan(PLAYER *);
# ifdef MONITOR

View File

@@ -1,4 +1,4 @@
/* $NetBSD: expl.c,v 1.3 2003/06/11 12:00:22 wiz Exp $ */
/* $NetBSD: expl.c,v 1.4 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,13 +32,13 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: expl.c,v 1.3 2003/06/11 12:00:22 wiz Exp $");
__RCSID("$NetBSD: expl.c,v 1.4 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
# include <stdlib.h>
# include "hunt.h"
static void remove_wall __P((int, int));
static void remove_wall(int, int);
/*

View File

@@ -1,4 +1,4 @@
/* $NetBSD: faketalk.c,v 1.8 2003/06/11 12:00:22 wiz Exp $ */
/* $NetBSD: faketalk.c,v 1.10 2004/02/08 22:23:50 jsm 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: faketalk.c,v 1.8 2003/06/11 12:00:22 wiz Exp $");
__RCSID("$NetBSD: faketalk.c,v 1.10 2004/02/08 22:23:50 jsm Exp $");
#endif /* not lint */
#include "bsd.h"
@@ -66,8 +66,8 @@ extern char *my_machine_name;
extern char *First_arg, *Last_arg;
extern char **environ;
static void do_announce __P((char *));
SIGNAL_TYPE exorcise __P((int));
static void do_announce(char *);
SIGNAL_TYPE exorcise(int);
/*
* exorcise - disspell zombies
*/

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hunt.h,v 1.9 2003/06/11 12:04:06 wiz Exp $ */
/* $NetBSD: hunt.h,v 1.11 2004/02/08 22:23:50 jsm Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
@@ -416,69 +416,69 @@ extern FLAG no_beep;
* function types
*/
void add_shot __P((int, int, int, char, int, PLAYER *, int, char));
int answer __P((void));
void bad_con __P((void)) __attribute__((__noreturn__));
void bad_ver __P((void)) __attribute__((__noreturn__));
int broadcast_vec __P((int, struct sockaddr **));
void ce __P((PLAYER *));
void cgoto __P((PLAYER *, int, int));
void check __P((PLAYER *, int, int));
void checkdam __P((PLAYER *, PLAYER *, IDENT *, int, char));
void clearwalls __P((void));
void clear_eol __P((void));
void clear_the_screen __P((void));
void clrscr __P((PLAYER *));
BULLET *create_shot __P((int, int, int, char, int, int, PLAYER *,
IDENT *, int, char));
void do_connect __P((const char *, char, long));
void do_message __P((void));
void drawmaze __P((PLAYER *));
void drawplayer __P((PLAYER *, FLAG));
void drawstatus __P((PLAYER *));
void execute __P((PLAYER *));
void faketalk __P((void));
void find_driver __P((FLAG));
void fixshots __P((int, int, char));
IDENT *get_ident __P((u_long, u_long, const char *, char));
void get_local_name __P((const char *));
int get_remote_name __P((char *));
BULLET *is_bullet __P((int, int));
void look __P((PLAYER *));
void makemaze __P((void));
void message __P((PLAYER *, const char *));
void mon_execute __P((PLAYER *));
void moveshots __P((void));
void open_ctl __P((void));
int opposite __P((int, char));
void otto __P((int, int, char));
void outch __P((PLAYER *, int));
void outstr __P((PLAYER *, const char *, int));
int player_sym __P((const PLAYER *, int, int));
PLAYER *play_at __P((int, int));
void playit __P((void));
void put_ch __P((char));
void add_shot(int, int, int, char, int, PLAYER *, int, char);
int answer(void);
void bad_con(void) __attribute__((__noreturn__));
void bad_ver(void) __attribute__((__noreturn__));
int broadcast_vec(int, struct sockaddr **);
void ce(PLAYER *);
void cgoto(PLAYER *, int, int);
void check(PLAYER *, int, int);
void checkdam(PLAYER *, PLAYER *, IDENT *, int, char);
void clearwalls(void);
void clear_eol(void);
void clear_the_screen(void);
void clrscr(PLAYER *);
BULLET *create_shot(int, int, int, char, int, int, PLAYER *,
IDENT *, int, char);
void do_connect(const char *, char, long);
void do_message(void);
void drawmaze(PLAYER *);
void drawplayer(PLAYER *, FLAG);
void drawstatus(PLAYER *);
void execute(PLAYER *);
void faketalk(void);
void find_driver(FLAG);
void fixshots(int, int, char);
IDENT *get_ident(u_long, u_long, const char *, char);
void get_local_name(const char *);
int get_remote_name(char *);
BULLET *is_bullet(int, int);
void look(PLAYER *);
void makemaze(void);
void message(PLAYER *, const char *);
void mon_execute(PLAYER *);
void moveshots(void);
void open_ctl(void);
int opposite(int, char);
void otto(int, int, char);
void outch(PLAYER *, int);
void outstr(PLAYER *, const char *, int);
int player_sym(const PLAYER *, int, int);
PLAYER *play_at(int, int);
void playit(void);
void put_ch(char);
# ifndef USE_CURSES
void put_str __P((const char *));
void put_str(const char *);
# endif
int quit __P((int));
int rand_dir __P((void));
int rand_num __P((int));
void redraw_screen __P((void));
void rmnl __P((char *));
void rollexpl __P((void));
void see __P((PLAYER *, int));
void sendcom __P((PLAYER *, int, ...));
void showexpl __P((int, int, char));
void showstat __P((PLAYER *));
void start_driver __P((void));
void stmonitor __P((PLAYER *));
void stplayer __P((PLAYER *, int));
char translate __P((char));
SIGNAL_TYPE cleanup __P((int)) __attribute__((__noreturn__));
SIGNAL_TYPE intr __P((int));
SIGNAL_TYPE sigalrm __P((int));
SIGNAL_TYPE sigemt __P((int)) __attribute__((__noreturn__));
SIGNAL_TYPE sigterm __P((int)) __attribute__((__noreturn__));
SIGNAL_TYPE sigusr1 __P((int)) __attribute__((__noreturn__));
SIGNAL_TYPE tstp __P((int));
int quit(int);
int rand_dir(void);
int rand_num(int);
void redraw_screen(void);
void rmnl(char *);
void rollexpl(void);
void see(PLAYER *, int);
void sendcom(PLAYER *, int, ...);
void showexpl(int, int, char);
void showstat(PLAYER *);
void start_driver(void);
void stmonitor(PLAYER *);
void stplayer(PLAYER *, int);
char translate(char);
SIGNAL_TYPE cleanup(int) __attribute__((__noreturn__));
SIGNAL_TYPE intr(int);
SIGNAL_TYPE sigalrm(int);
SIGNAL_TYPE sigemt(int) __attribute__((__noreturn__));
SIGNAL_TYPE sigterm(int) __attribute__((__noreturn__));
SIGNAL_TYPE sigusr1(int) __attribute__((__noreturn__));
SIGNAL_TYPE tstp(int);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: makemaze.c,v 1.3 2003/06/11 12:00:22 wiz Exp $ */
/* $NetBSD: makemaze.c,v 1.4 2004/01/27 20:30:29 jsm 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: makemaze.c,v 1.3 2003/06/11 12:00:22 wiz Exp $");
__RCSID("$NetBSD: makemaze.c,v 1.4 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
# include "hunt.h"
@@ -40,10 +40,10 @@ __RCSID("$NetBSD: makemaze.c,v 1.3 2003/06/11 12:00:22 wiz Exp $");
# define ISCLEAR(y,x) (Maze[y][x] == SPACE)
# define ODD(n) ((n) & 01)
static int candig __P((int, int));
static void dig __P((int, int));
static void dig_maze __P((int, int));
static void remap __P((void));
static int candig(int, int);
static void dig(int, int);
static void dig_maze(int, int);
static void remap(void);
void
makemaze()

View File

@@ -1,4 +1,4 @@
/* $NetBSD: shots.c,v 1.4 2003/06/11 12:00:23 wiz Exp $ */
/* $NetBSD: shots.c,v 1.5 2004/01/27 20:30:29 jsm 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.4 2003/06/11 12:00:23 wiz Exp $");
__RCSID("$NetBSD: shots.c,v 1.5 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
# include <err.h>
@@ -43,21 +43,21 @@ __RCSID("$NetBSD: shots.c,v 1.4 2003/06/11 12:00:23 wiz Exp $");
# define PLUS_DELTA(x, max) if (x < max) x++; else x--
# define MINUS_DELTA(x, min) if (x > min) x--; else x++
static void chkshot __P((BULLET *, BULLET *));
static void chkslime __P((BULLET *, BULLET *));
static void explshot __P((BULLET *, int, int));
static void find_under __P((BULLET *, BULLET *));
static int iswall __P((int, int));
static void mark_boot __P((BULLET *));
static void mark_player __P((BULLET *));
static void chkshot(BULLET *, BULLET *);
static void chkslime(BULLET *, BULLET *);
static void explshot(BULLET *, int, int);
static void find_under(BULLET *, BULLET *);
static int iswall(int, int);
static void mark_boot(BULLET *);
static void mark_player(BULLET *);
#ifdef DRONE
static void move_drone __P((BULLET *));
static void move_drone(BULLET *);
#endif
static void move_flyer __P((PLAYER *));
static int move_normal_shot __P((BULLET *));
static void move_slime __P((BULLET *, int, BULLET *));
static void save_bullet __P((BULLET *));
static void zapshot __P((BULLET *, BULLET *));
static void move_flyer(PLAYER *);
static int move_normal_shot(BULLET *);
static void move_slime(BULLET *, int, BULLET *);
static void save_bullet(BULLET *);
static void zapshot(BULLET *, BULLET *);
/*
* moveshots:

View File

@@ -1,4 +1,4 @@
/* $NetBSD: talk_ctl.h,v 1.5 2003/06/11 12:00:23 wiz Exp $ */
/* $NetBSD: talk_ctl.h,v 1.6 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
@@ -103,4 +103,4 @@ extern CTL_MSG msg;
#define p_error(str) warn(str)
#endif
void ctl_transact __P((struct in_addr, CTL_MSG, int, CTL_RESPONSE *));
void ctl_transact(struct in_addr, CTL_MSG, int, CTL_RESPONSE *);