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: def.func_tab.h,v 1.6 2003/04/02 18:36:34 jsm Exp $ */
/* $NetBSD: def.func_tab.h,v 1.7 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -65,14 +65,14 @@
#define _DEF_FUNC_TAB_H_
struct func_tab {
char f_char;
int (*f_funct) __P((void));
int (*f_funct)(void);
};
extern const struct func_tab cmdlist[];
struct ext_func_tab {
const char *ef_txt;
int (*ef_funct) __P((void));
int (*ef_funct)(void);
};
extern const struct ext_func_tab extcmdlist[];

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.apply.c,v 1.7 2003/04/02 18:36:35 jsm Exp $ */
/* $NetBSD: hack.apply.c,v 1.8 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.apply.c,v 1.7 2003/04/02 18:36:35 jsm Exp $");
__RCSID("$NetBSD: hack.apply.c,v 1.8 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
#include "hack.h"
@@ -71,16 +71,16 @@ __RCSID("$NetBSD: hack.apply.c,v 1.7 2003/04/02 18:36:35 jsm Exp $");
#include "def.edog.h"
#include "def.mkroom.h"
static void use_camera __P((struct obj *));
static int in_ice_box __P((struct obj *));
static int ck_ice_box __P((struct obj *));
static int out_ice_box __P((struct obj *));
static void use_ice_box __P((struct obj *));
static struct monst *bchit __P((int, int , int , int));
static void use_whistle __P((struct obj *));
static void use_magic_whistle __P((struct obj *));
static int dig __P((void));
static int use_pick_axe __P((struct obj *));
static void use_camera(struct obj *);
static int in_ice_box(struct obj *);
static int ck_ice_box(struct obj *);
static int out_ice_box(struct obj *);
static void use_ice_box(struct obj *);
static struct monst *bchit(int, int , int , int);
static void use_whistle(struct obj *);
static void use_magic_whistle(struct obj *);
static int dig(void);
static int use_pick_axe(struct obj *);
int
doapply()

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.do.c,v 1.6 2003/04/02 18:36:35 jsm Exp $ */
/* $NetBSD: hack.do.c,v 1.7 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.do.c,v 1.6 2003/04/02 18:36:35 jsm Exp $");
__RCSID("$NetBSD: hack.do.c,v 1.7 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
/* Contains code for 'd', 'D' (drop), '>', '<' (up, down) and 't' (throw) */
@@ -75,7 +75,7 @@ __RCSID("$NetBSD: hack.do.c,v 1.6 2003/04/02 18:36:35 jsm Exp $");
#include <stdlib.h>
static int drop __P((struct obj *));
static int drop(struct obj *);
int
dodrop()
@@ -406,8 +406,8 @@ dothrow()
mon = bhit(u.dx, u.dy, (obj->otyp == ICE_BOX) ? 1 :
(!Punished || obj != uball) ? 8 : !u.ustuck ? 5 : 1,
obj->olet,
(void (*) __P((struct monst *, struct obj *))) 0,
(int (*) __P((struct obj *, struct obj *))) 0, obj);
(void (*)(struct monst *, struct obj *)) 0,
(int (*)(struct obj *, struct obj *)) 0, obj);
}
if (mon) {
/* awake monster if sleeping */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.h,v 1.9 2003/04/02 18:36:37 jsm Exp $ */
/* $NetBSD: hack.h,v 1.10 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -110,7 +110,7 @@ struct prop {
#define RIGHT_SIDE RIGHT_RING
#define BOTH_SIDES (LEFT_SIDE | RIGHT_SIDE)
long p_flgs;
void (*p_tofn) __P((void)); /* called after timeout */
void (*p_tofn)(void); /* called after timeout */
};
struct you {
@@ -212,8 +212,8 @@ extern char sdir[]; /* defined in hack.c */
extern const char shtypes[]; /* = "=/)%?!["; 8 types: 7 specialized, 1 mixed */
extern const char vowels[];
extern coord bhitpos; /* place where thrown weapon falls to the ground */
extern int (*afternmv) __P((void));
extern int (*occupation) __P((void));
extern int (*afternmv)(void);
extern int (*occupation)(void);
extern int CO, LI; /* usually COLNO and ROWNO+2 */
extern int bases[];
extern int doorindex;

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.invent.c,v 1.8 2003/04/02 18:36:37 jsm Exp $ */
/* $NetBSD: hack.invent.c,v 1.9 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.invent.c,v 1.8 2003/04/02 18:36:37 jsm Exp $");
__RCSID("$NetBSD: hack.invent.c,v 1.9 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -78,8 +78,8 @@ __RCSID("$NetBSD: hack.invent.c,v 1.8 2003/04/02 18:36:37 jsm Exp $");
static int lastinvnr = 51; /* 0 ... 51 */
static void assigninvlet __P((struct obj *));
static char *xprname __P((struct obj *, char));
static void assigninvlet(struct obj *);
static char *xprname(struct obj *, char);
static void
assigninvlet(otmp)
@@ -566,7 +566,7 @@ ckunpaid(otmp)
int
ggetobj(word, fn, max)
const char *word;
int (*fn) __P((struct obj *));
int (*fn)(struct obj *);
int max;
{
char buf[BUFSZ];
@@ -575,8 +575,8 @@ ggetobj(word, fn, max)
int oletct = 0, iletct = 0;
boolean allflag = FALSE;
char olets[20], ilets[20];
int (*ckfn) __P((struct obj *)) =
(int (*) __P((struct obj *))) 0;
int (*ckfn)(struct obj *) =
(int (*)(struct obj *)) 0;
xchar allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; /* BAH */
if (!invent && !allowgold) {
pline("You have nothing to %s.", word);
@@ -652,8 +652,8 @@ askchain(objchn, olets, allflag, fn, ckfn, max)
struct obj *objchn;
char *olets;
int allflag;
int (*fn) __P((struct obj *));
int (*ckfn) __P((struct obj *));
int (*fn)(struct obj *);
int (*ckfn)(struct obj *);
int max;
{
struct obj *otmp, *otmp2;

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.main.c,v 1.8 2003/04/02 18:36:37 jsm Exp $ */
/* $NetBSD: hack.main.c,v 1.9 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.main.c,v 1.8 2003/04/02 18:36:37 jsm Exp $");
__RCSID("$NetBSD: hack.main.c,v 1.9 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
#include <signal.h>
@@ -79,8 +79,8 @@ __RCSID("$NetBSD: hack.main.c,v 1.8 2003/04/02 18:36:37 jsm Exp $");
#define gamename "hack"
#endif
int (*afternmv) __P((void));
int (*occupation) __P((void));
int (*afternmv)(void);
int (*occupation)(void);
const char *occtxt; /* defined when occupation != NULL */
int hackpid; /* current pid */
@@ -92,8 +92,8 @@ char SAVEF[PL_NSIZ + 11] = "save/"; /* save/99999player */
char *hname; /* name of the game (argv[0] of call) */
char obuf[BUFSIZ]; /* BUFSIZ is defined in stdio.h */
int main __P((int, char *[]));
static void chdirx __P((const char *, boolean));
int main(int, char *[]);
static void chdirx(const char *, boolean);
int
main(argc, argv)

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.options.c,v 1.6 2003/04/02 18:36:39 jsm Exp $ */
/* $NetBSD: hack.options.c,v 1.7 2004/01/01 16:02:51 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.options.c,v 1.6 2003/04/02 18:36:39 jsm Exp $");
__RCSID("$NetBSD: hack.options.c,v 1.7 2004/01/01 16:02:51 jsm Exp $");
#endif /* not lint */
#include <stdlib.h>

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.pri.c,v 1.7 1.8 2003/04/02 18:36:39 jsm Exp $ */
/* $NetBSD: hack.pri.c,v 1.8 2003/04/02 18:36:39 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.shk.c,v 1.6 2003/04/02 18:36:40 jsm Exp $ */
/* $NetBSD: hack.shk.c,v 1.7 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.shk.c,v 1.6 2003/04/02 18:36:40 jsm Exp $");
__RCSID("$NetBSD: hack.shk.c,v 1.7 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -71,14 +71,14 @@ __RCSID("$NetBSD: hack.shk.c,v 1.6 2003/04/02 18:36:40 jsm Exp $");
#include "extern.h"
#ifndef QUEST
static void setpaid __P((void));
static void addupbill __P((void));
static void findshk __P((int));
static struct bill_x *onbill __P((struct obj *));
static void pay __P((long, struct monst *));
static int dopayobj __P((struct bill_x *));
static int getprice __P((struct obj *));
static int realhunger __P((void));
static void setpaid(void);
static void addupbill(void);
static void findshk(int);
static struct bill_x *onbill(struct obj *);
static void pay(long, struct monst *);
static int dopayobj(struct bill_x *);
static int getprice(struct obj *);
static int realhunger(void);
#endif
#ifdef QUEST

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.vault.c,v 1.6 2003/04/02 18:36:41 jsm Exp $ */
/* $NetBSD: hack.vault.c,v 1.7 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.vault.c,v 1.6 2003/04/02 18:36:41 jsm Exp $");
__RCSID("$NetBSD: hack.vault.c,v 1.7 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
#include "hack.h"
@@ -114,8 +114,8 @@ static struct monst *guard;
static int gdlevel;
#define EGD ((struct egd *)(&(guard->mextra[0])))
static void restfakecorr __P((void));
static int goldincorridor __P((void));
static void restfakecorr(void);
static int goldincorridor(void);
static void
restfakecorr()

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.zap.c,v 1.6 2003/04/02 18:36:42 jsm Exp $ */
/* $NetBSD: hack.zap.c,v 1.7 2004/01/27 20:30:29 jsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.zap.c,v 1.6 2003/04/02 18:36:42 jsm Exp $");
__RCSID("$NetBSD: hack.zap.c,v 1.7 2004/01/27 20:30:29 jsm Exp $");
#endif /* not lint */
#include "hack.h"
@@ -386,8 +386,8 @@ bhit(ddx, ddy, range, sym, fhitm, fhito, obj)
int ddx, ddy, range; /* direction and range */
char sym; /* symbol displayed on path */
/* fns called when mon/obj hit */
void (*fhitm) __P((struct monst *, struct obj *));
int (*fhito) __P((struct obj *, struct obj *));
void (*fhitm)(struct monst *, struct obj *);
int (*fhito)(struct obj *, struct obj *);
struct obj *obj; /* 2nd arg to fhitm/fhito */
{
struct monst *mtmp;