phantglobs.h revision 1.11
11.11Sdholland/*	$NetBSD: phantglobs.h,v 1.11 2009/08/12 08:21:41 dholland Exp $	*/
21.2Scgd
31.1Sjtc/*
41.1Sjtc * phantglobs.h - global declarations for Phantasia
51.1Sjtc */
61.1Sjtc
71.4Slukemextern	double	Circle;		/* which circle player is in */
81.4Slukemextern	double	Shield;		/* force field thrown up in monster battle */
91.1Sjtc
101.4Slukemextern	bool	Beyond;		/* set if player is beyond point of no return */
111.4Slukemextern	bool	Marsh;		/* set if player is in dead marshes */
121.4Slukemextern	bool	Throne;		/* set if player is on throne */
131.4Slukemextern	bool	Changed;	/* set if important player stats have changed */
141.4Slukemextern	bool	Wizard;		/* set if player is the 'wizard' of the game */
151.4Slukemextern	bool	Timeout;	/* set if short timeout waiting for input */
161.4Slukemextern	bool	Windows;	/* set if we are set up for curses stuff */
171.4Slukemextern	bool	Luckout;	/* set if we have tried to luck out in fight */
181.1Sjtcextern	bool	Foestrikes;	/* set if foe gets a chance to hit in battleplayer()*/
191.4Slukemextern	bool	Echo;		/* set if echo input to terminal */
201.1Sjtc
211.4Slukemextern	int	Users;		/* number of users currently playing */
221.4Slukemextern	int	Whichmonster;	/* which monster we are fighting */
231.4Slukemextern	int	Lines;		/* line on screen counter for fight routines */
241.1Sjtc
251.4Slukemextern	jmp_buf Fightenv;	/* used to jump into fight routine */
261.4Slukemextern	jmp_buf Timeoenv;	/* used for timing out waiting for input */
271.1Sjtc
281.4Slukemextern	long	Fileloc;	/* location in file of player statistics */
291.1Sjtc
301.5Smycroftextern	const char *Login;	/* pointer to login of current player */
311.6Sjsmextern	const char	*Enemyname;	/* pointer name of monster/player we are battling*/
321.1Sjtc
331.4Slukemextern	struct player	Player;	/* stats for player */
341.4Slukemextern	struct player	Other;	/* stats for another player */
351.1Sjtc
361.4Slukemextern	struct monster	Curmonster;/* stats for current monster */
371.1Sjtc
381.4Slukemextern	struct energyvoid Enrgyvoid;/* energy void buffer */
391.1Sjtc
401.6Sjsmextern	const struct charstats Stattable[];/* used for rolling and changing player stats*/
411.1Sjtc
421.6Sjsmextern	const struct charstats *Statptr;/* pointer into Stattable[] */
431.1Sjtc
441.6Sjsmextern	const struct menuitem	Menu[];	/* menu of items for purchase */
451.1Sjtc
461.4Slukemextern	FILE	*Playersfp;	/* pointer to open player file */
471.4Slukemextern	FILE	*Monstfp;	/* pointer to open monster file */
481.4Slukemextern	FILE	*Messagefp;	/* pointer to open message file */
491.4Slukemextern	FILE	*Energyvoidfp;	/* pointer to open energy void file */
501.1Sjtc
511.4Slukemextern	char	Databuf[];	/* a place to read data into */
521.1Sjtc
531.1Sjtc/* some canned strings for messages */
541.6Sjsmextern const	char	Illcmd[];
551.6Sjsmextern const	char	Illmove[];
561.6Sjsmextern const	char	Illspell[];
571.6Sjsmextern const	char	Nomana[];
581.6Sjsmextern const	char	Somebetter[];
591.6Sjsmextern const	char	Nobetter[];
601.1Sjtc
611.4Slukem/* functions which we need to know about */
621.1Sjtc
631.9Swizconst char	*descrlocation(struct player *, bool);
641.9Swizconst char	*descrstatus(struct player *);
651.9Swizconst char	*descrtype(struct player *, bool);
661.9Swizvoid	activelist(void);
671.9Swizvoid	adjuststats(void);
681.9Swizlong	allocrecord(void);
691.9Swizvoid	allstatslist(void);
701.9Swizvoid	altercoordinates(double, double, int);
711.9Swizvoid	changestats(bool);
721.9Swizvoid	checkbattle(void);
731.9Swizvoid	checktampered(void);
741.9Swizvoid	cleanup(int);
751.9Swizvoid	collecttaxes(double, double);
761.9Swizvoid	death(const char *);
771.9Swizvoid	displaystats(void);
781.9Swizdouble	distance(double, double, double, double);
791.9Swizvoid	dotampered(void);
801.9Swizdouble	drandom(void);
811.9Swizvoid	encounter(int);
821.9Swizvoid	enterscore(void);
831.9Swizvoid	error(const char *);
841.9Swizlong	findname(const char *, struct player *);
851.9Swizvoid	freerecord(struct player *, long);
861.9Swizint	getanswer(const char *, bool);
871.9Swizvoid	getstring(char *, int);
881.9Swizvoid	ill_sig(int);
891.9Swizdouble	infloat(void);
901.9Swizvoid	initplayer(struct player *);
911.9Swizint	inputoption(void);
921.9Swizvoid	interrupt(void);
931.9Swizvoid	leavegame(void);
941.9Swizvoid	monstlist(void);
951.9Swizvoid	more(int);
961.9Swizvoid	purgeoldplayers(void);
971.9Swizvoid	readmessage(void);
981.9Swizvoid	readrecord(struct player *, long);
991.9Swizvoid	scorelist(void);
1001.9Swizvoid	throneroom(void);
1011.9Swizvoid	tradingpost(void);
1021.9Swizvoid	truncstring(char *);
1031.9Swizvoid	userlist(bool);
1041.9Swizvoid	writerecord(struct player *, long);
1051.9Swizvoid	writevoid(struct energyvoid *, long);
106