X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/623e5e8eddc42ee4e3cff7c418dc2d3d4e96193f..be449cb6f456bb283309e66f01d7659a01764fc8:/phantasia/interplayer.c diff --git a/phantasia/interplayer.c b/phantasia/interplayer.c index 993c1621..7f783681 100644 --- a/phantasia/interplayer.c +++ b/phantasia/interplayer.c @@ -1,13 +1,31 @@ -/* $NetBSD: interplayer.c,v 1.6 1999/09/18 19:38:52 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 +#include +#include +#include +#include + +#include "macros.h" +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" +#include "pathnames.h" + +#undef bool +#include + +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 */ @@ -43,9 +61,8 @@ checkbattle() } } -void -battleplayer(foeplace) - long foeplace; +static void +battleplayer(long foeplace) { double dtemp; /* for temporary calculations */ double oldhits = 0.0; /* previous damage inflicted by foe */ @@ -272,8 +289,8 @@ LEAVE: death("Interterminal battle"); } -void -myturn() +static void +myturn(void) { double dtemp; /* for temporary calculations */ int ch; /* input */ @@ -351,7 +368,7 @@ HIT: } void -checktampered() +checktampered(void) { long loc = 0L; /* location in energy void file */ @@ -383,11 +400,8 @@ checktampered() 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 */ @@ -536,8 +550,7 @@ tampered(what, arg1, arg2) } void -userlist(ingameflag) - bool ingameflag; +userlist(phbool ingameflag) { int numusers = 0; /* number of users on file */ @@ -599,7 +612,7 @@ userlist(ingameflag) } void -throneroom() +throneroom(void) { FILE *fp; /* to clear energy voids */ long loc = 0L; /* location of old king in player file */ @@ -653,7 +666,7 @@ throneroom() } void -dotampered() +dotampered(void) { short tamper; /* value for tampering with other players */ const char *option; /* pointer to option description */ @@ -860,9 +873,7 @@ dotampered() } void -writevoid(vp, loc) - struct energyvoid *vp; - long loc; +writevoid(struct energyvoid *vp, long loc) { fseek(Energyvoidfp, loc, SEEK_SET); @@ -871,8 +882,8 @@ writevoid(vp, loc) fseek(Energyvoidfp, 0L, SEEK_SET); } -long -allocvoid() +static long +allocvoid(void) { long loc = 0L; /* location of new energy void */