X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/462fca95471224f85b85be911e72faee16cd1597..4506ee6421a65ebf465cb3e1124f0ba604dbcb20:/rogue/ring.c diff --git a/rogue/ring.c b/rogue/ring.c index ff5fa8b3..27ede2f8 100644 --- a/rogue/ring.c +++ b/rogue/ring.c @@ -1,6 +1,8 @@ +/* $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. @@ -34,9 +36,13 @@ * SUCH DAMAGE. */ +#include #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 */ /* @@ -53,8 +59,8 @@ static char rcsid[] = "$Id: ring.c,v 1.2 1993/08/01 18:52:17 mycroft Exp $"; #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; @@ -67,9 +73,7 @@ boolean r_see_invisible; boolean sustain_strength; boolean maintain_armor; -extern char *curse_message; -extern boolean wizard; - +void put_on_ring() { short ch; @@ -130,9 +134,10 @@ put_on_ring() * 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; @@ -143,6 +148,7 @@ boolean on_left; } } +void remove_ring() { boolean left = 0, right = 0; @@ -150,6 +156,7 @@ remove_ring() char buf[DCOLS]; object *ring; + ring = NULL; if (r_rings == 0) { inv_rings(); } else if (rogue.left_ring && !rogue.right_ring) { @@ -192,8 +199,9 @@ remove_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); @@ -205,9 +213,10 @@ object *ring; 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) { @@ -246,6 +255,7 @@ boolean assign_wk; } } +void inv_rings() { char buf[DCOLS]; @@ -271,8 +281,9 @@ inv_rings() } } +void ring_stats(pr) -boolean pr; + boolean pr; { short i; object *ring;