1 /* $OpenBSD: phantglobs.h,v 1.8 2024/05/21 05:00:47 jsg Exp $ */ 2 /* $NetBSD: phantglobs.h,v 1.3 1995/04/24 12:24:39 cgd Exp $ */ 3 4 /* 5 * phantglobs.h - global declarations for Phantasia 6 */ 7 8 #include <stdio.h> 9 10 #include "phantstruct.h" 11 12 extern double Circle; /* which circle player is in */ 13 extern double Shield; /* force field thrown up in monster battle */ 14 15 extern bool Beyond; /* set if player is beyond point of no return */ 16 extern bool Marsh; /* set if player is in dead marshes */ 17 extern bool Throne; /* set if player is on throne */ 18 extern bool Changed; /* set if important player stats have changed */ 19 extern bool Wizard; /* set if player is the 'wizard' of the game */ 20 extern bool Timeout; /* set if short timeout waiting for input */ 21 extern bool Windows; /* set if we are set up for curses stuff */ 22 extern bool Luckout; /* set if we have tried to luck out in fight */ 23 extern bool Foestrikes; /* set if foe gets a chance to hit in battleplayer()*/ 24 extern bool Echo; /* set if echo input to terminal */ 25 26 extern int Users; /* number of users currently playing */ 27 extern int Whichmonster; /* which monster we are fighting */ 28 extern int Lines; /* line on screen counter for fight routines */ 29 30 extern char Ch_Erase; /* backspace key */ 31 extern char Ch_Kill; /* linekill key */ 32 33 extern long Fileloc; /* location in file of player statistics */ 34 35 extern const char *Login; /* pointer to login of current player */ 36 extern char *Enemyname; /* pointer name of monster/player we are battling*/ 37 38 extern struct player Player; /* stats for player */ 39 extern struct player Other; /* stats for another player */ 40 41 extern struct monster Curmonster;/* stats for current monster */ 42 43 extern struct energyvoid Enrgyvoid;/* energy void buffer */ 44 45 extern struct charstats Stattable[];/* used for rolling and changing player stats*/ 46 47 extern struct charstats *Statptr;/* pointer into Stattable[] */ 48 49 extern struct menuitem Menu[]; /* menu of items for purchase */ 50 51 extern FILE *Playersfp; /* pointer to open player file */ 52 extern FILE *Monstfp; /* pointer to open monster file */ 53 extern FILE *Messagefp; /* pointer to open message file */ 54 extern FILE *Energyvoidfp; /* pointer to open energy void file */ 55 56 extern char Databuf[SZ_DATABUF]; /* a place to read data into */ 57 58 /* some canned strings for messages */ 59 extern char Illcmd[]; 60 extern char Illmove[]; 61 extern char Illspell[]; 62 extern char Nomana[]; 63 extern char Somebetter[]; 64 extern char Nobetter[]; 65 66 /* functions which we need to know about */ 67 68 char *descrlocation(struct player *, bool); 69 char *descrstatus(struct player *); 70 char *descrtype(struct player *, bool); 71 void activelist(void); 72 void adjuststats(void); 73 long allocrecord(void); 74 long allocvoid(void); 75 void allstatslist(void); 76 void altercoordinates(double, double, int); 77 void awardtreasure(void); 78 void battleplayer(long); 79 void callmonster(int); 80 void cancelmonster(void); 81 void catchalarm(int); 82 void changestats(bool); 83 void checkbattle(void); 84 void checktampered(void); 85 void cleanup(int); 86 void collecttaxes(double, double); 87 void cursedtreasure(void); 88 void death(char *); 89 void displaystats(void); 90 double distance(double, double, double, double); 91 void dotampered(void); 92 double drandom(void); 93 void encounter(int); 94 void enterscore(void); 95 void error(char *); 96 double explevel(double); 97 long findname(char *, struct player *); 98 void freerecord(struct player *, long); 99 void genchar(int); 100 int getanswer(char *, bool); 101 void getstring(char *, int); 102 void hitmonster(double); 103 double infloat(void); 104 void initialstate(void); 105 void initplayer(struct player *); 106 int inputoption(void); 107 void interrupt(void); 108 void leavegame(void); 109 void monsthits(void); 110 void monstlist(void); 111 void more(int); 112 void movelevel(void); 113 void myturn(void); 114 void neatstuff(void); 115 int pickmonster(void); 116 void playerhits(void); 117 void playinit(void); 118 void procmain(void); 119 void purgeoldplayers(void); 120 void readmessage(void); 121 void readrecord(struct player *, long); 122 long recallplayer(void); 123 long rollnewplayer(void); 124 void scorelist(void); 125 void scramblestats(void); 126 void tampered(int, double, double); 127 void throneroom(void); 128 void throwspell(void); 129 void titlelist(void); 130 void tradingpost(void); 131 void truncstring(char *); 132 void userlist(bool); 133 void writerecord(struct player *, long); 134 void writevoid(struct energyvoid *, long); 135