summaryrefslogtreecommitdiffstats
path: root/rogue/throw.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-12 11:45:01 +0000
committerlukem <lukem@NetBSD.org>1997-10-12 11:45:01 +0000
commita0041450da452d421fa15f352d533a000c2e7921 (patch)
tree500a4c4a314b36a49f50552293c66aa268eb59f2 /rogue/throw.c
parent8d2dd1244517d9cf4b4e1fd9a4914c5496e8dfac (diff)
downloadbsdgames-darwin-a0041450da452d421fa15f352d533a000c2e7921.tar.gz
bsdgames-darwin-a0041450da452d421fa15f352d533a000c2e7921.zip
WARNSify (not an insignificant task...)
Diffstat (limited to 'rogue/throw.c')
-rw-r--r--rogue/throw.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/rogue/throw.c b/rogue/throw.c
index a5cf0dad..ca772053 100644
--- a/rogue/throw.c
+++ b/rogue/throw.c
@@ -1,4 +1,4 @@
-/* $NetBSD: throw.c,v 1.3 1995/04/22 10:28:32 cgd Exp $ */
+/* $NetBSD: throw.c,v 1.4 1997/10/12 11:46:07 lukem Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -36,11 +36,12 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)throw.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: throw.c,v 1.3 1995/04/22 10:28:32 cgd Exp $";
+__RCSID("$NetBSD: throw.c,v 1.4 1997/10/12 11:46:07 lukem Exp $");
#endif
#endif /* not lint */
@@ -58,10 +59,7 @@ static char rcsid[] = "$NetBSD: throw.c,v 1.3 1995/04/22 10:28:32 cgd Exp $";
#include "rogue.h"
-extern short cur_room;
-extern char *curse_message;
-extern char hit_message[];
-
+void
throw()
{
short wch, d;
@@ -125,8 +123,9 @@ throw()
vanish(weapon, 1, &rogue.pack);
}
+boolean
throw_at_monster(monster, weapon)
-object *monster, *weapon;
+ object *monster, *weapon;
{
short damage, hit_chance;
short t;
@@ -162,9 +161,9 @@ object *monster, *weapon;
object *
get_thrown_at_monster(obj, dir, row, col)
-object *obj;
-short dir;
-short *row, *col;
+ object *obj;
+ short dir;
+ short *row, *col;
{
short orow, ocol;
short i, ch;
@@ -205,9 +204,10 @@ short *row, *col;
return(0);
}
+void
flop_weapon(weapon, row, col)
-object *weapon;
-short row, col;
+ object *weapon;
+ short row, col;
{
object *new_weapon, *monster;
short i = 0;
@@ -241,7 +241,8 @@ short row, col;
dch = get_dungeon_char(row, col);
if (mon) {
mch = mvinch(row, col);
- if (monster = object_at(&level_monsters, row, col)) {
+ if ((monster = object_at(&level_monsters,
+ row, col)) != NULL) {
monster->trail_char = dch;
}
if ((mch < 'A') || (mch > 'Z')) {
@@ -264,8 +265,9 @@ short row, col;
}
}
+void
rand_around(i, r, c)
-short i, *r, *c;
+ short i, *r, *c;
{
static char* pos = "\010\007\001\003\004\005\002\006\0";
static short row, col;