mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 11:24:49 +00:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user