+/* $NetBSD: throw.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[] = "@(#)throw.c 5.3 (Berkeley) 6/1/90";
+#if 0
+static char sccsid[] = "@(#)throw.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: throw.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
+#endif
#endif /* not lint */
/*
#include "rogue.h"
-extern short cur_room;
-extern char *curse_message;
-extern char hit_message[];
-
+void
throw()
{
short wch, d;
vanish(weapon, 1, &rogue.pack);
}
+boolean
throw_at_monster(monster, weapon)
-object *monster, *weapon;
+ object *monster, *weapon;
{
short damage, hit_chance;
short t;
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;
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;
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')) {
}
}
+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 char pos[] = "\010\007\001\003\004\005\002\006\0";
static short row, col;
short j;