NetBSD Problem Report #6048
Received: (qmail 7447 invoked from network); 26 Aug 1998 17:00:52 -0000
Message-Id: <E0zBhx0-00010u-00@octomino.demon.co.uk>
Date: Wed, 26 Aug 1998 15:57:34 +0000
From: Joseph Myers <jsm@octomino.demon.co.uk>
Reply-To: Joseph Myers <jsm28@cam.ac.uk>
To: gnats-bugs@gnats.netbsd.org
Cc: Joseph Myers <jsm28@cam.ac.uk>
Subject: [PATCH] Battlestar bug fix 5
X-Send-Pr-Version: 3.95
>Number: 6048
>Category: bin
>Synopsis: [PATCH] Battlestar bug fix 5
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: hubertf
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 26 10:05:00 +0000 1998
>Closed-Date: Thu Mar 25 16:45:54 +0000 1999
>Last-Modified: Thu Mar 25 16:47:13 +0000 1999
>Originator: Joseph Samuel Myers
>Release: NetBSD-current of 1998-08-24
>Organization:
Trinity College, University of Cambridge, UK
>Environment:
[
System: Linux octomino 2.0.35 #1 Wed Aug 12 15:54:21 UTC 1998 i586 unknown
Architecture: i586
]
>Description:
In the game battlestar, certain objects have special handling when
taken (see the function take()). This depends on the word type of the
word used for the object being NOUNS: the following patch fixes this
to work when `take all' is used, which it would not otherwise. The
comment added in the patch explains why the cases included are right.
>How-To-Repeat:
>Fix:
diff -ruN battlestar/cypher.c battlestar+2/cypher.c
--- battlestar/cypher.c Mon Aug 24 11:05:31 1998
+++ battlestar+2/cypher.c Wed Aug 26 11:54:57 1998
@@ -118,6 +118,36 @@
for (n = 0; n < NUMOFOBJECTS; n++)
if (testbit(location[position].objects, n) && objsht[n]) {
wordvalue[wordnumber + 1] = n;
+ /* Some objects (type NOUNS)
+ * have special treatment in
+ * take(). For these we
+ * must set the type to NOUNS.
+ * However for SWORD and BODY
+ * all it does is find which
+ * of many objects is meant,
+ * so we need do nothing here.
+ * BATHGOD must become
+ * NORMGOD as well. NOUNS
+ * with no special case
+ * must be included here to
+ * get the right error. DOOR
+ * cannot occur as an object
+ * so need not be included. */
+ switch(n) {
+ case BATHGOD:
+ wordvalue[wordnumber + 1] = NORMGOD;
+ case NORMGOD:
+ case AMULET:
+ case MEDALION:
+ case TALISMAN:
+ case MAN:
+ case TIMER:
+ case NATIVE:
+ wordtype[wordnumber + 1] = NOUNS;
+ break;
+ default:
+ wordtype[wordnumber + 1] = OBJECT;
+ }
wordnumber = take(location[position].objects);
}
wordnumber++;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: hubertf
State-Changed-When: Mon Feb 15 16:58:40 PST 1999
State-Changed-Why:
Hi,
can you please send in more data as to what is wrong without
that patch? Some session-log or so with appropriate comments
would be best. (Basically, what 's missing in the "how to repeat"
secion :-).
TIA,
Hubert
Responsible-Changed-From-To: bin-bug-people->hubertf
Responsible-Changed-By: hubertf
Responsible-Changed-When: Mon Feb 15 16:58:40 PST 1999
Responsible-Changed-Why:
trying to care for this beasty :)
State-Changed-From-To: feedback->closed
State-Changed-By: hubertf
State-Changed-When: Thu Mar 25 08:45:54 PST 1999
State-Changed-Why:
I've finally found time to check things out, and committed a fix
for this now (just what you sent in). Thanks for your patch and
the patience you had to take for this to get in!
- Hubert
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.