#define	frame	((char *) 0XE00000L)
#define	_enable	((char *) 0XE20000L)
#define	_colour	((char *) 0XE20001L)
#define	_origin	((short *) 0XE20002L)

struct _mickey {short x, y; char :5, b:3};
#define	mouse	((struct _mickey *) 0X7FFF0)
#define	ColourMap	((short *) 0xe30000L)
#define	MouseX		(*((short *) 0x7f400))
#define	MouseY		(*((short *) 0x7f402))
static unsigned char _mousetab[8] = {0, 4, 2, 6, 1, 5, 3, 7 };
#define _duartinp	(*((unsigned char *) 0x7f45b))
#define	MouseButtons	(_mousetab[(_duartinp>>1)&7])

#define	RelMouseX	FRED_GRAPHICS_MOUSEX
#define	RelMouseY	FRED_GRAPHICS_MOUSEY
#define	MouseBut	FRED_GRAPHICS_MOUSEB
#define	VLine		FRED_GRAPHICS_VLINE
#define	HLine		FRED_GRAPHICS_HLINE
#define	Offset		FRED_GRAPHICS_OFFSET
#define	Colour		FRED_GRAPHICS_COLOUR
#define	Enable		FRED_GRAPHICS_ENABLE
#define	UpdateColourMap	FRED_GRAPHICS_UPCMAP
#define	Clear		FRED_GRAPHICS_CLEAR
#define	HalfClear	FRED_GRAPHICS_HCLEAR
#define	Line		FRED_GRAPHICS_LINE
#define	Fill		FRED_GRAPHICS_FILL
#define ColFill		FRED_GRAPHICS_CFILL
#define	Triangle	FRED_GRAPHICS_TRIANGLE
#define	Trapeze		FRED_GRAPHICS_TRAPEZE
#define	Disc		FRED_GRAPHICS_DISC
#define	Ring		FRED_GRAPHICS_RING
#define	Plot		FRED_GRAPHICS_PLOT
#define	Paint		FRED_GRAPHICS_PAINT
#define	Textat		FRED_GRAPHICS_TEXTAT
#define	ReadFont	FRED_GRAPHICS_READFONT
#define	ShowSymbol	FRED_GRAPHICS_SHOWSYM
#define	ShowString	FRED_GRAPHICS_SHOWSTR
#define	Font		FRED_GRAPHICS_FONT
#define	FontHeight	FRED_GRAPHICS_FONTHT
#define	FontDepth	FRED_GRAPHICS_FONTDP
#define	MaxFontWidth	FRED_GRAPHICS_FONTWX
#define	MinFontWidth	FRED_GRAPHICS_FONTWN
#define	StringWidth	FRED_GRAPHICS_STRNGW
#define	CharHeight	FRED_GRAPHICS_CHARHT
#define	CharDepth	FRED_GRAPHICS_CHARDP
#define	CharWidth	FRED_GRAPHICS_CHARWD
#define	TextXPos	FRED_GRAPHICS_XPOS
#define	TextYPos	FRED_GRAPHICS_YPOS
#define	Poly		FRED_GRAPHICS_POLY
#define	ClosePoly	FRED_GRAPHICS_CLOSEPOLY
#define	ShowI		FRED_GRAPHICS_SHOWI
#define	ShowR		FRED_GRAPHICS_SHOWR
#define	ShowF		FRED_GRAPHICS_SHOWF
#define	SHex1		FRED_GRAPHICS_SHEX1
#define	SHex2		FRED_GRAPHICS_SHEX2
#define	SHex4		FRED_GRAPHICS_SHEX4
#define	SHex		FRED_GRAPHICS_SHEX

#define	Black		0
#define	Red		1
#define	Green		2
#define	Blue		4
#define	Yellow		(Red+Green)
#define	Magenta		(Red+Blue)
#define	Cyan		(Blue+Green)
#define	White		(Red+Green+Blue)
#define	MouseLeft	1
#define	MouseMiddle	2
#define	MouseRight	4
