//#ifdef _WINDOWS_16_
#define WINDOWS 1
//#endif

/* static char *what = "@(#)Xtacy.c $Revision: N.0 $"; */

#include "fakex.h"
#include "wintacy.h"

typedef enum {yes,no,maybe,lizard_spit} yesno;
typedef enum {kaleid=DLG_KALEID,boxes=DLG_BOXES,bozo=DLG_BOZO,test=DLG_TEST,
              circ=DLG_CIRCLE,wandering=DLG_WANDER,qix=DLG_QIX,qix4=DLG_QIX4,
              clover=DLG_CLOVER,tunnel=DLG_TUNNEL,plasma=DLG_PLASMA,
              spiral=DLG_SPIRAL,mandel=DLG_MANDEL,julia=DLG_JULIA,
              newton=DLG_NEWTON,gravity=DLG_GRAVITY,off=DLG_OFF,
              funky=DLG_FUNKY,xstatic=DLG_STATIC,starback=DLG_STAR,
              fields=DLG_FIELD,bez=DLG_BEZ,mixer=DLG_MIXER,cells=DLG_CELLS,
          life=DLG_LIFE,swarm=DLG_SWARM,munch,maxh,rose} modes;

extern double sinTbl[32];
extern double cosTbl[32];

XPoint *make_bozo(int,int,int,int,int,int,int,int);
XPoint *wrecked(int,int,int,int);
XPoint *tri (int,int,int,int,int,int);
XPoint *make_circle(int,int,int,int);

#ifndef X
 #ifdef __TURBOC__
  extern char i1bit(void);
  extern unsigned int i16bit(void);
  extern void rinit(long,long);
  #undef random
  #define random i16bit
  #define srandom(x) rinit(109L,x)
 #else
  #define random rand
  #define srandom(x) srand(x)
 #endif
#endif

#define NCOLORS 253
#define rndm(x) (random()%(x))

// extern XColor color_info[NCOLORS];

#ifdef X
Display *display;
Screen *scr;
GC color_gcs[NCOLORS];
Window window,menuwin;
Colormap colmap;
extern struct timeval *schedule, *intervals;
#else
  #ifdef WINDOWS
    extern HWND FAR* window; /* list of windows */
    extern int color_gcs[NCOLORS];
    extern int colmap;
    extern int display;
    extern int CheckforMessage(HWND);
  #else
    extern int window,display; /* dummies */
    extern int color_gcs[NCOLORS];
    extern int colmap;
  #endif
#endif
extern int screen;
extern int nwindows, nvisible;
extern int visible;
extern int CX, CY, M;
extern int* HC;

extern char *progname;

struct FOO
{
#ifdef X
  unsigned long bgcolor;
  unsigned long bdcolor;
  int bwidth; /* border width */
  int annoy_tefler;
  int noclear;
  int lock;  /* Lock the Display? ok, so it is as yet unwritten */
  char *displayname;
  char *geomstring;
  char *background;
  char *border;
  char *boxc;
#endif
  int doroot;
  int windows;

  int opt1; /* numparts, trell, and norect */
  int palette;
  int number; /* number of whatevers */
  int delayvalue;
  int tryfor;
  int mono;
  int multi;
  int dynamic_colors;
  int totalrand;
  char rotate;
  char mirror;
  modes mode;
};

typedef struct FOO foo;

#ifndef M_PI
#define M_PI 3.14159265
#endif

