-/* $NetBSD: main.c,v 1.19 2005/07/01 00:03:36 jmc Exp $ */
+/* $NetBSD: main.c,v 1.21 2009/08/25 06:56:52 dholland Exp $ */
/*-
* Copyright (c) 1991, 1993
#include <sys/cdefs.h>
#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n");
+__COPYRIGHT("@(#) Copyright (c) 1991, 1993\
+ The Regents of the University of California. All rights reserved.");
#endif /* not lint */
#ifndef lint
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
#else
-__RCSID("$NetBSD: main.c,v 1.19 2005/07/01 00:03:36 jmc Exp $");
+__RCSID("$NetBSD: main.c,v 1.21 2009/08/25 06:56:52 dholland Exp $");
#endif
#endif /* not lint */
startup(); /* prepare for a user */
for (;;) { /* main command loop (label 2) */
- if (newloc < 9 && newloc != 0 && closng) {
+ if (newloc < 9 && newloc != 0 && isclosing) {
rspeak(130); /* if closing leave only by */
newloc = loc; /* main office */
if (!panic)
if ((abb[loc] % abbnum) == 0 || kk->seekadr == 0)
kk = <ext[loc];
if (!forced(loc) && dark()) {
- if (wzdark && pct(35)) {
+ if (wasdark && pct(35)) {
die(90);
goto l2000;
}
k = 1;
if (forced(loc))
goto l8;
- if (loc == 33 && pct(25) && !closng)
+ if (loc == 33 && pct(25) && !isclosing)
rspeak(8);
if (!dark()) {
abb[loc]++;
if (toting(i) && prop[i] < 0) /* 2604 */
prop[i] = -1 - prop[i];
}
- wzdark = dark(); /* 2605 */
+ wasdark = dark(); /* 2605 */
if (knfloc > 0 && knfloc != loc)
knfloc = 1;
getin(&wd1, &wd2);
goto l2610;
l4000: verb = k;
- spk = actspk[verb];
+ spk = actspeak[verb];
if (*wd2 != 0 && verb != say)
goto l2800;
if (verb == say)
case 14: /* eat: 8140 */
if (!here(food))
goto l8000;
- l8142: dstroy(food);
+ l8142: destroy(food);
spk = 72;
goto l2011;
case 15:
case 23:
goto l9230; /* blast */
case 24: /* score: 8240 */
- scorng = TRUE;
+ scoring = TRUE;
printf("If you were to quit now, you would score");
printf(" %d out of a possible ", score());
- printf("%d.", mxscor);
- scorng = FALSE;
+ printf("%d.", maxscore);
+ scoring = FALSE;
gaveup = yes(143, 54, 54);
if (gaveup)
done(2);
detail = 3;
goto l2011;
case 27: /* read=8270 */
- if (here(magzin))
- obj = magzin;
+ if (here(magazine))
+ obj = magazine;
if (here(tablet))
obj = obj * 100 + tablet;
- if (here(messag))
- obj = obj * 100 + messag;
+ if (here(message))
+ obj = obj * 100 + message;
if (closed && toting(oyster))
obj = oyster;
if (obj > 100 || obj == 0 || dark())
printf("I can suspend your adventure for you so");
printf(" you can resume later, but\n");
printf("you will have to wait at least");
- printf(" %d minutes before continuing.", latncy);
+ printf(" %d minutes before continuing.", latency);
if (!yes(200, 54, 54))
goto l2012;
datime(&saveday, &savet);
goto l2011;
prop[lamp] = 1;
rspeak(39);
- if (wzdark)
+ if (wasdark)
goto l2000;
goto l2012;
case 9: /* wave */
if ((!toting(obj)) && (obj != rod || !toting(rod2)))
spk = 29;
- if (obj != rod || !at(fissur) || !toting(obj) || closng)
+ if (obj != rod || !at(fissure) || !toting(obj) || isclosing)
goto l2011;
- prop[fissur] = 1 - prop[fissur];
- pspeak(fissur, 2 - prop[fissur]);
+ prop[fissure] = 1 - prop[fissure];
+ pspeak(fissure, 2 - prop[fissure]);
goto l2012;
case 10:
case 11:
l9270: case 27:/* read */
if (dark())
goto l5190;
- if (obj == magzin)
+ if (obj == magazine)
spk = 190;
if (obj == tablet)
spk = 196;
- if (obj == messag)
+ if (obj == message)
spk = 191;
if (obj == oyster && hinted[2] && toting(oyster))
spk = 194;
l5100: if (k != grate)
goto l5110;
if (loc == 1 || loc == 4 || loc == 7)
- k = dprssn;
+ k = depression;
if (loc > 9 && loc < 15)
- k = entrnc;
+ k = entrance;
if (k != grate)
goto l8;
l5110: if (k != dwarf)