]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - phantasia/phantglobs.h
1 /* $NetBSD: phantglobs.h,v 1.9 2003/05/08 13:03:49 wiz Exp $ */
4 * phantglobs.h - global declarations for Phantasia
7 extern double Circle
; /* which circle player is in */
8 extern double Shield
; /* force field thrown up in monster battle */
10 extern bool Beyond
; /* set if player is beyond point of no return */
11 extern bool Marsh
; /* set if player is in dead marshes */
12 extern bool Throne
; /* set if player is on throne */
13 extern bool Changed
; /* set if important player stats have changed */
14 extern bool Wizard
; /* set if player is the 'wizard' of the game */
15 extern bool Timeout
; /* set if short timeout waiting for input */
16 extern bool Windows
; /* set if we are set up for curses stuff */
17 extern bool Luckout
; /* set if we have tried to luck out in fight */
18 extern bool Foestrikes
; /* set if foe gets a chance to hit in battleplayer()*/
19 extern bool Echo
; /* set if echo input to terminal */
21 extern int Users
; /* number of users currently playing */
22 extern int Whichmonster
; /* which monster we are fighting */
23 extern int Lines
; /* line on screen counter for fight routines */
25 extern jmp_buf Fightenv
; /* used to jump into fight routine */
26 extern jmp_buf Timeoenv
; /* used for timing out waiting for input */
28 extern long Fileloc
; /* location in file of player statistics */
30 extern const char *Login
; /* pointer to login of current player */
31 extern const char *Enemyname
; /* pointer name of monster/player we are battling*/
33 extern struct player Player
; /* stats for player */
34 extern struct player Other
; /* stats for another player */
36 extern struct monster Curmonster
;/* stats for current monster */
38 extern struct energyvoid Enrgyvoid
;/* energy void buffer */
40 extern const struct charstats Stattable
[];/* used for rolling and changing player stats*/
42 extern const struct charstats
*Statptr
;/* pointer into Stattable[] */
44 extern const struct menuitem Menu
[]; /* menu of items for purchase */
46 extern FILE *Playersfp
; /* pointer to open player file */
47 extern FILE *Monstfp
; /* pointer to open monster file */
48 extern FILE *Messagefp
; /* pointer to open message file */
49 extern FILE *Energyvoidfp
; /* pointer to open energy void file */
51 extern char Databuf
[]; /* a place to read data into */
53 /* some canned strings for messages */
54 extern const char Illcmd
[];
55 extern const char Illmove
[];
56 extern const char Illspell
[];
57 extern const char Nomana
[];
58 extern const char Somebetter
[];
59 extern const char Nobetter
[];
61 /* functions which we need to know about */
63 const char *descrlocation(struct player
*, bool);
64 const char *descrstatus(struct player
*);
65 const char *descrtype(struct player
*, bool);
66 void activelist(void);
67 void adjuststats(void);
68 long allocrecord(void);
70 void allstatslist(void);
71 void altercoordinates(double, double, int);
72 void awardtreasure(void);
73 void battleplayer(long);
74 void callmonster(int);
75 void cancelmonster(void);
76 void catchalarm(int) __attribute__((__noreturn__
));
77 void changestats(bool);
78 void checkbattle(void);
79 void checktampered(void);
81 void collecttaxes(double, double);
82 void cursedtreasure(void);
83 void death(const char *);
84 void displaystats(void);
85 double distance(double, double, double, double);
86 void dotampered(void);
89 void enterscore(void);
90 void error(const char *);
91 double explevel(double);
92 long findname(const char *, struct player
*);
93 void freerecord(struct player
*, long);
95 int getanswer(const char *, bool);
96 void getstring(char *, int);
97 void hitmonster(double);
100 void initialstate(void);
101 void initplayer(struct player
*);
102 int inputoption(void);
103 void interrupt(void);
104 void leavegame(void);
105 void monsthits(void);
106 void monstlist(void);
108 void movelevel(void);
110 void neatstuff(void);
111 int pickmonster(void);
112 void playerhits(void);
115 void purgeoldplayers(void);
116 void readmessage(void);
117 void readrecord(struct player
*, long);
118 long recallplayer(void);
119 long rollnewplayer(void);
120 void scorelist(void);
121 void scramblestats(void);
122 void tampered(int, double, double);
123 void throneroom(void);
124 void throwspell(void);
125 void titlelist(void);
126 void tradingpost(void);
127 void truncstring(char *);
129 void writerecord(struct player
*, long);
130 void writevoid(struct energyvoid
*, long);