home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / gkit.zip / GATEWAYS.H < prev    next >
Text File  |  1988-05-05  |  4KB  |  98 lines

  1. /* GATEWAYS.H  Copyright (c) 1988  Dynasoft  P.O. Box 915  Davis CA  95617 */
  2. /*============ Your GAME definitions =======================*/
  3.      /*      vvvvvv change this to the name of your game function */
  4. #define GAME d0main
  5. #define NUMGATES 3 /* set this to the number of gates in your game */
  6. /* Report the number of gates your game supports to David Larson */
  7. /* Do not use NUMGATES in your game, use the value passed to your game */
  8. /*============= Your Compiler definitions ==================*/
  9. #define PROTO_ON 1      /* set to 0 if function prototyping not supported */
  10. #define USE_longjmp 1   /* set to 0 if your compiler doesnt support longjmp */
  11. #define REDUCE_STACK 0  /* set to 1 if your compiler provides > 5K stack space*/
  12. #define LARGE_DATA 0 /* set to 1 if your memory model has >64K for data/heap */
  13. /* set which compiler you are using to 1 and all others to 0 */
  14. /* If your compiler isn't here, add it and add statements here and in g0kit.c */
  15. /* as needed and send your modifications back to David Larson */
  16. #define IBM_MICROSOFT 0
  17. #define IBM_TURBO 1
  18. #define IBM_AZTEC 0
  19. #define CPM_AZTEC 0
  20. #define AMIGA_MANX 0
  21. /*================ Debugging options ====================================*/
  22. /* setting vvvvv to 0 may have no effect on random#s for some compilers */
  23. #define RANDOM_START 1 /* if set to 0, do so TEMPORARILY */
  24. #define VALIDATE 1 /* if set to 0, would disable kit validation */
  25. /*        reduce vvvv to increase probability of simulated carrier loss */
  26. #define C_LOSS_P 24000 /* this number can be between 0 and 32000 */
  27. /* set  vvvvvvvvvvv to 0 TEMPORARILY to bypass carrier loss simulation */
  28. #define SIM_CARRIER 1
  29. #define MAX_PLAYERS 150
  30. #define gss_SIZE 128
  31. /*=============================================================*/
  32. #if PROTO_ON
  33. int writeline(int,char*),writestr(int,char*);
  34. int og_open(char*,int),og_create(char*),og_close(int),keyin(void);
  35. int keystat(void),og_mode(int),og_gateways(int),isin(char*,char);
  36. int *og_plscore(int),irandom(int),inpstr(char*,int),readline(int,char*,int,char);
  37. void og_onexit(void (*fn)(void)),og_carrier(void),upcfy(char*),outstr(char*);
  38. void keyout(char),*og_malloc(int),og_free(void*),trim(char*);
  39. int GAME(int,int,int,int);
  40. char *og_plname(int),upchar(char);
  41. double drandom(void);
  42. #else
  43. int writeline(),writestr();
  44. int og_open(),og_create(),og_close(),keyin();
  45. int keystat(),og_mode(),og_gateways(),isin();
  46. int *og_plscore(),irandom(),inpstr(),readline(),writeline();
  47. void keyout(),og_onexit(),og_carrier(),upcfy(),outstr(),trim();
  48. void *og_malloc(),og_free();
  49. char *og_plname(),upchar();
  50. int GAME();
  51. double drandom();
  52. #endif
  53.  
  54. /* Place common include files from your compiler here */
  55.  
  56. #include <stdio.h>
  57.  
  58. #if IBM_MICROSOFT || IBM_TURBO
  59. #include <stdlib.h>
  60. #include <io.h>
  61. #endif
  62. #if IBM_TURBO
  63. #include <math.h>
  64. #include <string.h>
  65. #endif
  66. #if AMIGA_MANX
  67. #include <stdio.h>
  68. #include <sgtty.h>
  69. #define memset(x,y,z) setmem((x),(z),(y))
  70. #endif
  71. #define uread(fd,buf,size) read(fd,buf,size)
  72. #define uwrite(fd,buf,size) write(fd,buf,size)
  73.  
  74. #if DEF_GLOBALS /* put the globals in the current module? */
  75.   char gss[gss_SIZE];
  76.   void *gp0,*gp1,*gp2,*gp3,*gp4,*gp5,*gp6,*gp7,*gp8,*gp9;
  77.   int gfd0,gfd1,gfd2; /* use for opening files */
  78.   int gflag0,gflag1,gflag2,gflag3; /* use for global bitmaps */
  79. #else
  80.   extern char gss[gss_SIZE];
  81.   extern void *gp0,*gp1,*gp2,*gp3,*gp4,*gp5,*gp6,*gp7,*gp8,*gp9;
  82.   extern int gfd0,gfd1,gfd2; /* use for opening files */
  83.   extern int gflag0,gflag1,gflag2,gflag3; /* use for global bitmaps */
  84. #endif
  85. /*---------------------------------------------------------------------*/
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.