+/* $NetBSD: ring.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
+
/*
- * Copyright (c) 1988 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Timothy C. Stoehr.
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-/*static char sccsid[] = "from: @(#)ring.c 5.3 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: ring.c,v 1.2 1993/08/01 18:52:17 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)ring.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: ring.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
+#endif
#endif /* not lint */
/*
#include "rogue.h"
-char *left_or_right = "left or right hand?";
-char *no_ring = "there's no ring on that hand";
+const char *left_or_right = "left or right hand?";
+const char *no_ring = "there's no ring on that hand";
short stealthy;
short r_rings;
short add_strength;
boolean sustain_strength;
boolean maintain_armor;
-extern char *curse_message;
-extern boolean wizard;
-
+void
put_on_ring()
{
short ch;
* serious problems when do_put_on() is called from read_pack() in restore().
*/
+void
do_put_on(ring, on_left)
-object *ring;
-boolean on_left;
+ object *ring;
+ boolean on_left;
{
if (on_left) {
ring->in_use_flags |= ON_LEFT_HAND;
}
}
+void
remove_ring()
{
boolean left = 0, right = 0;
char buf[DCOLS];
object *ring;
+ ring = NULL;
if (r_rings == 0) {
inv_rings();
} else if (rogue.left_ring && !rogue.right_ring) {
}
}
+void
un_put_on(ring)
-object *ring;
+ object *ring;
{
if (ring && (ring->in_use_flags & ON_LEFT_HAND)) {
ring->in_use_flags &= (~ON_LEFT_HAND);
ring_stats(1);
}
+void
gr_ring(ring, assign_wk)
-object *ring;
-boolean assign_wk;
+ object *ring;
+ boolean assign_wk;
{
ring->what_is = RING;
if (assign_wk) {
}
}
+void
inv_rings()
{
char buf[DCOLS];
}
}
+void
ring_stats(pr)
-boolean pr;
+ boolean pr;
{
short i;
object *ring;