-/* $NetBSD: extern.h,v 1.15 1999/09/14 19:54:47 jsm Exp $ */
+/* $NetBSD: extern.h,v 1.22 2000/09/23 19:23:58 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 DUG 5
#define NUMOFNOTES 6
+/* Number of times room description shown. */
+#define ROOMDESC 3
+
/* fundamental constants */
#define NUMOFROOMS 275
#define NUMOFWORDS ((NUMOFOBJECTS + BITS - 1) / BITS)
#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 char username[9];
+extern const char *username;
struct wlist {
const char *string;
void blast __P((void));
void bury __P((void));
int card __P((const char *, int));
-int checkout __P((const char *));
void chime __P((void));
void convert __P((int));
void crash __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));
void endfly __P((void));
int fight __P((int, int));
int follow __P((void));
-void getutmp __P((char *));
+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 *));
int launch __P((void));
void light __P((void));
void live __P((void)) __attribute__((__noreturn__));
+struct wlist *lookup __P((const char *));
void love __P((void));
-int move __P((int, int));
void moveenemy __P((int));
+int moveplayer __P((int, int));
void murder __P((void));
void news __P((void));
void newway __P((int));
void printobjs __P((void));
int put __P((void));
int puton __P((void));
+const char *rate __P((void));
void ravage __P((void));
void restore __P((const char *));
int ride __P((void));
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 *));
int use __P((void));
int visual __P((void));
int wearit __P((void));
void whichway __P((struct room));
-int wizard __P((const char *));
void wordinit __P((void));
void writedes __P((void));
int zzz __P((void));
-char *getcom __P((char *, int, const char *, const char *));
-char *getword __P((char *, char *, int));
-const char *rate __P((void));
-const char *truedirec __P((int, char));
-struct wlist *lookup __P((const char *));