From 671eb498250e6a38918c75f1c5dfb75e3212c305 Mon Sep 17 00:00:00 2001 From: jsm Date: Mon, 25 Sep 2000 14:44:59 +0000 Subject: Add new flags OBJ_PERSON and OBJ_NONOBJ to the objflags array. --- battlestar/extern.h | 13 +++++++++++-- battlestar/globals.c | 28 ++++++++++++++++++---------- 2 files changed, 29 insertions(+), 12 deletions(-) (limited to 'battlestar') diff --git a/battlestar/extern.h b/battlestar/extern.h index 0982ec16..edc3c2cf 100644 --- a/battlestar/extern.h +++ b/battlestar/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.26 2000/09/25 14:08:08 jsm Exp $ */ +/* $NetBSD: extern.h,v 1.27 2000/09/25 14:44:59 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -227,9 +227,18 @@ #define MAXWEIGHT 60 #define MAXCUMBER 10 -/* Flags for objects. */ +/* + * These are flags for objects in the objflags array. OBJ_PLURAL means + * that the object short name is plural; OBJ_AN that it begins with a + * vowel sound so should be preceded by "an" instead of "a"; OBJ_PERSON + * that it is a living person; OBJ_NONOBJ that it is not an object (to + * which any game action can be applied) at all (e.g. footsteps, asteroids). + * Any individual object has at most one of OBJ_PERSON and OBJ_NONOBJ. + */ #define OBJ_PLURAL 1 #define OBJ_AN 2 +#define OBJ_PERSON 4 +#define OBJ_NONOBJ 8 struct room { const char *name; diff --git a/battlestar/globals.c b/battlestar/globals.c index 072ce36d..2c7d7f52 100644 --- a/battlestar/globals.c +++ b/battlestar/globals.c @@ -1,4 +1,4 @@ -/* $NetBSD: globals.c,v 1.17 2000/09/25 14:08:08 jsm Exp $ */ +/* $NetBSD: globals.c,v 1.18 2000/09/25 14:45:01 jsm Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)globals.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: globals.c,v 1.17 2000/09/25 14:08:08 jsm Exp $"); +__RCSID("$NetBSD: globals.c,v 1.18 2000/09/25 14:45:01 jsm Exp $"); #endif #endif /* not lint */ @@ -221,14 +221,22 @@ const int objcumber[NUMOFOBJECTS] = { }; const int objflags[NUMOFOBJECTS] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, OBJ_PLURAL, 0, OBJ_PLURAL, - 0, OBJ_AN, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, OBJ_PLURAL, 0, 0, 0, - 0, 0, OBJ_AN, 0, OBJ_PLURAL, 0, 0, OBJ_PLURAL, - 0, 0, OBJ_PLURAL, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - OBJ_AN, 0, 0, 0, 0, 0, 0, 0 + 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; -- cgit v1.2.3-56-ge451