-/* $NetBSD: interplayer.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
+/* $NetBSD: interplayer.c,v 1.12 2009/08/31 08:27:16 dholland Exp $ */
/*
* interplayer.c - player to player routines for Phantasia
*/
-#include "include.h"
+#include <math.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+#include "pathnames.h"
+
#undef bool
#include <curses.h>
+static long allocvoid(void);
+static void battleplayer(long);
+static void myturn(void);
+static void tampered(int, double, double);
+
void
-checkbattle()
+checkbattle(void)
{
long foeloc = 0L; /* location in file of person to fight */
}
}
-void
-battleplayer(foeplace)
- long foeplace;
+static void
+battleplayer(long foeplace)
{
double dtemp; /* for temporary calculations */
double oldhits = 0.0; /* previous damage inflicted by foe */
death("Interterminal battle");
}
-void
-myturn()
+static void
+myturn(void)
{
double dtemp; /* for temporary calculations */
int ch; /* input */
}
void
-checktampered()
+checktampered(void)
{
long loc = 0L; /* location in energy void file */
tampered(Other.p_tampered, Other.p_1scratch, Other.p_2scratch);
}
-void
-tampered(what, arg1, arg2)
- int what;
- double arg1;
- double arg2;
+static void
+tampered(int what, double arg1, double arg2)
{
long loc; /* location in file of other players */
}
void
-userlist(ingameflag)
- phbool ingameflag;
+userlist(phbool ingameflag)
{
int numusers = 0; /* number of users on file */
}
void
-throneroom()
+throneroom(void)
{
FILE *fp; /* to clear energy voids */
long loc = 0L; /* location of old king in player file */
}
void
-dotampered()
+dotampered(void)
{
short tamper; /* value for tampering with other players */
const char *option; /* pointer to option description */
}
void
-writevoid(vp, loc)
- struct energyvoid *vp;
- long loc;
+writevoid(struct energyvoid *vp, long loc)
{
fseek(Energyvoidfp, loc, SEEK_SET);
fseek(Energyvoidfp, 0L, SEEK_SET);
}
-long
-allocvoid()
+static long
+allocvoid(void)
{
long loc = 0L; /* location of new energy void */