home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 056.lha / Four / struct.c < prev   
C/C++ Source or Header  |  1986-11-20  |  3KB  |  103 lines

  1. /* four in a row's structures */
  2.  
  3.  
  4. #define I_REV 29
  5. #define G_REV 29
  6.  
  7.  
  8. /* Tell C what the functions are so as to avoid too many of warnings */
  9. extern struct IntuiMessage *GetMsg();
  10. extern struct Screen *OpenScreen();
  11. extern struct Window *OpenWindow();
  12. extern struct MenuItem *ItemAddress();
  13.  
  14. struct IntuitionBase *IntuitionBase;
  15. struct GfxBase *GfxBase;
  16. struct IntuiMessage *message;
  17.  
  18.  
  19. /* a few definitions */
  20.  
  21. #define W   1         /* width;  1=normal, 2=hires */
  22. #define H   1         /* height; 1=normal, 2=interlace */
  23. #define TEXT(wi,x,y,s) { Move(wi->RPort,x,y); Text(wi->RPort, s, strlen(s));}
  24. #define CTSIZ 32      /* color table size          */
  25. #define ROWS 10       /* rows per line of text     */
  26. #define COLS 12       /* column spacing for grid   */
  27. #define MAXX 8        /* maximum x grid dimensions */
  28. #define MAXY 8        /* maximum y grid dimensions */
  29. #define XOFF 2*COLS+3 /* grid x offset             */
  30. #define YOFF 2*ROWS   /* grid y offset             */
  31. #define YOU 1         /* your mark                 */
  32. #define ME  0         /* player two's mark         */
  33. #define NOONE -1      /* no mark                   */
  34.  
  35.  
  36. /* define our global variables */
  37.  
  38. struct Screen *screen1;
  39. struct Window *window1;
  40. struct ColorMap *colormap;
  41. struct ViewPort *myviewport;
  42. USHORT *colortable;
  43.  
  44. /* the font structure */
  45.  
  46. struct TextAttr *font;
  47. struct TextAttr Font80 = {
  48.    "topaz.font", TOPAZ_EIGHTY, FS_NORMAL, FPF_ROMFONT
  49. };
  50.  
  51. /* save pointer to old view so can restore */
  52. struct View *oldview;
  53.  
  54.  
  55. #define STCOL 20
  56.  
  57. /* color table colors */
  58.  
  59. USHORT newcolors[CTSIZ] = {
  60.  
  61.    0x000, 0x24d, 0xf00, 0xfff,   /* black, steel blue, red, white     */
  62.    0xb60, 0xfc0, 0x830, 0xbbb,   /* brown, gold/orange, dark brown,
  63.                                     light grey */
  64.    0xc00, 0x12a, 0x800, 0x014,   /* brick red, dark blue, med. red,
  65.                                     very dark blue */
  66.    0x400, 0xb80, 0x0d1, 0xff0,   /* dark red, deep gold, green, yellow */
  67.    0x000, 0x080, 0x444, 0x0ca,   /* transparent, green, grey, aqua     */
  68.    0x000, 0x000, 0x000, 0x000,
  69.    0x000, 0x000, 0x000, 0x000,
  70.    0x000, 0x000, 0x000, 0x000,
  71. };
  72.  
  73. /* NOTE: color registers used as follows:    */
  74. /*                                           */
  75. /* Register #        Used for                */
  76. /* ----------        ---------------------   */
  77. /*    00             background              */
  78. /*    01             knob gadget image       */
  79. /*    02             base top image shade    */
  80. /*    03             ball 1 image            */
  81. /*    04             ball 2 image            */
  82. /*    05             pole image              */
  83. /*    06             ball 2 shading          */
  84. /*    07             ball 1 shading          */
  85. /*    08             base front image shade  */
  86. /*    09             knob shading            */
  87. /*    10             base end image shade    */
  88. /*    11             knob gadget shaft       */
  89. /*    12             Border structure(line1) */
  90. /*    13             pole shading            */
  91. /*    14             "Tie Game" text         */
  92. /*    15             "Pole Full" text        */
  93. /* 16 - 19           the pointer             */
  94.  
  95.  
  96. /* include image, menu, gadget, and display structures */
  97. /* and initialization functions                        */
  98.  
  99. #include "image.c"
  100. #include "menu.c"
  101. #include "gadget.c"
  102. #include "display.c"
  103.