releasing version 2.17-1

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@11092 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2005-02-18 18:44:27 +00:00
parent 3d248f5d00
commit 00d2970fb5
126 changed files with 786 additions and 778 deletions

View File

@@ -1,17 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
phantasia
setup
pathnames.h
gold
lastdead
mess
monsters
motd
void
scoreboard
characs
scorefiles.stamp

View File

@@ -1,10 +1,12 @@
/* $NetBSD: fight.c,v 1.8 2004/02/08 00:32:07 jsm Exp $ */
/* $NetBSD: fight.c,v 1.10 2004/04/11 13:35:06 he Exp $ */
/*
* fight.c Phantasia monster fighting routines
*/
#include "include.h"
#undef bool
#include <curses.h>
void
encounter(particular)

View File

@@ -1,14 +1,16 @@
/* $NetBSD: gamesupport.c,v 1.6 1999/09/08 21:57:19 jsm Exp $ */
/* $NetBSD: gamesupport.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
/*
* gamesupport.c - auxiliary routines for support of Phantasia
*/
#include "include.h"
#undef bool
#include <curses.h>
void
changestats(ingameflag)
bool ingameflag;
phbool ingameflag;
{
static char flag[2] = /* for printing values of bools */
{'F', 'T'};
@@ -20,7 +22,7 @@ changestats(ingameflag)
long loc; /* location in player file */
time_t now; /* time now */
double dtemp; /* temporary variable */
bool *bptr; /* pointer to bool item to change */
phbool *bptr; /* pointer to bool item to change */
double *dptr; /* pointer to double item to change */
short *sptr; /* pointer to short item to change */

View File

@@ -1,15 +1,15 @@
/* $NetBSD: include.h,v 1.4 1997/10/13 02:18:19 lukem Exp $ */
/* $NetBSD: include.h,v 1.5 2004/04/07 17:46:47 ross Exp $ */
/*
* include.h - includes all important files for Phantasia
*/
#include <ctype.h>
#include <curses.h>
#include <errno.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@@ -1,10 +1,12 @@
/* $NetBSD: interplayer.c,v 1.6 1999/09/18 19:38:52 jsm Exp $ */
/* $NetBSD: interplayer.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
/*
* interplayer.c - player to player routines for Phantasia
*/
#include "include.h"
#undef bool
#include <curses.h>
void
checkbattle()
@@ -537,7 +539,7 @@ tampered(what, arg1, arg2)
void
userlist(ingameflag)
bool ingameflag;
phbool ingameflag;
{
int numusers = 0; /* number of users on file */

View File

@@ -1,10 +1,12 @@
/* $NetBSD: io.c,v 1.6 2004/02/08 00:32:07 jsm Exp $ */
/* $NetBSD: io.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
/*
* io.c - input/output routines for Phantasia
*/
#include "include.h"
#undef bool
#include <curses.h>
void
getstring(cp, mx)
@@ -154,7 +156,7 @@ interrupt()
int
getanswer(choices, def)
const char *choices;
bool def;
phbool def;
{
int ch; /* input */
volatile int loop; /* counter */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.12 2004/01/01 16:03:46 jsm Exp $ */
/* $NetBSD: main.c,v 1.15 2004/12/09 05:15:59 jmc Exp $ */
/*
* Phantasia 3.3.2 -- Interterminal fantasy game
@@ -27,6 +27,7 @@
* AT&T is in no way connected with this game.
*/
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <termios.h>
@@ -57,6 +58,8 @@
*/
#include "include.h"
#undef bool
#include <curses.h>
int main(int, char **);
@@ -270,6 +273,8 @@ main(argc, argv)
void
initialstate()
{
struct stat sb;
Beyond = FALSE;
Marsh = FALSE;
Throne = FALSE;
@@ -301,6 +306,16 @@ initialstate()
if ((Energyvoidfp = fopen(_PATH_VOID, "r+")) == NULL)
error(_PATH_VOID);
if (fstat(fileno(Energyvoidfp), &sb) == -1)
error("stat");
if (sb.st_size == 0) {
/* initialize grail to new location */
Enrgyvoid.ev_active = TRUE;
Enrgyvoid.ev_x = ROLL(-1.0e6, 2.0e6);
Enrgyvoid.ev_y = ROLL(-1.0e6, 2.0e6);
writevoid(&Enrgyvoid, 0L);
}
/* NOTREACHED */
srandom((unsigned) time(NULL)); /* prime random numbers */

View File

@@ -1,10 +1,12 @@
/* $NetBSD: misc.c,v 1.10 2004/01/01 16:03:46 jsm Exp $ */
/* $NetBSD: misc.c,v 1.14 2005/02/15 12:58:21 jsm Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
*/
#include "include.h"
#undef bool
#include <curses.h>
void
@@ -63,7 +65,7 @@ movelevel()
const char *
descrlocation(playerp, shortflag)
struct player *playerp;
bool shortflag;
phbool shortflag;
{
double circle; /* corresponding circle for coordinates */
int quadrant; /* quandrant of grid */
@@ -445,7 +447,7 @@ allstatslist()
const char *
descrtype(playerp, shortflag)
struct player *playerp;
bool shortflag;
phbool shortflag;
{
int type; /* for caluculating result subscript */
static const char *const results[] =/* description table */
@@ -671,7 +673,7 @@ death(how)
if (ch == 'Y') {
cleanup(FALSE);
execl(_PATH_GAMEPROG, "phantasia", "-s",
(Wizard ? "-S" : (char *) NULL), 0);
(Wizard ? "-S" : (char *) NULL), (char *) NULL);
exit(0);
/* NOTREACHED */
}

View File

@@ -1,4 +1,8 @@
/* $NetBSD: phantstruct.h,v 1.3 1999/09/08 21:17:55 jsm Exp $ */
/* $NetBSD: phantstruct.h,v 1.5 2005/02/15 12:58:21 jsm Exp $ */
#define bool char
/* phbool is used when we need this version of bool after <curses.h>. */
#define phbool char
/*
* phantstruct.h - structure definitions for Phantasia

View File

@@ -1,4 +1,4 @@
/* $NetBSD: setup.c,v 1.12 2003/05/08 13:03:49 wiz Exp $ */
/* $NetBSD: setup.c,v 1.14 2004/12/09 05:15:59 jmc Exp $ */
/*
* setup.c - set up all files for Phantasia
@@ -109,21 +109,10 @@ main(argc, argv)
++filename; /* process next file */
}
/* put holy grail info into energy void file */
Enrgyvoid.ev_active = TRUE;
Enrgyvoid.ev_x = ROLL(-1.0e6, 2.0e6);
Enrgyvoid.ev_y = ROLL(-1.0e6, 2.0e6);
path = strrchr(_PATH_VOID, '/') + 1;
/* Initialize an empty file placeholder for the grail location. */
if ((fp = fopen(path, "w")) == NULL)
Error("Cannot update %s.\n", path);
else
{
fwrite(&Enrgyvoid, SZ_VOIDSTRUCT, 1, fp);
fflush(fp);
if (ferror(fp))
Error("Writing %s.\n", path);
fclose(fp);
}
Error("Cannot create %s.\n", path);
fclose(fp);
/* create binary monster data base */
path = strrchr(_PATH_MONST, '/') + 1;