phantglobs.h revision 1.9
11.9Swiz/* $NetBSD: phantglobs.h,v 1.9 2003/05/08 13:03:49 wiz 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.9Swizlong allocvoid(void); 701.9Swizvoid allstatslist(void); 711.9Swizvoid altercoordinates(double, double, int); 721.9Swizvoid awardtreasure(void); 731.9Swizvoid battleplayer(long); 741.9Swizvoid callmonster(int); 751.9Swizvoid cancelmonster(void); 761.9Swizvoid catchalarm(int) __attribute__((__noreturn__)); 771.9Swizvoid changestats(bool); 781.9Swizvoid checkbattle(void); 791.9Swizvoid checktampered(void); 801.9Swizvoid cleanup(int); 811.9Swizvoid collecttaxes(double, double); 821.9Swizvoid cursedtreasure(void); 831.9Swizvoid death(const char *); 841.9Swizvoid displaystats(void); 851.9Swizdouble distance(double, double, double, double); 861.9Swizvoid dotampered(void); 871.9Swizdouble drandom(void); 881.9Swizvoid encounter(int); 891.9Swizvoid enterscore(void); 901.9Swizvoid error(const char *); 911.9Swizdouble explevel(double); 921.9Swizlong findname(const char *, struct player *); 931.9Swizvoid freerecord(struct player *, long); 941.9Swizvoid genchar(int); 951.9Swizint getanswer(const char *, bool); 961.9Swizvoid getstring(char *, int); 971.9Swizvoid hitmonster(double); 981.9Swizvoid ill_sig(int); 991.9Swizdouble infloat(void); 1001.9Swizvoid initialstate(void); 1011.9Swizvoid initplayer(struct player *); 1021.9Swizint inputoption(void); 1031.9Swizvoid interrupt(void); 1041.9Swizvoid leavegame(void); 1051.9Swizvoid monsthits(void); 1061.9Swizvoid monstlist(void); 1071.9Swizvoid more(int); 1081.9Swizvoid movelevel(void); 1091.9Swizvoid myturn(void); 1101.9Swizvoid neatstuff(void); 1111.9Swizint pickmonster(void); 1121.9Swizvoid playerhits(void); 1131.9Swizvoid playinit(void); 1141.9Swizvoid procmain(void); 1151.9Swizvoid purgeoldplayers(void); 1161.9Swizvoid readmessage(void); 1171.9Swizvoid readrecord(struct player *, long); 1181.9Swizlong recallplayer(void); 1191.9Swizlong rollnewplayer(void); 1201.9Swizvoid scorelist(void); 1211.9Swizvoid scramblestats(void); 1221.9Swizvoid tampered(int, double, double); 1231.9Swizvoid throneroom(void); 1241.9Swizvoid throwspell(void); 1251.9Swizvoid titlelist(void); 1261.9Swizvoid tradingpost(void); 1271.9Swizvoid truncstring(char *); 1281.9Swizvoid userlist(bool); 1291.9Swizvoid writerecord(struct player *, long); 1301.9Swizvoid writevoid(struct energyvoid *, long); 131