/* V1.21 */
/* extra.h Header file - defines for Calgor */

#ifndef(EXEC_TYPES_H)
   #include<exec/types.h>
#endif

#if !defined(MYDEFINES)
   #define MYDEFINES 1
   /* #define TEST 1 */                      /* If Defined then this is a test version */
   #define PRIZERO 0                         /* Priority for testing 0 high 4 low */
   #define PRIONE 1                          /* Priority for testing 0 high 4 low */
   #define PRITWO 2                          /* Priority for testing 0 high 4 low */
   #define PRITHREE 3                        /* Priority for testing 0 high 4 low */
   #define PRIFOUR 4                         /* Priority for testing 0 high 4 low */
   #define EDITPATH "Cal:Data/Editor.dat"    /* Editor.dat Path */
   #define MENUPALETE "Cal:Data/Menu.dat"    /* Menu Palette Path */
   #define DEMPALETE "Cal:Data/Dem.dat"      /* Palette Path For Animation Display */
   #define OPTTPATH "Cal:Data/options.dat"   /* Option Text Path */
   #define MENUPATH "Cal:Pic/MenuV1_22.pic"  /* Menu Picture Path */
   #define DUMPPATH "Cal:Pic/Dump.pic"       /* Third Display Path */
   #define DEMPATH "Cal:Pic/Dem2.pic"        /* Animation Picture Path */
   #define FRACTION 2
   #define GET 0
   #define PUT 1
   #define OBVAR 6
   #define ARGNUM 10
   #define ARGLEN 30
   #define MAXLINE 12
   #define MWHITE 14
   #define MBLACK 0
   #define MBAGE 1
   #define VYOUS 2
   #define DEPTH 4
   #define HEIGHT 512            /* Height of Bitmap 1 & 2 */
   #define THDHITE 64            /* Height of Bitmap 3 */
   #define WIDTH 640
   #define BHEIGHT 1028
   #define BWIDTH 640
   #define COLOURS 16
   #define RX_OFFSET 0
   #define RY_OFFSET 0
   #define ONEONE "Algorithms/"
   #define ONETWO "Ed"            /* Default Editor */
   #define ONETHREE "Text/"
   #define PSIZE 640
   #define PIECES 64
   #define MAXCHARPATH 250         /* Maximum characters in a path name */
   #define NUMOFOPT 62
   #define SLENGTH 15
   #define LISTMAX 100
   #define TABSIZE 7
   #define MAXILEN 20
   #define FUNCMAX 10
   #define RAYMAX 1
   #define LEVEL 1          /* Number of Y levels for the display array */
   #define MAXACROSS 10
   #define MEMMAX 50       /* Maximum members in the array map list */
   #define ARRAYMAX 1      /* Maximum number of arrays */
   #define RECUREDEPTH 100 /* Max recursion depth */
   #define VARMAX 10
   #define LETWIDTH 7
   #define CODEWIDTH 39     /* Maximum Allowable width of text in code display */
   #define COMPWIDTH 24     /* Max width of compare display */
   #define CARTX 22         /* Carts Starting X Position */
   #define CARTY 278        /* Carts Starting Y Position */
   #define NEXTVAR 54
   #define ICSTARTX 105
   #define ICSTARTY 236
   #define ADJUSTX 20
   #define ADJUSTY 19
   #define XPOS 89          /* Initial X  For End Of Cart Track */
   #define YPOS 318
   #define QSTILL 12
   #define STILL 25
   #define LSTILL 50
   #define SPACE 11
   #define UP 11
   #define DOWN -11
   #define A_BLACK 0L
   #define A_DGREY 1L
   #define A_GREY 2L
   #define A_LGREY 3L
   #define A_LLGREY 4L
   #define A_WHITE 5L
   #define A_RED 6L
   #define A_YELLOW 7L
   #define A_LGREEN 8L
   #define A_ORANGE 9L
   #define A_LBLUE 10L
   #define A_PURPLE 11L
   #define A_BROWN 12L
   #define A_DBLUE 13L
   #define A_DGREEN 14L
   #define A_BAGE 15L
   #define VAR 3
   #define HOLE 4
   #define VBB 5
   #define HBB 6
   #define FILL 7
   #define IAR 8
   #define IOFF 9
   #define ION 10
   #define START_L 0
   #define START_R 1
   #define START_U 2
   #define START_D 3
   #define ALEFT 4
   #define ARIGHT 5
   #define AUP 6
   #define ADOWN 7
   #define FIN_L 8
   #define FIN_R 9
   #define FIN_U 10
   #define FIN_D 11
   #define TERMINAL 12
   #define ICVAR 100
   #define ICRAY 200
   #define ICABS 300
   #define STOPBUT 50
   #define PLAYBUT 51
   #define EJECTBUT 52
   #define PAUSEBUT 53
   #define INFOBUT 54
   #define FFORBUT 55
   #define NOBUT 99
   #define F1BUTTON 60
   #define F2BUTTON 61
   #define F3BUTTON 62
   #define F4BUTTON 63
   #define F5BUTTON 64
   #define NUM1KEY 70
   #define NUM2KEY 71
   #define NUM3KEY 72
   #define NUM4KEY 73
   #define NUM5KEY 74
   #define EJECTKEY 90
   #define ESCKEY 91
   #define KEYBUFF 30
#endif

struct MapDem {
  WORD x;
  WORD y;
  WORD way;   /* 0-12 I.E. TERMINAL */
};

union value {
  int number;
  TEXT key;
};

struct Domain {
  SHORT xc;
  SHORT yc;
};

struct Arect {
  struct Domain min;
  struct Domain max;
};


typedef union value VALUE;

struct varbuild {
  TEXT *tname;
  TEXT *dexrep;
  TEXT sign[3];
};


/* A plan has two sets of Mapdem.  One for where animation character
   should turn (points) and another where the character finishes (eol
   end of line) .  Eol's should have a TERMINAL way */

struct Plan {
   TEXT *p_name;
   VALUE worth;
   struct MapDem points;
   struct MapDem eol;
};

struct Function {
  TEXT *f_label;
  TEXT occured[2];
};

typedef struct MapDem MAPDEM;
typedef struct MapDem * MAPDEMPTR;
typedef struct Function FUNC;
typedef struct Function * FUNCPTR;
typedef struct Plan PLAN;
typedef struct Plan * PLANPTR;
typedef struct varbuild VARBUILD;
typedef VARBUILD * VARBUILDPTR;
typedef struct Domain DOMAIN;
typedef DOMAIN * DOMAINPTR;
typedef struct Arect ARECT;
typedef ARECT * ARECTPTR;
