-/* $NetBSD: object.c,v 1.15 2009/08/12 08:04:05 dholland Exp $ */
+/* $NetBSD: object.c,v 1.17 2019/02/03 03:19:25 mrg Exp $ */
/* object.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: object.c,v 1.15 2009/08/12 08:04:05 dholland Exp $");
+__RCSID("$NetBSD: object.c,v 1.17 2019/02/03 03:19:25 mrg Exp $");
#endif /* not lint */
#include "header.h"
#include "extern.h"
if an object was found.
*/
void
-lookforobject()
+lookforobject(void)
{
int i, j;
if (c[TIMESTOP])
item[playerx][playery] = OTELEPORTER;
know[playerx][playery] = 1;
+ /* FALLTHROUGH */
case OTELEPORTER:
lprcat("\nZaaaappp! You've been teleported!\n");
beep();
item[playerx][playery] = OTRAPARROW;
know[playerx][playery] = 0;
+ /* FALLTHROUGH */
case OTRAPARROW:
lprcat("\nYou are hit by an arrow");
beep(); /* for an arrow trap */
item[playerx][playery] = ODARTRAP;
know[playerx][playery] = 0;
+ /* FALLTHROUGH */
case ODARTRAP:
lprcat("\nYou are hit by a dart");
beep(); /* for a dart trap */
item[playerx][playery] = OTRAPDOOR;
know[playerx][playery] = 1;
+ /* FALLTHROUGH */
case OTRAPDOOR:
lastnum = 272; /* a trap door */
if ((level == MAXLEVEL - 1) || (level == MAXLEVEL + MAXVLEVEL - 1)) {
if dir > 0 the up else down
*/
static void
-ostairs(dir)
- int dir;
+ostairs(int dir)
{
int k;
lprcat("\nDo you (s) stay here ");
subroutine to handle a teleport trap +/- 1 level maximum
*/
void
-oteleport(err)
- int err;
+oteleport(int err)
{
int tmp;
if (err)
function to process a potion
*/
static void
-opotion(pot)
- int pot;
+opotion(int pot)
{
lprcat("\nDo you (d) drink it, (t) take it");
iopts();
function to drink a potion
*/
void
-quaffpotion(pot)
- int pot;
+quaffpotion(int pot)
{
int i, j, k;
if (pot < 0 || pot >= MAXPOTION)
function to process a magic scroll
*/
static void
-oscroll(typ)
- int typ;
+oscroll(int typ)
{
lprcat("\nDo you ");
if (c[BLINDCOUNT] == 0)
* function to adjust time when time warping and taking courses in school
*/
void
-adjusttime(tim)
- long tim;
+adjusttime(long tim)
{
int j;
for (j = 0; j < 26; j++)/* adjust time related parameters */
function to read a scroll
*/
void
-read_scroll(typ)
- int typ;
+read_scroll(int typ)
{
int i, j;
if (typ < 0 || typ >= MAXSCROLL)
static void
-oorb()
+oorb(void)
{
}
static void
-opit()
+opit(void)
{
int i;
if (rnd(101) < 81) {
}
static void
-obottomless()
+obottomless(void)
{
lprcat("\nYou fell into a bottomless pit!");
beep();
}
static void
-oelevator(dir)
- int dir;
+oelevator(int dir)
{
#ifdef lint
int x;
}
static void
-ostatue()
+ostatue(void)
{
}
static void
-omirror()
+omirror(void)
{
}
static void
-obook()
+obook(void)
{
lprcat("\nDo you ");
if (c[BLINDCOUNT] == 0)
function to read a book
*/
void
-readbook(lev)
- int lev;
+readbook(int lev)
{
int i, tmp;
if (lev <= 3)
* 100* the argument
*/
static void
-ogold(arg)
- int arg;
+ogold(int arg)
{
long i;
i = iarg[playerx][playery];
}
static void
-ohome()
+ohome(void)
{
int i;
nosignal = 1; /* disable signals */
/* routine to save program space */
void
-iopts()
+iopts(void)
{
lprcat(", or (i) ignore it? ");
}
void
-ignore()
+ignore(void)
{
lprcat("ignore\n");
}