mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
copy in from cvs; cvs2svn fucked up big time
git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9775 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# $NetBSD: Makefile,v 1.8 1998/02/18 22:37:30 jtc Exp $
|
||||
# $NetBSD: Makefile,v 1.9 2001/10/19 03:06:09 tv Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= battlestar
|
||||
SRCS= battlestar.c com1.c com2.c com3.c com4.c com5.c com6.c com7.c \
|
||||
SRCS= battlestar.c command1.c command2.c command3.c command4.c \
|
||||
command5.c command6.c command7.c \
|
||||
init.c cypher.c getcom.c parse.c room.c save.c fly.c misc.c \
|
||||
globals.c dayfile.c nightfile.c dayobjs.c nightobjs.c words.c
|
||||
MAN= battlestar.6
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
# Makefrag - makefile fragment for battlestar
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
|
||||
battlestar_DEFS := $(FGETLN_DEFS)
|
||||
battlestar_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
|
||||
battlestar_all: battlestar/battlestar battlestar/battlestar.6
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: battlestar.6,v 1.6 1998/09/10 21:50:35 frueauf Exp $
|
||||
.\" $NetBSD: battlestar.6,v 1.12 2002/09/26 18:31:59 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@@ -33,7 +33,7 @@
|
||||
.\"
|
||||
.\" @(#)battlestar.6 8.1 (Berkeley) 5/31/93
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dd September 7, 2000
|
||||
.Dt BATTLESTAR 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -42,17 +42,15 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl r
|
||||
.Op saved-file
|
||||
.Op Ar saved-file
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is an adventure game in the classic style. However, it's slightly less
|
||||
of a
|
||||
puzzle and more a game of exploration. There are a few magical words
|
||||
in the game, but on the whole, simple English
|
||||
is an adventure game in the classic style.
|
||||
However, it's slightly less of a puzzle and more a game of exploration.
|
||||
There are a few magical words in the game, but on the whole, simple English
|
||||
should suffice to make one's desires understandable to the parser.
|
||||
.Sh THE SETTING
|
||||
In the days before the darkness came, when battlestars ruled the
|
||||
heavens...
|
||||
In the days before the darkness came, when battlestars ruled the heavens...
|
||||
.Bd -literal -offset indent
|
||||
Three He made and gave them to His daughters,
|
||||
Beautiful nymphs, the goddesses of the waters.
|
||||
@@ -61,19 +59,18 @@ Two to wash the lands and churn the waves asunder,
|
||||
Three to rule the world and purge the skies with thunder.
|
||||
.Ed
|
||||
.Pp
|
||||
In those times great wizards were known and their powers were beyond
|
||||
belief. They could take any object from thin air, and, uttering the
|
||||
word
|
||||
In those times great wizards were known and their powers were beyond belief.
|
||||
They could take any object from thin air, and, uttering the word
|
||||
.Sq su
|
||||
could disappear.
|
||||
.Pp
|
||||
In those times men were known for their lust of gold and desire to
|
||||
wear fine weapons. Swords and coats of mail were fashioned that could
|
||||
withstand a laser blast.
|
||||
wear fine weapons.
|
||||
Swords and coats of mail were fashioned that could withstand a laser blast.
|
||||
.Pp
|
||||
But when the darkness fell, the rightful reigns were toppled. Swords
|
||||
and helms and heads of state went rolling across the grass. The entire
|
||||
fleet of battlestars was reduced to a single ship.
|
||||
But when the darkness fell, the rightful reigns were toppled.
|
||||
Swords and helms and heads of state went rolling across the grass.
|
||||
The entire fleet of battlestars was reduced to a single ship.
|
||||
.Sh SAMPLE COMMANDS
|
||||
.Bd -literal -offset indent
|
||||
take --- take an object
|
||||
@@ -85,19 +82,19 @@ draw --- carry an object you are wearing
|
||||
puton --- take an object and wear it
|
||||
take off -- draw an object and drop it
|
||||
|
||||
throw <object> <direction>
|
||||
throw \*[Lt]object\*[Gt] \*[Lt]direction\*[Gt]
|
||||
|
||||
! <shell esc>
|
||||
! \*[Lt]shell esc\*[Gt]
|
||||
.Ed
|
||||
.Sh IMPLIED OBJECTS
|
||||
.Bd -literal -offset indent
|
||||
>-: take watermelon
|
||||
\*[Gt]-: take watermelon
|
||||
watermelon:
|
||||
Taken.
|
||||
>-: eat
|
||||
\*[Gt]-: eat
|
||||
watermelon:
|
||||
Eaten.
|
||||
>-: take knife and sword and apple, drop all
|
||||
\*[Gt]-: take knife and sword and apple, drop all
|
||||
knife:
|
||||
Taken.
|
||||
broadsword:
|
||||
@@ -110,31 +107,49 @@ broadsword:
|
||||
Dropped.
|
||||
apple:
|
||||
Dropped.
|
||||
>-: get
|
||||
\*[Gt]-: get
|
||||
knife:
|
||||
Taken.
|
||||
.Ed
|
||||
.Pp
|
||||
Notice that the "shadow" of the next word stays around if you
|
||||
want to take advantage of it. That is, saying "take knife" and then
|
||||
"drop"
|
||||
want to take advantage of it.
|
||||
That is, saying "take knife" and then "drop"
|
||||
will drop the knife you just took.
|
||||
.Sh SCORE & INVEN
|
||||
The two commands "score" and "inven" will print out your current status
|
||||
in the game.
|
||||
.Sh SCORE \*[Am] INVEN
|
||||
The two commands
|
||||
.Dq score
|
||||
and
|
||||
.Dq inven
|
||||
will print out your current status in the game.
|
||||
.Sh SAVING A GAME
|
||||
The command "save" will save your game in a file, by default called
|
||||
".Bstar" in your home directory. You
|
||||
can recover a saved game by using the
|
||||
The command
|
||||
.Dq save
|
||||
will save your game in a file called
|
||||
.Pa .Bstar
|
||||
in your home directory by default.
|
||||
You can recover a saved game by using the
|
||||
.Fl r
|
||||
option when you start up the
|
||||
game, or by giving the name of the saved file as an argument.
|
||||
Save files will be saved to and restored from your home directory unless a
|
||||
path is specified - i.e.,
|
||||
.Dq Li battlestar -r savedgame
|
||||
will look for
|
||||
.Pa savedgame
|
||||
in your home directory, but
|
||||
.Dq Li battlestar -r ./savedgame
|
||||
will look in the current directory.
|
||||
.Dq Li battlestar -r
|
||||
will look for the default file,
|
||||
.Pa .Bstar
|
||||
in your home directory.
|
||||
.Sh DIRECTIONS
|
||||
The compass directions N, S, E, and W can be used if you have a compass.
|
||||
If you don't have a compass, you'll have to say R, L, A, or B, which
|
||||
stand for Right, Left, Ahead, and Back.
|
||||
Directions printed in room descriptions are
|
||||
always printed in R, L, A, & B relative directions.
|
||||
always printed in R, L, A, and B relative directions.
|
||||
.Sh HISTORY
|
||||
I wrote Battlestar in 1979 in order to experiment with the niceties of
|
||||
the C Language.
|
||||
@@ -142,8 +157,8 @@ Most interesting things that happen in the game are hardwired into the
|
||||
code, so don't send me any hate mail about it!
|
||||
Instead, enjoy art for art's sake!
|
||||
.Sh AUTHOR
|
||||
David Riggle
|
||||
.Sh INSPIRATION & ASSISTANCE
|
||||
.An David Riggle
|
||||
.Sh INSPIRATION \*[Am] ASSISTANCE
|
||||
.Bl -item -compact
|
||||
.It
|
||||
Chris Guthrie
|
||||
@@ -153,8 +168,8 @@ Peter Da Silva
|
||||
Kevin Brown
|
||||
.It
|
||||
Edward Wang
|
||||
.It
|
||||
Ken Arnold & Company
|
||||
.It
|
||||
Ken Arnold \*[Am] Company
|
||||
.El
|
||||
.Sh BUGS
|
||||
Countless.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: battlestar.c,v 1.6 1997/10/11 02:06:55 lukem Exp $ */
|
||||
/* $NetBSD: battlestar.c,v 1.12 2000/09/21 17:44:34 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)battlestar.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: battlestar.c,v 1.6 1997/10/11 02:06:55 lukem Exp $");
|
||||
__RCSID("$NetBSD: battlestar.c,v 1.12 2000/09/21 17:44:34 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -70,12 +70,16 @@ main(argc, argv)
|
||||
open_score_file();
|
||||
setregid(getgid(), getgid());
|
||||
|
||||
initialize((argc < 2) ? NULL : (strcmp(argv[1], "-r") ? argv[1]
|
||||
: (argv[2] ? argv[2]
|
||||
: DEFAULT_SAVE_FILE)));
|
||||
if (argc < 2)
|
||||
initialize(NULL);
|
||||
else if (strcmp(argv[1], "-r") == 0)
|
||||
initialize((argc > 2) ? argv[2] : DEFAULT_SAVE_FILE);
|
||||
else
|
||||
initialize(argv[1]);
|
||||
start:
|
||||
news();
|
||||
beenthere[position]++;
|
||||
if (beenthere[position] <= ROOMDESC)
|
||||
beenthere[position]++;
|
||||
if (notes[LAUNCHED])
|
||||
crash(); /* decrements fuel & crash */
|
||||
if (matchlight) {
|
||||
@@ -92,7 +96,7 @@ start:
|
||||
run:
|
||||
next = getcom(mainbuf, sizeof mainbuf, ">-: ",
|
||||
"Please type in something.");
|
||||
for (wordcount = 0; next && wordcount < 20; wordcount++)
|
||||
for (wordcount = 0; next && wordcount < NWORD - 1; wordcount++)
|
||||
next = getword(next, words[wordcount], -1);
|
||||
parse();
|
||||
switch (cypher()) {
|
||||
@@ -101,6 +105,6 @@ run:
|
||||
case 0:
|
||||
goto start;
|
||||
default:
|
||||
exit(1); /* Shouldn't happen */
|
||||
errx(1, "bad return from cypher(): please submit a bug report");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cypher.c,v 1.7 1998/08/24 00:25:32 hubertf Exp $ */
|
||||
/* $NetBSD: cypher.c,v 1.21 2000/09/25 19:37:58 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cypher.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: cypher.c,v 1.7 1998/08/24 00:25:32 hubertf Exp $");
|
||||
__RCSID("$NetBSD: cypher.c,v 1.21 2000/09/25 19:37:58 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -51,64 +51,82 @@ cypher()
|
||||
int junk;
|
||||
int lflag = -1;
|
||||
char buffer[10];
|
||||
char *filename;
|
||||
char *filename, *rfilename;
|
||||
size_t filename_len;
|
||||
|
||||
while (wordtype[wordnumber] == ADJS)
|
||||
wordnumber++;
|
||||
while (wordnumber <= wordcount) {
|
||||
if (wordtype[wordnumber] != VERB &&
|
||||
!(wordtype[wordnumber] == OBJECT && wordvalue[wordnumber] == KNIFE)) {
|
||||
printf("%s: How's that?\n",
|
||||
(wordnumber == wordcount) ? words[0] : words[wordnumber]);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
switch (wordvalue[wordnumber]) {
|
||||
|
||||
case AUXVERB:
|
||||
/*
|
||||
* Take the following word as the verb (e.g.
|
||||
* "make love", "climb up").
|
||||
*/
|
||||
wordnumber++;
|
||||
continue;
|
||||
|
||||
case UP:
|
||||
if (location[position].access || wiz || tempwiz) {
|
||||
if (!location[position].access)
|
||||
puts("Zap! A gust of wind lifts you up.");
|
||||
if (!move(location[position].up, AHEAD))
|
||||
if (!moveplayer(location[position].up, AHEAD))
|
||||
return (-1);
|
||||
} else {
|
||||
puts("There is no way up");
|
||||
puts("There is no way up.");
|
||||
return (-1);
|
||||
}
|
||||
lflag = 0;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
if (!move(location[position].down, AHEAD))
|
||||
if (!moveplayer(location[position].down, AHEAD))
|
||||
return (-1);
|
||||
lflag = 0;
|
||||
break;
|
||||
|
||||
case LEFT:
|
||||
if (!move(left, LEFT))
|
||||
if (!moveplayer(left, LEFT))
|
||||
return (-1);
|
||||
lflag = 0;
|
||||
break;
|
||||
|
||||
case RIGHT:
|
||||
if (!move(right, RIGHT))
|
||||
if (!moveplayer(right, RIGHT))
|
||||
return (-1);
|
||||
lflag = 0;
|
||||
break;
|
||||
|
||||
case AHEAD:
|
||||
if (!move(ahead, AHEAD))
|
||||
if (!moveplayer(ahead, AHEAD))
|
||||
return (-1);
|
||||
lflag = 0;
|
||||
break;
|
||||
|
||||
case BACK:
|
||||
if (!move(back, BACK))
|
||||
if (!moveplayer(back, BACK))
|
||||
return (-1);
|
||||
lflag = 0;
|
||||
break;
|
||||
|
||||
case SHOOT:
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(location[position].objects, n) && objsht[n]) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = shoot();
|
||||
}
|
||||
if (!things)
|
||||
puts("Nothing to shoot at!");
|
||||
wordnumber++;
|
||||
wordnumber++;
|
||||
} else
|
||||
@@ -117,8 +135,11 @@ cypher()
|
||||
|
||||
case TAKE:
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(location[position].objects, n) && objsht[n]) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
/* Some objects (type NOUNS)
|
||||
* have special treatment in
|
||||
@@ -138,6 +159,7 @@ cypher()
|
||||
switch(n) {
|
||||
case BATHGOD:
|
||||
wordvalue[wordnumber + 1] = NORMGOD;
|
||||
/* FALLTHROUGH */
|
||||
case NORMGOD:
|
||||
case AMULET:
|
||||
case MEDALION:
|
||||
@@ -154,120 +176,160 @@ cypher()
|
||||
}
|
||||
wordnumber++;
|
||||
wordnumber++;
|
||||
if (!things)
|
||||
puts("Nothing to take!");
|
||||
} else
|
||||
take(location[position].objects);
|
||||
break;
|
||||
|
||||
case DROP:
|
||||
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(inven, n)) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = drop("Dropped");
|
||||
}
|
||||
wordnumber++;
|
||||
wordnumber++;
|
||||
if (!things)
|
||||
puts("Nothing to drop!");
|
||||
} else
|
||||
drop("Dropped");
|
||||
break;
|
||||
|
||||
|
||||
case KICK:
|
||||
case THROW:
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things, wv;
|
||||
things = 0;
|
||||
wv = wordvalue[wordnumber];
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(inven, n) ||
|
||||
(testbit(location[position].objects, n) && objsht[n])) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = throw(wordvalue[wordnumber] == KICK ? "Kicked" : "Thrown");
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
printf("Nothing to %s!\n", wv == KICK ? "kick" : "throw");
|
||||
} else
|
||||
throw(wordvalue[wordnumber] == KICK ? "Kicked" : "Thrown");
|
||||
break;
|
||||
|
||||
case TAKEOFF:
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(wear, n)) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = takeoff();
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
puts("Nothing to take off!");
|
||||
} else
|
||||
takeoff();
|
||||
break;
|
||||
|
||||
|
||||
case DRAW:
|
||||
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(wear, n)) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = draw();
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
puts("Nothing to draw!");
|
||||
} else
|
||||
draw();
|
||||
break;
|
||||
|
||||
|
||||
case PUTON:
|
||||
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(location[position].objects, n) && objsht[n]) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = puton();
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
puts("Nothing to put on!");
|
||||
} else
|
||||
puton();
|
||||
break;
|
||||
|
||||
case WEARIT:
|
||||
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(inven, n)) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = wearit();
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
puts("Nothing to wear!");
|
||||
} else
|
||||
wearit();
|
||||
break;
|
||||
|
||||
|
||||
case EAT:
|
||||
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(inven, n)) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
wordnumber = eat();
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
puts("Nothing to eat!");
|
||||
} else
|
||||
eat();
|
||||
break;
|
||||
|
||||
|
||||
case PUT:
|
||||
put();
|
||||
break;
|
||||
|
||||
|
||||
case INVEN:
|
||||
if (ucard(inven)) {
|
||||
puts("You are holding:\n");
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(inven, n))
|
||||
printf("\t%s\n", objsht[n]);
|
||||
printf("\n= %d kilogram%s (%d%%)\n", carrying, (carrying == 1 ? "." : "s."), (WEIGHT ? carrying * 100 / WEIGHT : -1));
|
||||
printf("Your arms are %d%% full.\n", encumber * 100 / CUMBER);
|
||||
if (WEIGHT == 0)
|
||||
printf("\n= %d kilogram%s (can't lift any weight%s)\n",
|
||||
carrying,
|
||||
(carrying == 1 ? "." : "s."),
|
||||
(carrying ? " or move with what you have" : ""));
|
||||
else
|
||||
printf("\n= %d kilogram%s (%d%%)\n",
|
||||
carrying,
|
||||
(carrying == 1 ? "." : "s."),
|
||||
carrying * 100 / WEIGHT);
|
||||
if (CUMBER == 0)
|
||||
printf("Your arms can't pick anything up.\n");
|
||||
else
|
||||
printf("Your arms are %d%% full.\n",
|
||||
encumber * 100 / CUMBER);
|
||||
} else
|
||||
puts("You aren't carrying anything.");
|
||||
|
||||
@@ -286,12 +348,30 @@ cypher()
|
||||
printf("\nYou can still carry up to %d kilogram%s\n", WEIGHT, (WEIGHT == 1 ? "." : "s."));
|
||||
} else
|
||||
puts("\nYou are in perfect health.");
|
||||
wordnumber++;
|
||||
break;
|
||||
|
||||
case USE:
|
||||
lflag = use();
|
||||
break;
|
||||
|
||||
case OPEN:
|
||||
if (wordnumber < wordcount && wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
for (n = 0; n < NUMOFOBJECTS; n++)
|
||||
if (testbit(inven, n)) {
|
||||
things++;
|
||||
wordvalue[wordnumber + 1] = n;
|
||||
dooropen();
|
||||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
puts("Nothing to open!");
|
||||
} else
|
||||
dooropen();
|
||||
break;
|
||||
|
||||
case LOOK:
|
||||
if (!notes[CANTSEE] || testbit(inven, LAMPON) ||
|
||||
testbit(location[position].objects, LAMPON)
|
||||
@@ -369,18 +449,31 @@ cypher()
|
||||
break;
|
||||
|
||||
case SAVE:
|
||||
printf("\nSave file name (default %s) ",
|
||||
printf("\nSave file name (default %s): ",
|
||||
DEFAULT_SAVE_FILE);
|
||||
filename = fgetln(stdin, &filename_len);
|
||||
if (filename_len == 0
|
||||
|| (filename_len == 1 && filename[0] == '\n'))
|
||||
save(DEFAULT_SAVE_FILE,
|
||||
strlen(DEFAULT_SAVE_FILE));
|
||||
rfilename = save_file_name(DEFAULT_SAVE_FILE,
|
||||
strlen(DEFAULT_SAVE_FILE));
|
||||
else {
|
||||
if (filename[filename_len - 1] == '\n')
|
||||
filename_len--;
|
||||
save(filename, filename_len);
|
||||
rfilename = save_file_name(filename,
|
||||
filename_len);
|
||||
}
|
||||
save(rfilename);
|
||||
free(rfilename);
|
||||
break;
|
||||
|
||||
case VERBOSE:
|
||||
verbose = 1;
|
||||
printf("[Maximum verbosity]\n");
|
||||
break;
|
||||
|
||||
case BRIEF:
|
||||
verbose = 0;
|
||||
printf("[Standard verbosity]\n");
|
||||
break;
|
||||
|
||||
case FOLLOW:
|
||||
@@ -461,7 +554,6 @@ cypher()
|
||||
return (-1);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
if (wordnumber < wordcount && *words[wordnumber++] == ',')
|
||||
continue;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dayobjs.c,v 1.6 1997/10/11 02:07:16 lukem Exp $ */
|
||||
/* $NetBSD: dayobjs.c,v 1.8 1999/09/18 16:42:29 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dayobjs.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: dayobjs.c,v 1.6 1997/10/11 02:07:16 lukem Exp $");
|
||||
__RCSID("$NetBSD: dayobjs.c,v 1.8 1999/09/18 16:42:29 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.9 1998/09/13 15:27:26 hubertf Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.28 2000/09/25 19:37:59 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -35,8 +35,6 @@
|
||||
* @(#)externs.h 8.1 (Berkeley) 5/31/93
|
||||
*/
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <pwd.h>
|
||||
@@ -44,6 +42,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define BITS (8 * sizeof (int))
|
||||
@@ -188,6 +187,10 @@
|
||||
#define BURY 1050
|
||||
#define JUMP 1051
|
||||
#define KICK 1052
|
||||
#define OPEN 1053
|
||||
#define VERBOSE 1054
|
||||
#define BRIEF 1055
|
||||
#define AUXVERB 1056
|
||||
|
||||
/* injuries */
|
||||
#define ARM 6 /* broken arm */
|
||||
@@ -207,6 +210,9 @@
|
||||
#define DUG 5
|
||||
#define NUMOFNOTES 6
|
||||
|
||||
/* Number of times room description shown. */
|
||||
#define ROOMDESC 3
|
||||
|
||||
/* fundamental constants */
|
||||
#define NUMOFROOMS 275
|
||||
#define NUMOFWORDS ((NUMOFOBJECTS + BITS - 1) / BITS)
|
||||
@@ -222,6 +228,19 @@
|
||||
#define MAXWEIGHT 60
|
||||
#define MAXCUMBER 10
|
||||
|
||||
/*
|
||||
* These are flags for objects in the objflags array. OBJ_PLURAL means
|
||||
* that the object short name is plural; OBJ_AN that it begins with a
|
||||
* vowel sound so should be preceded by "an" instead of "a"; OBJ_PERSON
|
||||
* that it is a living person; OBJ_NONOBJ that it is not an object (to
|
||||
* which any game action can be applied) at all (e.g. footsteps, asteroids).
|
||||
* Any individual object has at most one of OBJ_PERSON and OBJ_NONOBJ.
|
||||
*/
|
||||
#define OBJ_PLURAL 1
|
||||
#define OBJ_AN 2
|
||||
#define OBJ_PERSON 4
|
||||
#define OBJ_NONOBJ 8
|
||||
|
||||
struct room {
|
||||
const char *name;
|
||||
int link[8];
|
||||
@@ -238,7 +257,7 @@ struct room {
|
||||
};
|
||||
extern struct room dayfile[];
|
||||
extern struct room nightfile[];
|
||||
struct room *location;
|
||||
extern struct room *location;
|
||||
|
||||
/* object characteristics */
|
||||
extern const char *const objdes[NUMOFOBJECTS];
|
||||
@@ -246,55 +265,62 @@ extern const char *const objsht[NUMOFOBJECTS];
|
||||
extern const char *const ouch[NUMOFINJURIES];
|
||||
extern const int objwt[NUMOFOBJECTS];
|
||||
extern const int objcumber[NUMOFOBJECTS];
|
||||
extern const int objflags[NUMOFOBJECTS];
|
||||
#define is_plural_object(n) (objflags[(n)] & OBJ_PLURAL)
|
||||
/*
|
||||
* These macros yield words to use with objects (followed but not preceded
|
||||
* by spaces, or with no spaces if the expansion is the empty string).
|
||||
*/
|
||||
#define A_OR_AN(n) (objflags[(n)] & OBJ_AN ? "an " : "a ")
|
||||
#define A_OR_AN_OR_THE(n) (is_plural_object((n)) ? "the " : A_OR_AN((n)))
|
||||
#define A_OR_AN_OR_BLANK(n) (is_plural_object((n)) ? "" : A_OR_AN((n)))
|
||||
#define IS_OR_ARE(n) (is_plural_object((n)) ? "are " : "is ")
|
||||
|
||||
/* current input line */
|
||||
#define WORDLEN 15
|
||||
#define NWORD 20 /* words per line */
|
||||
char words[NWORD][15];
|
||||
int wordvalue[NWORD];
|
||||
int wordtype[NWORD];
|
||||
int wordcount, wordnumber;
|
||||
extern char words[NWORD][WORDLEN];
|
||||
extern int wordvalue[NWORD];
|
||||
extern int wordtype[NWORD];
|
||||
extern int wordcount, wordnumber;
|
||||
|
||||
/* state of the game */
|
||||
int ourtime;
|
||||
int position;
|
||||
int direction;
|
||||
int left, right, ahead, back;
|
||||
int ourclock, fuel, torps;
|
||||
int carrying, encumber;
|
||||
int rythmn;
|
||||
extern int ourtime;
|
||||
extern int position;
|
||||
extern int direction;
|
||||
extern int left, right, ahead, back;
|
||||
extern int ourclock, fuel, torps;
|
||||
extern int carrying, encumber;
|
||||
extern int rythmn;
|
||||
extern int followfight;
|
||||
int ate;
|
||||
int snooze;
|
||||
int meetgirl;
|
||||
extern int ate;
|
||||
extern int snooze;
|
||||
extern int meetgirl;
|
||||
extern int followgod;
|
||||
int godready;
|
||||
extern int godready;
|
||||
extern int win;
|
||||
int wintime;
|
||||
int wiz;
|
||||
int tempwiz;
|
||||
int matchlight;
|
||||
extern int matchcount;
|
||||
int loved;
|
||||
int pleasure, power, ego;
|
||||
extern int wintime;
|
||||
extern int wiz;
|
||||
extern int tempwiz;
|
||||
extern int matchlight, matchcount;
|
||||
extern int loved;
|
||||
extern int pleasure, power, ego;
|
||||
extern int WEIGHT;
|
||||
extern int CUMBER;
|
||||
int notes[NUMOFNOTES];
|
||||
unsigned int inven[NUMOFWORDS];
|
||||
unsigned int wear[NUMOFWORDS];
|
||||
char beenthere[NUMOFROOMS + 1];
|
||||
char injuries[NUMOFINJURIES];
|
||||
extern int notes[NUMOFNOTES];
|
||||
extern unsigned int inven[NUMOFWORDS];
|
||||
extern unsigned int wear[NUMOFWORDS];
|
||||
extern char beenthere[NUMOFROOMS + 1];
|
||||
extern char injuries[NUMOFINJURIES];
|
||||
extern int verbose;
|
||||
|
||||
char username[9];
|
||||
extern const char *username;
|
||||
|
||||
struct wlist {
|
||||
const char *string;
|
||||
int value, article;
|
||||
struct wlist *next;
|
||||
};
|
||||
#define HASHSIZE 256
|
||||
#define HASHMUL 81
|
||||
#define HASHMASK (HASHSIZE - 1)
|
||||
struct wlist *hashtab[HASHSIZE];
|
||||
extern struct wlist wlist[];
|
||||
|
||||
struct objs {
|
||||
@@ -306,10 +332,8 @@ extern const struct objs nightobjs[];
|
||||
|
||||
#define DEFAULT_SAVE_FILE ".Bstar"
|
||||
|
||||
void blast __P((void));
|
||||
void bury __P((void));
|
||||
int card __P((const char *, int));
|
||||
int checkout __P((const char *));
|
||||
void chime __P((void));
|
||||
void convert __P((int));
|
||||
void crash __P((void));
|
||||
@@ -317,19 +341,18 @@ int cypher __P((void));
|
||||
void die __P((void)) __attribute__((__noreturn__));
|
||||
void diesig __P((int)) __attribute__((__noreturn__));
|
||||
void dig __P((void));
|
||||
void dooropen __P((void));
|
||||
int draw __P((void));
|
||||
void drink __P((void));
|
||||
int drive __P((void));
|
||||
int drop __P((const char *));
|
||||
int eat __P((void));
|
||||
void endfly __P((void));
|
||||
int fight __P((int, int));
|
||||
int follow __P((void));
|
||||
void getutmp __P((char *));
|
||||
char *getcom __P((char *, int, const char *, const char *));
|
||||
char *getword __P((char *, char *, int));
|
||||
int give __P((void));
|
||||
int hash __P((const char *));
|
||||
void initialize __P((const char *));
|
||||
void install __P((struct wlist *));
|
||||
int jump __P((void));
|
||||
void kiss __P((void));
|
||||
int land __P((void));
|
||||
@@ -337,40 +360,32 @@ int launch __P((void));
|
||||
void light __P((void));
|
||||
void live __P((void)) __attribute__((__noreturn__));
|
||||
void love __P((void));
|
||||
int move __P((int, int));
|
||||
void moveenemy __P((int));
|
||||
int moveplayer __P((int, int));
|
||||
void murder __P((void));
|
||||
void news __P((void));
|
||||
void newway __P((int));
|
||||
void notarget __P((void));
|
||||
void open_score_file __P((void));
|
||||
void parse __P((void));
|
||||
void post __P((char));
|
||||
void printobjs __P((void));
|
||||
int put __P((void));
|
||||
int puton __P((void));
|
||||
const char *rate __P((void));
|
||||
void ravage __P((void));
|
||||
void restore __P((const char *, size_t));
|
||||
void restore __P((const char *));
|
||||
int ride __P((void));
|
||||
void save __P((const char *, size_t));
|
||||
void screen __P((void));
|
||||
void save __P((const char *));
|
||||
char *save_file_name __P((const char *, size_t));
|
||||
int shoot __P((void));
|
||||
void succumb __P((int));
|
||||
int take __P((unsigned int[]));
|
||||
int takeoff __P((void));
|
||||
void target __P((void));
|
||||
int throw __P((const char *));
|
||||
const char *truedirec __P((int, char));
|
||||
int ucard __P((const unsigned int *));
|
||||
int use __P((void));
|
||||
int visual __P((void));
|
||||
int wearit __P((void));
|
||||
void whichway __P((struct room));
|
||||
int wizard __P((const char *));
|
||||
void wordinit __P((void));
|
||||
void writedes __P((void));
|
||||
int zzz __P((void));
|
||||
char *getcom __P((char *, int, const char *, const char *));
|
||||
char *getword __P((char *, char *, int));
|
||||
const char *rate __P((void));
|
||||
const char *truedirec __P((int, char));
|
||||
struct wlist *lookup __P((const char *));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fly.c,v 1.6 1997/10/11 02:07:20 lukem Exp $ */
|
||||
/* $NetBSD: fly.c,v 1.10 2001/12/04 13:00:24 blymn Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)fly.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: fly.c,v 1.6 1997/10/11 02:07:20 lukem Exp $");
|
||||
__RCSID("$NetBSD: fly.c,v 1.10 2001/12/04 13:00:24 blymn Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -46,20 +46,27 @@ __RCSID("$NetBSD: fly.c,v 1.6 1997/10/11 02:07:20 lukem Exp $");
|
||||
#undef UP
|
||||
#include <curses.h>
|
||||
|
||||
#define abs(a) ((a) < 0 ? -(a) : (a))
|
||||
#define MIDR (LINES/2 - 1)
|
||||
#define MIDC (COLS/2 - 1)
|
||||
|
||||
int row, column;
|
||||
int dr = 0, dc = 0;
|
||||
char destroyed;
|
||||
static int row, column;
|
||||
static int dr = 0, dc = 0;
|
||||
static char destroyed;
|
||||
int ourclock = 120; /* time for all the flights in the game */
|
||||
char cross = 0;
|
||||
sig_t oldsig;
|
||||
static char cross = 0;
|
||||
static sig_t oldsig;
|
||||
|
||||
void
|
||||
static void blast __P((void));
|
||||
static void endfly __P((void));
|
||||
static void moveenemy __P((int));
|
||||
static void notarget __P((void));
|
||||
static void screen __P((void));
|
||||
static void succumb __P((int));
|
||||
static void target __P((void));
|
||||
|
||||
static void
|
||||
succumb(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
if (oldsig == SIG_DFL) {
|
||||
endfly();
|
||||
@@ -80,7 +87,7 @@ visual()
|
||||
return (0);
|
||||
}
|
||||
oldsig = signal(SIGINT, succumb);
|
||||
crmode();
|
||||
cbreak();
|
||||
noecho();
|
||||
screen();
|
||||
row = rnd(LINES - 3) + 1;
|
||||
@@ -178,7 +185,7 @@ visual()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
screen()
|
||||
{
|
||||
int r, c, n;
|
||||
@@ -195,7 +202,7 @@ screen()
|
||||
refresh();
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
target()
|
||||
{
|
||||
int n;
|
||||
@@ -208,7 +215,7 @@ target()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
notarget()
|
||||
{
|
||||
int n;
|
||||
@@ -221,7 +228,7 @@ notarget()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
blast()
|
||||
{
|
||||
int n;
|
||||
@@ -243,9 +250,9 @@ blast()
|
||||
alarm(1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
moveenemy(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
double d;
|
||||
int oldr, oldc;
|
||||
@@ -283,7 +290,7 @@ moveenemy(dummy)
|
||||
alarm(1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
endfly()
|
||||
{
|
||||
alarm(0);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getcom.c,v 1.5 1997/10/11 02:07:21 lukem Exp $ */
|
||||
/* $NetBSD: getcom.c,v 1.10 2000/09/24 15:51:40 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: getcom.c,v 1.5 1997/10/11 02:07:21 lukem Exp $");
|
||||
__RCSID("$NetBSD: getcom.c,v 1.10 2000/09/24 15:51:40 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -53,6 +53,8 @@ getcom(buf, size, prompt, error)
|
||||
for (;;) {
|
||||
fputs(prompt, stdout);
|
||||
if (fgets(buf, size, stdin) == 0) {
|
||||
if (feof(stdin))
|
||||
die();
|
||||
clearerr(stdin);
|
||||
continue;
|
||||
}
|
||||
@@ -63,6 +65,12 @@ getcom(buf, size, prompt, error)
|
||||
if (error)
|
||||
puts(error);
|
||||
}
|
||||
/* If we didn't get to the end of the line, don't read it in next time. */
|
||||
if (buf[strlen(buf) - 1] != '\n') {
|
||||
int i;
|
||||
while ((i = getchar()) != '\n' && i != EOF)
|
||||
continue;
|
||||
}
|
||||
return (buf);
|
||||
}
|
||||
|
||||
@@ -76,6 +84,9 @@ getword(buf1, buf2, flag)
|
||||
char *buf1, *buf2;
|
||||
int flag;
|
||||
{
|
||||
int cnt;
|
||||
|
||||
cnt = 1;
|
||||
while (isspace(*buf1))
|
||||
buf1++;
|
||||
if (*buf1 != ',') {
|
||||
@@ -83,24 +94,34 @@ getword(buf1, buf2, flag)
|
||||
*buf2 = 0;
|
||||
return (0);
|
||||
}
|
||||
while (*buf1 && !isspace(*buf1) && *buf1 != ',')
|
||||
if (flag < 0)
|
||||
if (isupper(*buf1))
|
||||
while (cnt < WORDLEN && *buf1 && !isspace(*buf1) && *buf1 != ',')
|
||||
if (flag < 0) {
|
||||
if (isupper(*buf1)) {
|
||||
*buf2++ = tolower(*buf1++);
|
||||
else
|
||||
cnt++;
|
||||
} else {
|
||||
*buf2++ = *buf1++;
|
||||
else
|
||||
if (flag > 0)
|
||||
if (islower(*buf1))
|
||||
*buf2++ = toupper(*buf1++);
|
||||
else
|
||||
*buf2++ = *buf1++;
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
} else if (flag > 0) {
|
||||
if (islower(*buf1)) {
|
||||
*buf2++ = toupper(*buf1++);
|
||||
cnt++;
|
||||
} else {
|
||||
*buf2++ = *buf1++;
|
||||
cnt++;
|
||||
}
|
||||
} else {
|
||||
*buf2++ = *buf1++;
|
||||
cnt++;
|
||||
}
|
||||
if (cnt == WORDLEN)
|
||||
while (*buf1 && !isspace(*buf1))
|
||||
buf1++;
|
||||
} else
|
||||
*buf2++ = *buf1++;
|
||||
*buf2 = 0;
|
||||
*buf2 = '\0';
|
||||
while (isspace(*buf1))
|
||||
buf1++;
|
||||
return (*buf1 ? buf1 : 0);
|
||||
return (*buf1 ? buf1 : NULL);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: globals.c,v 1.6 1997/10/11 02:07:23 lukem Exp $ */
|
||||
/* $NetBSD: globals.c,v 1.18 2000/09/25 14:45:01 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)globals.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: globals.c,v 1.6 1997/10/11 02:07:23 lukem Exp $");
|
||||
__RCSID("$NetBSD: globals.c,v 1.18 2000/09/25 14:45:01 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -48,11 +48,11 @@ int WEIGHT = MAXWEIGHT;
|
||||
int CUMBER = MAXCUMBER;
|
||||
|
||||
const char *const objdes[NUMOFOBJECTS] = {
|
||||
"There is a knife here",
|
||||
"There is an exquisitely crafted sword and scabbard here.",
|
||||
0, /* can land from here */
|
||||
"There is a knife here.",
|
||||
"There are an exquisitely crafted sword and scabbard here.",
|
||||
NULL, /* Can land from here. */
|
||||
"There is a fierce woodsman here brandishing a heavy mallet.",
|
||||
"There is an unweildly two-handed sword here.",
|
||||
"There is an unwieldy two-handed sword here.",
|
||||
"There is a bloody meat cleaver here.",
|
||||
"A rusty broadsword is lying here.",
|
||||
"There is an ancient coat of finely woven mail here.",
|
||||
@@ -62,7 +62,7 @@ const char *const objdes[NUMOFOBJECTS] = {
|
||||
"There is a Viper ready for launch here.",
|
||||
"A kerosene lantern is burning luridly here.",
|
||||
"An old pair of shoes has been discarded here.",
|
||||
0, /* cylon */
|
||||
NULL, /* Cylon. */
|
||||
"There is a pair of pajamas here.",
|
||||
"A kingly robe of royal purple and spun gold is draped here.",
|
||||
"There is a strange golden amulet on the floor here.",
|
||||
@@ -73,14 +73,14 @@ const char *const objdes[NUMOFOBJECTS] = {
|
||||
"There is a laser pistol here.",
|
||||
"A flower-like young goddess is bathing in the hot mineral pools. She is \nwatching you, but continues to steep and sing softly.",
|
||||
"The goddess is reclining on a bed of ferns and studying you intently.",
|
||||
"There is a grenade here",
|
||||
"There is a grenade here.",
|
||||
"There is a length of heavy chain here.",
|
||||
"There is a stout rope here.",
|
||||
"There is a pair of Levi's here.",
|
||||
"A bloody mace is lying on the ground here.",
|
||||
"There is a shovel here.",
|
||||
"A long, sharp halberd is propped up here.",
|
||||
"There is a compass here",
|
||||
"There is a compass here.",
|
||||
"Wreckage and smoldering debris from a crash litter the ground here.",
|
||||
"A woodland Elf armed with a shield and deadly halberd lunges toward you!",
|
||||
"I think I hear footsteps behind us.",
|
||||
@@ -96,15 +96,15 @@ const char *const objdes[NUMOFOBJECTS] = {
|
||||
"There is a colorful pink potion in a small crystal vial here.",
|
||||
"A gold bracelet is on the ground here.",
|
||||
"A swarthy woman with stern features pulls you aside from the crowd,\n'I must talk to you -- but not here. Meet me at midnight in the gardens.'",
|
||||
"The swarthy woman has been awaiting you anxiousy. 'I must warn you that the\nIsland has anticipated your Quest. You will not be welcomed. The Darkness is\nstrong where you must search. Seek not the shadows save only at night, for\nthen are they the weakest. In the mountains far from here a canyon winds\nwith ferns and streams and forgotten vines. There you must go. Take this\nrope.'",
|
||||
"The swarthy woman has been awaiting you anxiously. 'I must warn you that the\nIsland has anticipated your Quest. You will not be welcomed. The Darkness is\nstrong where you must search. Seek not the shadows save only at night, for\nthen are they the weakest. In the mountains far from here a canyon winds\nwith ferns and streams and forgotten vines. There you must go. Take this\nrope.'",
|
||||
"Out from the shadows a figure leaps! His black cape swirls around, and he\nholds a laser sword at your chest. 'So, you have come to fulfill the Quest.\nHa! Your weapons are no match for me!'",
|
||||
"An old timer with one eye missing and no money for a drink sits at the bar.",
|
||||
"An old-timer with one eye missing and no money for a drink sits at the bar.",
|
||||
"You are flying through an asteroid field!",
|
||||
"A planet is nearby.",
|
||||
"The ground is charred here.",
|
||||
"There is a thermonuclear warhead here.",
|
||||
"The fragile, beautiful young goddess lies here. You murdered her horribly.",
|
||||
"The old timer is lying here. He is dead.",
|
||||
"The old-timer is lying here. He is dead.",
|
||||
"The native girl's body is lying here.",
|
||||
"A native girl is sitting here.",
|
||||
"A gorgeous white stallion is standing here.",
|
||||
@@ -118,7 +118,7 @@ const char *const objdes[NUMOFOBJECTS] = {
|
||||
const char *const objsht[NUMOFOBJECTS] = {
|
||||
"knife",
|
||||
"fine sword",
|
||||
0,
|
||||
NULL, /* Can land from here. */
|
||||
"Woodsman",
|
||||
"two-handed sword",
|
||||
"meat cleaver",
|
||||
@@ -130,7 +130,7 @@ const char *const objsht[NUMOFOBJECTS] = {
|
||||
"viper",
|
||||
"lantern",
|
||||
"shoes",
|
||||
0,
|
||||
NULL, /* Cylon. */
|
||||
"pajamas",
|
||||
"robe",
|
||||
"amulet",
|
||||
@@ -139,8 +139,8 @@ const char *const objsht[NUMOFOBJECTS] = {
|
||||
"woodsman's body",
|
||||
"wooden mallet",
|
||||
"laser",
|
||||
0,
|
||||
0,
|
||||
NULL, /* Bathing goddess. */
|
||||
NULL, /* Goddess. */
|
||||
"grenade",
|
||||
"chain",
|
||||
"rope",
|
||||
@@ -149,12 +149,12 @@ const char *const objsht[NUMOFOBJECTS] = {
|
||||
"shovel",
|
||||
"halberd",
|
||||
"compass",
|
||||
0,
|
||||
NULL, /* Crash debris. */
|
||||
"Elf",
|
||||
0,
|
||||
NULL, /* Footsteps. */
|
||||
"coins",
|
||||
"match book",
|
||||
0,
|
||||
NULL, /* Man and dwarf. */
|
||||
"papayas",
|
||||
"pineapple",
|
||||
"kiwi",
|
||||
@@ -163,18 +163,18 @@ const char *const objsht[NUMOFOBJECTS] = {
|
||||
"ring",
|
||||
"potion",
|
||||
"bracelet",
|
||||
0,
|
||||
0,
|
||||
NULL, /* Swarthy woman. */
|
||||
NULL, /* Swarthy woman (with message). */
|
||||
"Dark Lord",
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL, /* Old-timer. */
|
||||
NULL, /* Asteroid field. */
|
||||
NULL, /* Planet nearby. */
|
||||
NULL, /* Charred ground. */
|
||||
"warhead",
|
||||
"goddess's body",
|
||||
"old timer's body",
|
||||
"old-timer's body",
|
||||
"girl's body",
|
||||
0,
|
||||
NULL, /* Native girl. */
|
||||
"stallion",
|
||||
"car",
|
||||
"pot of jewels",
|
||||
@@ -220,7 +220,61 @@ const int objcumber[NUMOFOBJECTS] = {
|
||||
10, 8, 8, 10, 10, 3, 1, 2
|
||||
};
|
||||
|
||||
const int objflags[NUMOFOBJECTS] = {
|
||||
0, 0, OBJ_NONOBJ, OBJ_PERSON,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, OBJ_PLURAL, OBJ_NONOBJ, OBJ_PLURAL,
|
||||
0, OBJ_AN, 0, 0,
|
||||
0, 0, 0, OBJ_PERSON,
|
||||
OBJ_PERSON, 0, 0, 0,
|
||||
OBJ_PLURAL, 0, 0, 0,
|
||||
0, 0, OBJ_AN|OBJ_PERSON, OBJ_NONOBJ,
|
||||
OBJ_PLURAL, 0, OBJ_PERSON, OBJ_PLURAL,
|
||||
0, 0, OBJ_PLURAL, 0,
|
||||
0, 0, 0, OBJ_PERSON,
|
||||
OBJ_PERSON, OBJ_PERSON, OBJ_PERSON, OBJ_NONOBJ,
|
||||
OBJ_NONOBJ, OBJ_NONOBJ, 0, 0,
|
||||
OBJ_AN, 0, OBJ_PERSON, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
int win = 1;
|
||||
int matchcount = 20;
|
||||
int followgod = -1;
|
||||
int followfight = -1;
|
||||
|
||||
struct room *location;
|
||||
|
||||
/* current input line */
|
||||
char words[NWORD][WORDLEN];
|
||||
int wordvalue[NWORD];
|
||||
int wordtype[NWORD];
|
||||
int wordcount, wordnumber;
|
||||
|
||||
/* state of the game */
|
||||
int ourtime;
|
||||
int position;
|
||||
int direction;
|
||||
int left, right, ahead, back;
|
||||
int fuel, torps;
|
||||
int carrying, encumber;
|
||||
int rythmn;
|
||||
int ate;
|
||||
int snooze;
|
||||
int meetgirl;
|
||||
int godready;
|
||||
int wintime;
|
||||
int wiz;
|
||||
int tempwiz;
|
||||
int matchlight;
|
||||
int loved;
|
||||
int pleasure, power, ego;
|
||||
int notes[NUMOFNOTES];
|
||||
unsigned int inven[NUMOFWORDS];
|
||||
unsigned int wear[NUMOFWORDS];
|
||||
char beenthere[NUMOFROOMS + 1];
|
||||
char injuries[NUMOFINJURIES];
|
||||
int verbose = 0;
|
||||
|
||||
const char *username;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: init.c,v 1.7 1997/10/11 02:07:25 lukem Exp $ */
|
||||
/* $NetBSD: init.c,v 1.12 2000/09/09 09:37:58 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,26 +38,31 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)init.c 8.4 (Berkeley) 4/30/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: init.c,v 1.7 1997/10/11 02:07:25 lukem Exp $");
|
||||
__RCSID("$NetBSD: init.c,v 1.12 2000/09/09 09:37:58 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
static int checkout __P((const char *));
|
||||
static const char *getutmp __P((void));
|
||||
static int wizard __P((const char *));
|
||||
|
||||
void
|
||||
initialize(startup)
|
||||
const char *startup;
|
||||
initialize(filename)
|
||||
const char *filename;
|
||||
{
|
||||
const struct objs *p;
|
||||
char *savefile;
|
||||
|
||||
puts("Version 4.2, fall 1984.");
|
||||
puts("First Adventure game written by His Lordship, the honorable");
|
||||
puts("Admiral D.W. Riggle\n");
|
||||
location = dayfile;
|
||||
srand(getpid());
|
||||
getutmp(username);
|
||||
username = getutmp();
|
||||
wordinit();
|
||||
if (startup == NULL) {
|
||||
if (filename == NULL) {
|
||||
direction = NORTH;
|
||||
ourtime = 0;
|
||||
snooze = CYCLE * 1.5;
|
||||
@@ -67,23 +72,29 @@ initialize(startup)
|
||||
torps = TORPEDOES;
|
||||
for (p = dayobjs; p->room != 0; p++)
|
||||
setbit(location[p->room].objects, p->obj);
|
||||
} else
|
||||
restore(startup, strlen(startup));
|
||||
} else {
|
||||
savefile = save_file_name(filename, strlen(filename));
|
||||
restore(savefile);
|
||||
free(savefile);
|
||||
}
|
||||
wiz = wizard(username);
|
||||
signal(SIGINT, diesig);
|
||||
}
|
||||
|
||||
void
|
||||
getutmp(uname)
|
||||
char *uname;
|
||||
static const char *
|
||||
getutmp()
|
||||
{
|
||||
struct passwd *ptr;
|
||||
|
||||
ptr = getpwuid(getuid());
|
||||
strncpy(uname, ptr ? ptr->pw_name : "", 8);
|
||||
if (ptr == NULL)
|
||||
return "";
|
||||
else
|
||||
return strdup(ptr->pw_name);
|
||||
}
|
||||
|
||||
const char *const list[] = { /* hereditary wizards */
|
||||
/* Hereditary wizards. A configuration file might make more sense. */
|
||||
static const char *const list[] = {
|
||||
"riggle",
|
||||
"chris",
|
||||
"edward",
|
||||
@@ -94,14 +105,14 @@ const char *const list[] = { /* hereditary wizards */
|
||||
0
|
||||
};
|
||||
|
||||
const char *const badguys[] = {
|
||||
static const char *const badguys[] = {
|
||||
"wnj",
|
||||
"root",
|
||||
"ted",
|
||||
0
|
||||
};
|
||||
|
||||
int
|
||||
static int
|
||||
wizard(uname)
|
||||
const char *uname;
|
||||
{
|
||||
@@ -112,7 +123,7 @@ wizard(uname)
|
||||
return flag;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
checkout(uname)
|
||||
const char *uname;
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: misc.c,v 1.6 1997/10/11 02:07:27 lukem Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: misc.c,v 1.6 1997/10/11 02:07:27 lukem Exp $");
|
||||
__RCSID("$NetBSD: misc.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nightobjs.c,v 1.6 1997/10/11 02:07:31 lukem Exp $ */
|
||||
/* $NetBSD: nightobjs.c,v 1.8 1999/09/18 16:42:29 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)nightobjs.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: nightobjs.c,v 1.6 1997/10/11 02:07:31 lukem Exp $");
|
||||
__RCSID("$NetBSD: nightobjs.c,v 1.8 1999/09/18 16:42:29 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.c,v 1.6 1997/10/11 02:07:33 lukem Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.12 2001/06/19 13:42:09 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,12 +38,22 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: parse.c,v 1.6 1997/10/11 02:07:33 lukem Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.12 2001/06/19 13:42:09 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
#define HASHSIZE 256
|
||||
#define HASHMUL 81
|
||||
#define HASHMASK (HASHSIZE - 1)
|
||||
|
||||
static int hash __P((const char *));
|
||||
static void install __P((struct wlist *));
|
||||
static struct wlist *lookup __P((const char *));
|
||||
|
||||
static struct wlist *hashtab[HASHSIZE];
|
||||
|
||||
void
|
||||
wordinit()
|
||||
{
|
||||
@@ -53,7 +63,7 @@ wordinit()
|
||||
install(w);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
hash(s)
|
||||
const char *s;
|
||||
{
|
||||
@@ -67,7 +77,7 @@ hash(s)
|
||||
return hashval;
|
||||
}
|
||||
|
||||
struct wlist *
|
||||
static struct wlist *
|
||||
lookup(s)
|
||||
const char *s;
|
||||
{
|
||||
@@ -79,7 +89,7 @@ lookup(s)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
install(wp)
|
||||
struct wlist *wp;
|
||||
{
|
||||
@@ -98,6 +108,7 @@ parse()
|
||||
{
|
||||
struct wlist *wp;
|
||||
int n;
|
||||
int flag;
|
||||
|
||||
wordnumber = 0; /* for cypher */
|
||||
for (n = 0; n <= wordcount; n++) {
|
||||
@@ -109,4 +120,72 @@ parse()
|
||||
wordtype[n] = wp->article;
|
||||
}
|
||||
}
|
||||
/* We never use adjectives for anything, so yank them all. */
|
||||
for (n = 1; n < wordcount; n++)
|
||||
if (wordtype[n] == ADJS) {
|
||||
int i;
|
||||
for (i = n + 1; i < wordcount; i++) {
|
||||
wordtype[i - 1] = wordtype[i];
|
||||
wordvalue[i - 1] = wordvalue[i];
|
||||
strcpy(words[i - 1], words[i]);
|
||||
}
|
||||
wordcount--;
|
||||
}
|
||||
/* Don't let a comma mean AND if followed by a verb. */
|
||||
for (n = 0; n < wordcount; n++)
|
||||
if (wordvalue[n] == AND && words[n][0] == ','
|
||||
&& wordtype[n + 1] == VERB) {
|
||||
wordvalue[n] = -1;
|
||||
wordtype[n] = -1;
|
||||
}
|
||||
/* Trim "AND AND" which can happen naturally at the end of a
|
||||
* comma-delimited list.
|
||||
*/
|
||||
for (n = 1; n < wordcount; n++)
|
||||
if (wordvalue[n - 1] == AND && wordvalue[n] == AND) {
|
||||
int i;
|
||||
for (i = n + 1; i < wordcount; i++) {
|
||||
wordtype[i - 1] = wordtype[i];
|
||||
wordvalue[i - 1] = wordvalue[i];
|
||||
strcpy(words[i - 1], words[i]);
|
||||
}
|
||||
wordcount--;
|
||||
}
|
||||
|
||||
/* If there is a sequence (NOUN | OBJECT) AND EVERYTHING
|
||||
* then move all the EVERYTHINGs to the beginning, since that's where
|
||||
* they're expected. We can't get rid of the NOUNs and OBJECTs in
|
||||
* case they aren't in EVERYTHING (i.e. not here or nonexistent).
|
||||
*/
|
||||
flag = 1;
|
||||
while (flag) {
|
||||
flag = 0;
|
||||
for (n = 1; n < wordcount; n++)
|
||||
if ((wordtype[n - 1] == NOUNS || wordtype[n - 1] == OBJECT) &&
|
||||
wordvalue[n] == AND && wordvalue[n + 1] == EVERYTHING) {
|
||||
char tmpword[WORDLEN];
|
||||
wordvalue[n + 1] = wordvalue[n - 1];
|
||||
wordvalue[n - 1] = EVERYTHING;
|
||||
wordtype[n + 1] = wordtype[n - 1];
|
||||
wordtype[n - 1] = OBJECT;
|
||||
strcpy(tmpword, words[n - 1]);
|
||||
strcpy(words[n - 1], words[n + 1]);
|
||||
strcpy(words[n + 1], tmpword);
|
||||
flag = 1;
|
||||
}
|
||||
/* And trim EVERYTHING AND EVERYTHING. */
|
||||
for (n = 1; n < wordcount; n++)
|
||||
if (wordvalue[n - 1] == EVERYTHING &&
|
||||
wordvalue[n] == AND && wordvalue[n + 1] == EVERYTHING) {
|
||||
int i;
|
||||
for (i = n + 1; i < wordcount; i++) {
|
||||
wordtype[i - 1] = wordtype[i + 1];
|
||||
wordvalue[i - 1] = wordvalue[i + 1];
|
||||
strcpy(words[i - 1], words[i + 1]);
|
||||
}
|
||||
wordcount--;
|
||||
wordcount--;
|
||||
flag = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: room.c,v 1.6 1997/10/11 02:07:35 lukem Exp $ */
|
||||
/* $NetBSD: room.c,v 1.10 2000/09/17 23:03:43 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)room.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: room.c,v 1.6 1997/10/11 02:07:35 lukem Exp $");
|
||||
__RCSID("$NetBSD: room.c,v 1.10 2000/09/17 23:03:43 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -52,12 +52,15 @@ writedes()
|
||||
int c;
|
||||
|
||||
printf("\n\t%s\n", location[position].name);
|
||||
if (beenthere[position] < 3) {
|
||||
if (beenthere[position] < ROOMDESC || verbose) {
|
||||
compass = NORTH;
|
||||
for (p = location[position].desc; (c = *p++) != 0;)
|
||||
if (c != '-' && c != '*' && c != '+')
|
||||
putchar(c);
|
||||
else {
|
||||
if (c != '-' && c != '*' && c != '+') {
|
||||
if (c == '=')
|
||||
putchar('-');
|
||||
else
|
||||
putchar(c);
|
||||
} else {
|
||||
if (c != '*')
|
||||
printf(truedirec(compass, c));
|
||||
compass++;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: save.c,v 1.8 1998/09/13 15:24:41 hubertf Exp $ */
|
||||
/* $NetBSD: save.c,v 1.10 2000/01/09 17:17:20 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,51 +38,24 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)save.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: save.c,v 1.8 1998/09/13 15:24:41 hubertf Exp $");
|
||||
__RCSID("$NetBSD: save.c,v 1.10 2000/01/09 17:17:20 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
void
|
||||
restore(filename, len)
|
||||
restore(filename)
|
||||
const char *filename;
|
||||
size_t len;
|
||||
{
|
||||
char *home;
|
||||
char *home1;
|
||||
int n;
|
||||
int tmp;
|
||||
size_t tmpl;
|
||||
FILE *fp;
|
||||
|
||||
if (memchr(filename, '/', len)) {
|
||||
home1 = malloc(len + 1);
|
||||
if (home1 == NULL)
|
||||
errx(1, "out of memory");
|
||||
memcpy(home1, filename, len);
|
||||
home1[len] = 0;
|
||||
} else {
|
||||
home = getenv("HOME");
|
||||
if (home != NULL) {
|
||||
tmpl = strlen(home);
|
||||
home1 = malloc(tmpl + len + 2);
|
||||
if (home1 == NULL)
|
||||
errx(1, "out of memory");
|
||||
memcpy(home1, home, tmpl);
|
||||
home1[tmpl] = '/';
|
||||
memcpy(home1 + tmpl + 1, filename, len);
|
||||
home1[tmpl + len + 1] = 0;
|
||||
} else {
|
||||
home1 = malloc(len + 1);
|
||||
if (home1 == NULL)
|
||||
errx(1, "out of memory");
|
||||
memcpy(home1, filename, len);
|
||||
home1[len] = 0;
|
||||
}
|
||||
}
|
||||
if ((fp = fopen(home1, "r")) == 0) {
|
||||
err(1, "fopen %s", home1);
|
||||
if (filename == NULL)
|
||||
exit(1); /* Error determining save file name. */
|
||||
if ((fp = fopen(filename, "r")) == 0) {
|
||||
err(1, "fopen %s", filename);
|
||||
}
|
||||
fread(&WEIGHT, sizeof WEIGHT, 1, fp);
|
||||
fread(&CUMBER, sizeof CUMBER, 1, fp);
|
||||
@@ -120,54 +93,25 @@ restore(filename, len)
|
||||
fread(&power, sizeof power, 1, fp);
|
||||
/* We must check the last read, to catch truncated save files */
|
||||
if (fread(&ego, sizeof ego, 1, fp) < 1)
|
||||
errx(1, "save file %s too short", home1);
|
||||
errx(1, "save file %s too short", filename);
|
||||
fclose(fp);
|
||||
free(home1);
|
||||
}
|
||||
|
||||
void
|
||||
save(filename, len)
|
||||
save(filename)
|
||||
const char *filename;
|
||||
size_t len;
|
||||
{
|
||||
char *home;
|
||||
char *home1;
|
||||
int n;
|
||||
int tmp;
|
||||
size_t tmpl;
|
||||
FILE *fp;
|
||||
|
||||
if (memchr(filename, '/', len)) {
|
||||
home1 = malloc(len + 1);
|
||||
if (home1 == NULL)
|
||||
errx(1, "out of memory");
|
||||
memcpy(home1, filename, len);
|
||||
home1[len] = 0;
|
||||
} else {
|
||||
home = getenv("HOME");
|
||||
if (home != NULL) {
|
||||
tmpl = strlen(home);
|
||||
home1 = malloc(tmpl + len + 2);
|
||||
if (home1 == NULL)
|
||||
errx(1, "out of memory");
|
||||
memcpy(home1, home, tmpl);
|
||||
home1[tmpl] = '/';
|
||||
memcpy(home1 + tmpl + 1, filename, len);
|
||||
home1[tmpl + len + 1] = 0;
|
||||
} else {
|
||||
home1 = malloc(len + 1);
|
||||
if (home1 == NULL)
|
||||
errx(1, "out of memory");
|
||||
memcpy(home1, filename, len);
|
||||
home1[len] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ((fp = fopen(home1, "w")) == NULL) {
|
||||
warn("fopen %s", home1);
|
||||
if (filename == NULL)
|
||||
return; /* Error determining save file name. */
|
||||
if ((fp = fopen(filename, "w")) == NULL) {
|
||||
warn("fopen %s", filename);
|
||||
return;
|
||||
}
|
||||
printf("Saved in %s.\n", home1);
|
||||
printf("Saved in %s.\n", filename);
|
||||
fwrite(&WEIGHT, sizeof WEIGHT, 1, fp);
|
||||
fwrite(&CUMBER, sizeof CUMBER, 1, fp);
|
||||
fwrite(&ourclock, sizeof ourclock, 1, fp);
|
||||
@@ -205,7 +149,55 @@ save(filename, len)
|
||||
fwrite(&ego, sizeof ego, 1, fp);
|
||||
fflush(fp);
|
||||
if (ferror(fp))
|
||||
warn("fwrite %s", home1);
|
||||
warn("fwrite %s", filename);
|
||||
fclose(fp);
|
||||
free(home1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a save file name (possibly from fgetln, so without terminating NUL),
|
||||
* determine the name of the file to be saved to by adding the HOME
|
||||
* directory if the name does not contain a slash. Name will be allocated
|
||||
* with malloc(3).
|
||||
*/
|
||||
char *
|
||||
save_file_name(filename, len)
|
||||
const char *filename;
|
||||
size_t len;
|
||||
{
|
||||
char *home;
|
||||
char *newname;
|
||||
size_t tmpl;
|
||||
|
||||
if (memchr(filename, '/', len)) {
|
||||
newname = malloc(len + 1);
|
||||
if (newname == NULL) {
|
||||
warn(NULL);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(newname, filename, len);
|
||||
newname[len] = 0;
|
||||
} else {
|
||||
home = getenv("HOME");
|
||||
if (home != NULL) {
|
||||
tmpl = strlen(home);
|
||||
newname = malloc(tmpl + len + 2);
|
||||
if (newname == NULL) {
|
||||
warn(NULL);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(newname, home, tmpl);
|
||||
newname[tmpl] = '/';
|
||||
memcpy(newname + tmpl + 1, filename, len);
|
||||
newname[tmpl + len + 1] = 0;
|
||||
} else {
|
||||
newname = malloc(len + 1);
|
||||
if (newname == NULL) {
|
||||
warn(NULL);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(newname, filename, len);
|
||||
newname[len] = 0;
|
||||
}
|
||||
}
|
||||
return newname;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: words.c,v 1.6 1997/10/11 02:07:39 lukem Exp $ */
|
||||
/* $NetBSD: words.c,v 1.10 2000/09/25 19:37:59 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,176 +38,183 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)words.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: words.c,v 1.6 1997/10/11 02:07:39 lukem Exp $");
|
||||
__RCSID("$NetBSD: words.c,v 1.10 2000/09/25 19:37:59 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
struct wlist wlist[] = {
|
||||
{"knife", KNIFE, OBJECT},
|
||||
{"sword", SWORD, NOUNS},
|
||||
{"scabbard", SWORD, OBJECT},
|
||||
{"fine", SWORD, OBJECT},
|
||||
{"two-handed", TWO_HANDED, OBJECT},
|
||||
{"cleaver", CLEAVER, OBJECT},
|
||||
{"broadsword", BROAD, OBJECT},
|
||||
{"mail", MAIL, OBJECT},
|
||||
{"coat", MAIL, OBJECT},
|
||||
{"helmet", HELM, OBJECT},
|
||||
{"shield", SHIELD, OBJECT},
|
||||
{"maid", MAID, OBJECT},
|
||||
{"maid's", MAID, OBJECT},
|
||||
{"body", BODY, NOUNS},
|
||||
{"viper", VIPER, OBJECT},
|
||||
{"lamp", LAMPON, OBJECT},
|
||||
{"lantern", LAMPON, OBJECT},
|
||||
{"shoes", SHOES, OBJECT},
|
||||
{"pajamas", PAJAMAS, OBJECT},
|
||||
{"robe", ROBE, OBJECT},
|
||||
{"amulet", AMULET, NOUNS},
|
||||
{"medallion", MEDALION, NOUNS},
|
||||
{"talisman", TALISMAN, NOUNS},
|
||||
{"woodsman", DEADWOOD, OBJECT},
|
||||
{"woodsman's", DEADWOOD, OBJECT},
|
||||
{"mallet", MALLET, OBJECT},
|
||||
{"laser", LASER, OBJECT},
|
||||
{"pistol", LASER, OBJECT},
|
||||
{"blaster", LASER, OBJECT},
|
||||
{"gun", LASER, OBJECT},
|
||||
{"goddess", NORMGOD, NOUNS},
|
||||
{"grenade", GRENADE, OBJECT},
|
||||
{"chain", CHAIN, OBJECT},
|
||||
{"rope", ROPE, OBJECT},
|
||||
{"levis", LEVIS, OBJECT},
|
||||
{"pants", LEVIS, OBJECT},
|
||||
{"mace", MACE, OBJECT},
|
||||
{"shovel", SHOVEL, OBJECT},
|
||||
{"halberd", HALBERD, OBJECT},
|
||||
{"compass", COMPASS, OBJECT},
|
||||
{"elf", ELF, OBJECT},
|
||||
{"coins", COINS, OBJECT},
|
||||
{"matches", MATCHES, OBJECT},
|
||||
{"match", MATCHES, OBJECT},
|
||||
{"book", MATCHES, OBJECT},
|
||||
{"man", MAN, NOUNS},
|
||||
{"papayas", PAPAYAS, OBJECT},
|
||||
{"pineapple", PINEAPPLE, OBJECT},
|
||||
{"kiwi", KIWI, OBJECT},
|
||||
{"coconuts", COCONUTS, OBJECT},
|
||||
{"mango", MANGO, OBJECT},
|
||||
{"ring", RING, OBJECT},
|
||||
{"potion", POTION, OBJECT},
|
||||
{"bracelet", BRACELET, OBJECT},
|
||||
{"timer", TIMER, NOUNS},
|
||||
{"bomb", BOMB, OBJECT},
|
||||
{"warhead", BOMB, OBJECT},
|
||||
{"girl", NATIVE, NOUNS},
|
||||
{"native", NATIVE, NOUNS},
|
||||
{"horse", HORSE, OBJECT},
|
||||
{"stallion", HORSE, OBJECT},
|
||||
{"car", CAR, OBJECT},
|
||||
{"volare", CAR, OBJECT},
|
||||
{"pot", POT, OBJECT},
|
||||
{"jewels", POT, OBJECT},
|
||||
{"bar", BAR, OBJECT},
|
||||
{"diamond", BLOCK, OBJECT},
|
||||
{"block", BLOCK, OBJECT},
|
||||
{"up", UP, VERB},
|
||||
{"u", UP, VERB},
|
||||
{"down", DOWN, VERB},
|
||||
{"d", DOWN, VERB},
|
||||
{"ahead", AHEAD, VERB},
|
||||
{"a", AHEAD, VERB},
|
||||
{"back", BACK, VERB},
|
||||
{"b", BACK, VERB},
|
||||
{"right", RIGHT, VERB},
|
||||
{"r", RIGHT, VERB},
|
||||
{"left", LEFT, VERB},
|
||||
{"l", LEFT, VERB},
|
||||
{"take", TAKE, VERB},
|
||||
{"get", TAKE, VERB},
|
||||
{"use", USE, VERB},
|
||||
{"look", LOOK, VERB},
|
||||
{"lo", LOOK, VERB},
|
||||
{"quit", QUIT, VERB},
|
||||
{"q", QUIT, VERB},
|
||||
{"su", SU, VERB},
|
||||
{"drop", DROP, VERB},
|
||||
{"draw", DRAW, VERB},
|
||||
{"pull", DRAW, VERB},
|
||||
{"carry", DRAW, VERB},
|
||||
{"wear", WEARIT, VERB},
|
||||
{"sheathe", WEARIT, VERB},
|
||||
{"put", PUT, VERB},
|
||||
{"buckle", PUT, VERB},
|
||||
{"strap", PUT, VERB},
|
||||
{"tie", PUT, VERB},
|
||||
{"inven", INVEN, VERB},
|
||||
{"i", INVEN, VERB},
|
||||
{"everything", EVERYTHING, OBJECT},
|
||||
{"all", EVERYTHING, OBJECT},
|
||||
{"and", AND, CONJ},
|
||||
{"kill", KILL, VERB},
|
||||
{"fight", KILL, VERB},
|
||||
{"ravage", RAVAGE, VERB},
|
||||
{"rape", RAVAGE, VERB},
|
||||
{"undress", UNDRESS, VERB},
|
||||
{"throw", THROW, VERB},
|
||||
{"launch", LAUNCH, VERB},
|
||||
{"land", LANDIT, VERB},
|
||||
{"light", LIGHT, VERB},
|
||||
{"strike", LIGHT, VERB},
|
||||
{"follow", FOLLOW, VERB},
|
||||
{"chase", FOLLOW, VERB},
|
||||
{"kiss", KISS, VERB},
|
||||
{"love", LOVE, VERB},
|
||||
{"fuck", LOVE, VERB},
|
||||
{"give", GIVE, VERB},
|
||||
{"smite", SMITE, VERB},
|
||||
{"attack", SMITE, VERB},
|
||||
{"swing", SMITE, VERB},
|
||||
{"stab", SMITE, VERB},
|
||||
{"slice", SMITE, VERB},
|
||||
{"cut", SMITE, VERB},
|
||||
{"hack", SMITE, VERB},
|
||||
{"shoot", SHOOT, VERB},
|
||||
{"blast", SHOOT, VERB},
|
||||
{"on", ON, PREPS},
|
||||
{"off", OFF, PREPS},
|
||||
{"time", TIME, VERB},
|
||||
{"sleep", SLEEP, VERB},
|
||||
{"dig", DIG, VERB},
|
||||
{"eat", EAT, VERB},
|
||||
{"swim", SWIM, VERB},
|
||||
{"drink", DRINK, VERB},
|
||||
{"door", DOOR, NOUNS},
|
||||
{"save", SAVE, VERB},
|
||||
{"ride", RIDE, VERB},
|
||||
{"mount", RIDE, VERB},
|
||||
{"drive", DRIVE, VERB},
|
||||
{"start", DRIVE, VERB},
|
||||
{"score", SCORE, VERB},
|
||||
{"points", SCORE, VERB},
|
||||
{"bury", BURY, VERB},
|
||||
{"jump", JUMP, VERB},
|
||||
{"kick", KICK, VERB},
|
||||
{"kerosene", 0, ADJS},
|
||||
{"plumed", 0, ADJS},
|
||||
{"ancient", 0, ADJS},
|
||||
{"golden", 0, ADJS},
|
||||
{"gold", 0, ADJS},
|
||||
{"ostrich", 0, ADJS},
|
||||
{"rusty", 0, ADJS},
|
||||
{"old", 0, ADJS},
|
||||
{"dented", 0, ADJS},
|
||||
{"blue", 0, ADJS},
|
||||
{"purple", 0, ADJS},
|
||||
{"kingly", 0, ADJS},
|
||||
{"the", 0, ADJS},
|
||||
{"climb", 0, ADJS},
|
||||
{"move", 0, ADJS},
|
||||
{"make", 0, ADJS},
|
||||
{"to", 0, ADJS},
|
||||
{0}
|
||||
{ "knife", KNIFE, OBJECT, NULL },
|
||||
{ "sword", SWORD, NOUNS, NULL },
|
||||
{ "scabbard", SWORD, OBJECT, NULL },
|
||||
{ "fine", SWORD, OBJECT, NULL },
|
||||
{ "two-handed", TWO_HANDED, OBJECT, NULL },
|
||||
{ "cleaver", CLEAVER, OBJECT, NULL },
|
||||
{ "broadsword", BROAD, OBJECT, NULL },
|
||||
{ "mail", MAIL, OBJECT, NULL },
|
||||
{ "coat", MAIL, OBJECT, NULL },
|
||||
{ "helmet", HELM, OBJECT, NULL },
|
||||
{ "shield", SHIELD, OBJECT, NULL },
|
||||
{ "maid", MAID, OBJECT, NULL },
|
||||
{ "maid's", MAID, OBJECT, NULL },
|
||||
{ "body", BODY, NOUNS, NULL },
|
||||
{ "viper", VIPER, OBJECT, NULL },
|
||||
{ "lamp", LAMPON, OBJECT, NULL },
|
||||
{ "lantern", LAMPON, OBJECT, NULL },
|
||||
{ "shoes", SHOES, OBJECT, NULL },
|
||||
{ "pajamas", PAJAMAS, OBJECT, NULL },
|
||||
{ "robe", ROBE, OBJECT, NULL },
|
||||
{ "amulet", AMULET, NOUNS, NULL },
|
||||
{ "medallion", MEDALION, NOUNS, NULL },
|
||||
{ "talisman", TALISMAN, NOUNS, NULL },
|
||||
{ "woodsman", DEADWOOD, OBJECT, NULL },
|
||||
{ "woodsman's", DEADWOOD, OBJECT, NULL },
|
||||
{ "mallet", MALLET, OBJECT, NULL },
|
||||
{ "laser", LASER, OBJECT, NULL },
|
||||
{ "pistol", LASER, OBJECT, NULL },
|
||||
{ "blaster", LASER, OBJECT, NULL },
|
||||
{ "gun", LASER, OBJECT, NULL },
|
||||
{ "goddess", NORMGOD, NOUNS, NULL },
|
||||
{ "grenade", GRENADE, OBJECT, NULL },
|
||||
{ "chain", CHAIN, OBJECT, NULL },
|
||||
{ "rope", ROPE, OBJECT, NULL },
|
||||
{ "levis", LEVIS, OBJECT, NULL },
|
||||
{ "pants", LEVIS, OBJECT, NULL },
|
||||
{ "mace", MACE, OBJECT, NULL },
|
||||
{ "shovel", SHOVEL, OBJECT, NULL },
|
||||
{ "halberd", HALBERD, OBJECT, NULL },
|
||||
{ "compass", COMPASS, OBJECT, NULL },
|
||||
{ "elf", ELF, OBJECT, NULL },
|
||||
{ "coins", COINS, OBJECT, NULL },
|
||||
{ "matches", MATCHES, OBJECT, NULL },
|
||||
{ "match", MATCHES, OBJECT, NULL },
|
||||
{ "book", MATCHES, OBJECT, NULL },
|
||||
{ "man", MAN, NOUNS, NULL },
|
||||
{ "papaya", PAPAYAS, OBJECT, NULL },
|
||||
{ "papayas", PAPAYAS, OBJECT, NULL },
|
||||
{ "pineapple", PINEAPPLE, OBJECT, NULL },
|
||||
{ "kiwi", KIWI, OBJECT, NULL },
|
||||
{ "coconut", COCONUTS, OBJECT, NULL },
|
||||
{ "coconuts", COCONUTS, OBJECT, NULL },
|
||||
{ "mango", MANGO, OBJECT, NULL },
|
||||
{ "ring", RING, OBJECT, NULL },
|
||||
{ "potion", POTION, OBJECT, NULL },
|
||||
{ "bracelet", BRACELET, OBJECT, NULL },
|
||||
{ "timer", TIMER, NOUNS, NULL },
|
||||
{ "bomb", BOMB, OBJECT, NULL },
|
||||
{ "warhead", BOMB, OBJECT, NULL },
|
||||
{ "girl", NATIVE, NOUNS, NULL },
|
||||
{ "native", NATIVE, NOUNS, NULL },
|
||||
{ "horse", HORSE, OBJECT, NULL },
|
||||
{ "stallion", HORSE, OBJECT, NULL },
|
||||
{ "car", CAR, OBJECT, NULL },
|
||||
{ "volare", CAR, OBJECT, NULL },
|
||||
{ "pot", POT, OBJECT, NULL },
|
||||
{ "jewels", POT, OBJECT, NULL },
|
||||
{ "bar", BAR, OBJECT, NULL },
|
||||
{ "diamond", BLOCK, OBJECT, NULL },
|
||||
{ "block", BLOCK, OBJECT, NULL },
|
||||
{ "up", UP, VERB, NULL },
|
||||
{ "u", UP, VERB, NULL },
|
||||
{ "down", DOWN, VERB, NULL },
|
||||
{ "d", DOWN, VERB, NULL },
|
||||
{ "ahead", AHEAD, VERB, NULL },
|
||||
{ "a", AHEAD, VERB, NULL },
|
||||
{ "back", BACK, VERB, NULL },
|
||||
{ "b", BACK, VERB, NULL },
|
||||
{ "right", RIGHT, VERB, NULL },
|
||||
{ "r", RIGHT, VERB, NULL },
|
||||
{ "left", LEFT, VERB, NULL },
|
||||
{ "l", LEFT, VERB, NULL },
|
||||
{ "take", TAKE, VERB, NULL },
|
||||
{ "get", TAKE, VERB, NULL },
|
||||
{ "use", USE, VERB, NULL },
|
||||
{ "look", LOOK, VERB, NULL },
|
||||
{ "lo", LOOK, VERB, NULL },
|
||||
{ "quit", QUIT, VERB, NULL },
|
||||
{ "q", QUIT, VERB, NULL },
|
||||
{ "su", SU, VERB, NULL },
|
||||
{ "drop", DROP, VERB, NULL },
|
||||
{ "draw", DRAW, VERB, NULL },
|
||||
{ "pull", DRAW, VERB, NULL },
|
||||
{ "carry", DRAW, VERB, NULL },
|
||||
{ "wear", WEARIT, VERB, NULL },
|
||||
{ "sheathe", WEARIT, VERB, NULL },
|
||||
{ "put", PUT, VERB, NULL },
|
||||
{ "buckle", PUT, VERB, NULL },
|
||||
{ "strap", PUT, VERB, NULL },
|
||||
{ "tie", PUT, VERB, NULL },
|
||||
{ "inven", INVEN, VERB, NULL },
|
||||
{ "i", INVEN, VERB, NULL },
|
||||
{ "everything", EVERYTHING, OBJECT, NULL },
|
||||
{ "all", EVERYTHING, OBJECT, NULL },
|
||||
{ "and", AND, CONJ, NULL },
|
||||
{ ",", AND, CONJ, NULL },
|
||||
{ "kill", KILL, VERB, NULL },
|
||||
{ "fight", KILL, VERB, NULL },
|
||||
{ "ravage", RAVAGE, VERB, NULL },
|
||||
{ "rape", RAVAGE, VERB, NULL },
|
||||
{ "undress", UNDRESS, VERB, NULL },
|
||||
{ "throw", THROW, VERB, NULL },
|
||||
{ "launch", LAUNCH, VERB, NULL },
|
||||
{ "land", LANDIT, VERB, NULL },
|
||||
{ "light", LIGHT, VERB, NULL },
|
||||
{ "strike", LIGHT, VERB, NULL },
|
||||
{ "follow", FOLLOW, VERB, NULL },
|
||||
{ "chase", FOLLOW, VERB, NULL },
|
||||
{ "kiss", KISS, VERB, NULL },
|
||||
{ "love", LOVE, VERB, NULL },
|
||||
{ "fuck", LOVE, VERB, NULL },
|
||||
{ "give", GIVE, VERB, NULL },
|
||||
{ "smite", SMITE, VERB, NULL },
|
||||
{ "attack", SMITE, VERB, NULL },
|
||||
{ "swing", SMITE, VERB, NULL },
|
||||
{ "stab", SMITE, VERB, NULL },
|
||||
{ "slice", SMITE, VERB, NULL },
|
||||
{ "cut", SMITE, VERB, NULL },
|
||||
{ "hack", SMITE, VERB, NULL },
|
||||
{ "shoot", SHOOT, VERB, NULL },
|
||||
{ "blast", SHOOT, VERB, NULL },
|
||||
{ "open", OPEN, VERB, NULL },
|
||||
{ "unlock", OPEN, VERB, NULL },
|
||||
{ "on", ON, PREPS, NULL },
|
||||
{ "off", OFF, PREPS, NULL },
|
||||
{ "time", TIME, VERB, NULL },
|
||||
{ "sleep", SLEEP, VERB, NULL },
|
||||
{ "dig", DIG, VERB, NULL },
|
||||
{ "eat", EAT, VERB, NULL },
|
||||
{ "swim", SWIM, VERB, NULL },
|
||||
{ "drink", DRINK, VERB, NULL },
|
||||
{ "door", DOOR, NOUNS, NULL },
|
||||
{ "verbose", VERBOSE, VERB, NULL },
|
||||
{ "brief", BRIEF, VERB, NULL },
|
||||
{ "save", SAVE, VERB, NULL },
|
||||
{ "ride", RIDE, VERB, NULL },
|
||||
{ "mount", RIDE, VERB, NULL },
|
||||
{ "drive", DRIVE, VERB, NULL },
|
||||
{ "start", DRIVE, VERB, NULL },
|
||||
{ "score", SCORE, VERB, NULL },
|
||||
{ "points", SCORE, VERB, NULL },
|
||||
{ "bury", BURY, VERB, NULL },
|
||||
{ "jump", JUMP, VERB, NULL },
|
||||
{ "kick", KICK, VERB, NULL },
|
||||
{ "kerosene", 0, ADJS, NULL },
|
||||
{ "plumed", 0, ADJS, NULL },
|
||||
{ "ancient", 0, ADJS, NULL },
|
||||
{ "golden", 0, ADJS, NULL },
|
||||
{ "gold", 0, ADJS, NULL },
|
||||
{ "ostrich", 0, ADJS, NULL },
|
||||
{ "rusty", 0, ADJS, NULL },
|
||||
{ "old", 0, ADJS, NULL },
|
||||
{ "dented", 0, ADJS, NULL },
|
||||
{ "blue", 0, ADJS, NULL },
|
||||
{ "purple", 0, ADJS, NULL },
|
||||
{ "kingly", 0, ADJS, NULL },
|
||||
{ "the", 0, ADJS, NULL },
|
||||
{ "climb", AUXVERB, VERB, NULL },
|
||||
{ "move", AUXVERB, VERB, NULL },
|
||||
{ "make", AUXVERB, VERB, NULL },
|
||||
{ "to", 0, ADJS, NULL },
|
||||
{ NULL, 0, 0, NULL }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user