-/* $NetBSD: extern.h,v 1.19 2000/09/09 09:37:58 jsm Exp $ */
+/* $NetBSD: extern.h,v 1.25 2000/09/24 14:11:09 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
#define BURY 1050
#define JUMP 1051
#define KICK 1052
+#define OPEN 1053
+#define VERBOSE 1054
+#define BRIEF 1055
/* injuries */
#define ARM 6 /* broken arm */
#define MAXWEIGHT 60
#define MAXCUMBER 10
+/* Flags for objects. */
+#define OBJ_PLURAL 1
+
struct room {
const char *name;
int link[8];
extern const char *const ouch[NUMOFINJURIES];
extern const int objwt[NUMOFOBJECTS];
extern const int objcumber[NUMOFOBJECTS];
+extern const int objflags[NUMOFOBJECTS];
+#define is_plural_object(n) (objflags[(n)] & OBJ_PLURAL)
/* current input line */
+#define WORDLEN 15
#define NWORD 20 /* words per line */
-extern char words[NWORD][15];
+extern char words[NWORD][WORDLEN];
extern int wordvalue[NWORD];
extern int wordtype[NWORD];
extern int wordcount, wordnumber;
extern unsigned int wear[NUMOFWORDS];
extern char beenthere[NUMOFROOMS + 1];
extern char injuries[NUMOFINJURIES];
+extern int verbose;
extern const char *username;
int value, article;
struct wlist *next;
};
-#define HASHSIZE 256
-#define HASHMUL 81
-#define HASHMASK (HASHSIZE - 1)
-extern struct wlist *hashtab[HASHSIZE];
extern struct wlist wlist[];
struct objs {
#define DEFAULT_SAVE_FILE ".Bstar"
-void blast __P((void));
void bury __P((void));
int card __P((const char *, int));
void chime __P((void));
void die __P((void)) __attribute__((__noreturn__));
void diesig __P((int)) __attribute__((__noreturn__));
void dig __P((void));
+void dooropen __P((void));
int draw __P((void));
void drink __P((void));
int drive __P((void));
int drop __P((const char *));
int eat __P((void));
-void endfly __P((void));
int fight __P((int, int));
int follow __P((void));
char *getcom __P((char *, int, const char *, const char *));
char *getword __P((char *, char *, int));
int give __P((void));
-int hash __P((const char *));
void initialize __P((const char *));
-void install __P((struct wlist *));
int jump __P((void));
void kiss __P((void));
int land __P((void));
int launch __P((void));
void light __P((void));
void live __P((void)) __attribute__((__noreturn__));
-struct wlist *lookup __P((const char *));
void love __P((void));
-void moveenemy __P((int));
int moveplayer __P((int, int));
void murder __P((void));
void news __P((void));
void newway __P((int));
-void notarget __P((void));
void open_score_file __P((void));
void parse __P((void));
void post __P((char));
int ride __P((void));
void save __P((const char *));
char *save_file_name __P((const char *, size_t));
-void screen __P((void));
int shoot __P((void));
-void succumb __P((int));
int take __P((unsigned int[]));
int takeoff __P((void));
-void target __P((void));
int throw __P((const char *));
const char *truedirec __P((int, char));
int ucard __P((const unsigned int *));