/* four in a row's structures */


#define I_REV 29
#define G_REV 29


/* Tell C what the functions are so as to avoid too many of warnings */
extern struct IntuiMessage *GetMsg();
extern struct Screen *OpenScreen();
extern struct Window *OpenWindow();
extern struct MenuItem *ItemAddress();

struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct IntuiMessage *message;


/* a few definitions */

#define W   1         /* width;  1=normal, 2=hires */
#define H   1         /* height; 1=normal, 2=interlace */
#define TEXT(wi,x,y,s) { Move(wi->RPort,x,y); Text(wi->RPort, s, strlen(s));}
#define CTSIZ 32      /* color table size          */
#define ROWS 10       /* rows per line of text     */
#define COLS 12       /* column spacing for grid   */
#define MAXX 8        /* maximum x grid dimensions */
#define MAXY 8        /* maximum y grid dimensions */
#define XOFF 2*COLS+3 /* grid x offset             */
#define YOFF 2*ROWS   /* grid y offset             */
#define YOU 1         /* your mark                 */
#define ME  0         /* player two's mark         */
#define NOONE -1      /* no mark                   */


/* define our global variables */

struct Screen *screen1;
struct Window *window1;
struct ColorMap *colormap;
struct ViewPort *myviewport;
USHORT *colortable;

/* the font structure */

struct TextAttr *font;
struct TextAttr Font80 = {
   "topaz.font", TOPAZ_EIGHTY, FS_NORMAL, FPF_ROMFONT
};

/* save pointer to old view so can restore */
struct View *oldview;


#define STCOL 20

/* color table colors */

USHORT newcolors[CTSIZ] = {

   0x000, 0x24d, 0xf00, 0xfff,   /* black, steel blue, red, white     */
   0xb60, 0xfc0, 0x830, 0xbbb,   /* brown, gold/orange, dark brown,
                                    light grey */
   0xc00, 0x12a, 0x800, 0x014,   /* brick red, dark blue, med. red,
                                    very dark blue */
   0x400, 0xb80, 0x0d1, 0xff0,   /* dark red, deep gold, green, yellow */
   0x000, 0x080, 0x444, 0x0ca,   /* transparent, green, grey, aqua     */
   0x000, 0x000, 0x000, 0x000,
   0x000, 0x000, 0x000, 0x000,
   0x000, 0x000, 0x000, 0x000,
};

/* NOTE: color registers used as follows:    */
/*                                           */
/* Register #        Used for                */
/* ----------        ---------------------   */
/*    00             background              */
/*    01             knob gadget image       */
/*    02             base top image shade    */
/*    03             ball 1 image            */
/*    04             ball 2 image            */
/*    05             pole image              */
/*    06             ball 2 shading          */
/*    07             ball 1 shading          */
/*    08             base front image shade  */
/*    09             knob shading            */
/*    10             base end image shade    */
/*    11             knob gadget shaft       */
/*    12             Border structure(line1) */
/*    13             pole shading            */
/*    14             "Tie Game" text         */
/*    15             "Pole Full" text        */
/* 16 - 19           the pointer             */


/* include image, menu, gadget, and display structures */
/* and initialization functions                        */

#include "image.c"
#include "menu.c"
#include "gadget.c"
#include "display.c"
