-/* $NetBSD: globals.c,v 1.11 2000/09/09 09:37:58 jsm Exp $ */
+/* $NetBSD: globals.c,v 1.19 2003/08/07 09:37:02 agc Exp $ */
/*
* Copyright (c) 1983, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)globals.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: globals.c,v 1.11 2000/09/09 09:37:58 jsm Exp $");
+__RCSID("$NetBSD: globals.c,v 1.19 2003/08/07 09:37:02 agc Exp $");
#endif
#endif /* not lint */
const char *const objdes[NUMOFOBJECTS] = {
"There is a knife here.",
"There are an exquisitely crafted sword and scabbard here.",
- 0, /* can land from here */
+ NULL, /* Can land from here. */
"There is a fierce woodsman here brandishing a heavy mallet.",
"There is an unwieldy two-handed sword here.",
"There is a bloody meat cleaver here.",
"There is a Viper ready for launch here.",
"A kerosene lantern is burning luridly here.",
"An old pair of shoes has been discarded here.",
- 0, /* cylon */
+ NULL, /* Cylon. */
"There is a pair of pajamas here.",
"A kingly robe of royal purple and spun gold is draped here.",
"There is a strange golden amulet on the floor here.",
const char *const objsht[NUMOFOBJECTS] = {
"knife",
"fine sword",
- 0,
+ NULL, /* Can land from here. */
"Woodsman",
"two-handed sword",
"meat cleaver",
"viper",
"lantern",
"shoes",
- 0,
+ NULL, /* Cylon. */
"pajamas",
"robe",
"amulet",
"woodsman's body",
"wooden mallet",
"laser",
- 0,
- 0,
+ NULL, /* Bathing goddess. */
+ NULL, /* Goddess. */
"grenade",
"chain",
"rope",
"shovel",
"halberd",
"compass",
- 0,
+ NULL, /* Crash debris. */
"Elf",
- 0,
+ NULL, /* Footsteps. */
"coins",
"match book",
- 0,
+ NULL, /* Man and dwarf. */
"papayas",
"pineapple",
"kiwi",
"ring",
"potion",
"bracelet",
- 0,
- 0,
+ NULL, /* Swarthy woman. */
+ NULL, /* Swarthy woman (with message). */
"Dark Lord",
- 0,
- 0,
- 0,
- 0,
+ NULL, /* Old-timer. */
+ NULL, /* Asteroid field. */
+ NULL, /* Planet nearby. */
+ NULL, /* Charred ground. */
"warhead",
"goddess's body",
"old-timer's body",
"girl's body",
- 0,
+ NULL, /* Native girl. */
"stallion",
"car",
"pot of jewels",
10, 8, 8, 10, 10, 3, 1, 2
};
+const int objflags[NUMOFOBJECTS] = {
+ 0, 0, OBJ_NONOBJ, OBJ_PERSON,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, OBJ_PLURAL, OBJ_NONOBJ, OBJ_PLURAL,
+ 0, OBJ_AN, 0, 0,
+ 0, 0, 0, OBJ_PERSON,
+ OBJ_PERSON, 0, 0, 0,
+ OBJ_PLURAL, 0, 0, 0,
+ 0, 0, OBJ_AN|OBJ_PERSON, OBJ_NONOBJ,
+ OBJ_PLURAL, 0, OBJ_PERSON, OBJ_PLURAL,
+ 0, 0, OBJ_PLURAL, 0,
+ 0, 0, 0, OBJ_PERSON,
+ OBJ_PERSON, OBJ_PERSON, OBJ_PERSON, OBJ_NONOBJ,
+ OBJ_NONOBJ, OBJ_NONOBJ, 0, 0,
+ OBJ_AN, 0, OBJ_PERSON, 0,
+ 0, 0, 0, 0
+};
+
int win = 1;
int matchcount = 20;
int followgod = -1;
struct room *location;
/* current input line */
-char words[NWORD][15];
+char words[NWORD][WORDLEN];
int wordvalue[NWORD];
int wordtype[NWORD];
int wordcount, wordnumber;
unsigned int wear[NUMOFWORDS];
char beenthere[NUMOFROOMS + 1];
char injuries[NUMOFINJURIES];
+int verbose = 0;
const char *username;
-
-struct wlist *hashtab[HASHSIZE];