From ed51e2ee8c47dbb4c8041637e215fab3dac5bc06 Mon Sep 17 00:00:00 2001 From: jsm Date: Sat, 23 Sep 2000 19:23:57 +0000 Subject: Use a lookup table to identify whether objects are plural or singular, instead of testing the final character against 's' in each place. Avoids oddities about "pot of jewels" and "compass". --- battlestar/globals.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'battlestar/globals.c') diff --git a/battlestar/globals.c b/battlestar/globals.c index 5805cf96..379cd70a 100644 --- a/battlestar/globals.c +++ b/battlestar/globals.c @@ -1,4 +1,4 @@ -/* $NetBSD: globals.c,v 1.13 2000/09/21 17:44:34 jsm Exp $ */ +/* $NetBSD: globals.c,v 1.14 2000/09/23 19:23:58 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.13 2000/09/21 17:44:34 jsm Exp $"); +__RCSID("$NetBSD: globals.c,v 1.14 2000/09/23 19:23:58 jsm Exp $"); #endif #endif /* not lint */ @@ -220,6 +220,17 @@ const int objcumber[NUMOFOBJECTS] = { 10, 8, 8, 10, 10, 3, 1, 2 }; +const int objflags[NUMOFOBJECTS] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, OBJ_PLURAL, 0, OBJ_PLURAL, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, OBJ_PLURAL, 0, 0, 0, + 0, 0, 0, 0, OBJ_PLURAL, 0, 0, OBJ_PLURAL, + 0, 0, OBJ_PLURAL, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + int win = 1; int matchcount = 20; int followgod = -1; -- cgit v1.2.3