-/* $NetBSD: hack.trap.c,v 1.7 2003/04/02 18:36:41 jsm Exp $ */
+/* $NetBSD: hack.trap.c,v 1.10 2011/08/07 06:03:45 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.trap.c,v 1.7 2003/04/02 18:36:41 jsm Exp $");
+__RCSID("$NetBSD: hack.trap.c,v 1.10 2011/08/07 06:03:45 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
" mimic"
};
+static void vtele(void);
+static void teleds(int, int);
+static int teleok(int, int);
+
struct trap *
-maketrap(x, y, typ)
- int x, y, typ;
+maketrap(int x, int y, int typ)
{
struct trap *ttmp;
}
void
-dotrap(trap)
- struct trap *trap;
+dotrap(struct trap *trap)
{
int ttype = trap->ttyp;
}
int
-mintrap(mtmp)
- struct monst *mtmp;
+mintrap(struct monst *mtmp)
{
struct trap *trap = t_at(mtmp->mx, mtmp->my);
int wasintrap = mtmp->mtrapped;
}
void
-selftouch(arg)
- const char *arg;
+selftouch(const char *arg)
{
if (uwep && uwep->otyp == DEAD_COCKATRICE) {
pline("%s touch the dead cockatrice.", arg);
}
void
-float_up()
+float_up(void)
{
if (u.utrap) {
if (u.utraptype == TT_PIT) {
}
void
-float_down()
+float_down(void)
{
struct trap *trap;
pline("You float gently to the ground.");
case TRAPDOOR:
if (!xdnstair || u.ustuck)
break;
- /* fall into next case */
+ /* FALLTHROUGH */
default:
dotrap(trap);
}
pickup(1);
}
-void
-vtele()
+static void
+vtele(void)
{
struct mkroom *croom;
for (croom = &rooms[0]; croom->hx >= 0; croom++)
}
void
-tele()
+tele(void)
{
coord cc;
int nux, nuy;
teleds(nux, nuy);
}
-void
-teleds(nux, nuy)
- int nux, nuy;
+static void
+teleds(int nux, int nuy)
{
if (Punished)
unplacebc();
read_engr_at(u.ux, u.uy);
}
-int
-teleok(x, y)
- int x, y;
+static int
+teleok(int x, int y)
{ /* might throw him into a POOL */
return (isok(x, y) && !IS_ROCK(levl[x][y].typ) && !m_at(x, y) &&
!sobj_at(ENORMOUS_ROCK, x, y) && !t_at(x, y)
}
int
-dotele()
+dotele(void)
{
if (
#ifdef WIZARD
}
void
-placebc(attach)
- int attach;
+placebc(int attach)
{
if (!uchain || !uball) {
impossible("Where are your chain and ball??");
}
void
-unplacebc()
+unplacebc(void)
{
if (!carried(uball)) {
freeobj(uball);
}
void
-level_tele()
+level_tele(void)
{
int newlevel;
if (Teleport_control) {
}
void
-drown()
+drown(void)
{
pline("You fall into a pool!");
pline("You can't swim!");