/***
****  QuBE --- Super VGA graphics routines.
****
****  These routines date back awhile, and need some serious upgrading.
****  But they'll work on any VESA 1.0 system, so that's good.
****
****  Please don't use these routines in anything other than QuBE.
****  The author will not respond to *ANY* requests for help with
****  these routines.
***/

/*
**  Graphics stuff
*/

#define M80x25x16      0x003

#define M640x400x256   0x100
#define M640x480x256   0x101
#define M800x600x256   0x103
#define M1024x768x256  0x105
#define M1280x1024x256 0x107

enum {  BLACK = 0, BLUE, GREEN, AQUA, RED, VIOLET, BROWN, LGRAY,
	GRAY, LBLUE, LGREEN, LAQUA, LRED, LVIOLET, YELLOW, WHITE };

extern int LimitX1;
extern int LimitX2;
extern int LimitY1;
extern int LimitY2;

extern int InitScrn(short VidMode);
extern void LineXOR(int X1, int Y1, int X2, int Y2, int Color);
extern void Line(int X1, int Y1, int X2, int Y2, int Color);
extern void Pixel(int X, int Y, int Color);
extern void PixelXOR(int X, int Y, int Color);
extern void BoxFillXOR(int X1, int Y1, int X2, int Y2, int Color);
extern void BoxFill(int X1, int Y1, int X2, int Y2, int Color);
extern void BoxOutlnXOR(int X1, int Y1, int X2, int Y2, int Color);
extern void BoxOutln(int X1, int Y1, int X2, int Y2, int Color);
extern int PutCharG(int X1, int Y1, char *font, char ch, char color);
extern int LenCharG(char *font, char ch);
extern int PrintG(int X1, int Y1, char *font, char *string, char color);
extern int LenG(char *font, char *string);
extern int SetColors(char *colordata, int firstcolor, int totalcolors);
extern int GetColors(char *colordata, int firstcolor, int totalcolors);
extern int Gprintf(int x, int y, char *font, int color, char *format, ... );
extern void GetBitmap(int X, int Y, int width, int height, char *buffer);
extern void PutBitmap(int X, int Y, int width, int height, char *buffer);
extern void PutBitmapXOR(int X, int Y, int width, int height, char *buffer);
extern void PutSprite(int X, int Y, int width, int height, char *buffer);
extern void PutSprite0(int X, int Y, int width, int height, char *buffer);
extern void MoveBitmap(int SourceX, int SourceY, int width, int height, int DestX, int DestY);
extern void WhilePicture(void);
extern void WhileRefresh(void);

/*
**  Mouse stuff
*/

enum {
	CURarrow = 0, CURclock, CURibeam, CURpencil, CURcross
	};

typedef struct {
	int HotX;
	int HotY;
	int Width;
	int Height;
	char Pic[1024];
	} Cursor;

extern int MouseDisp;
extern int MouseX;
extern int MouseY;
extern int WhereSave;

extern int InitMouse(int ScrnWidth, int ScrnHeight, int XSpeed, int YSpeed);
extern void MouseOn(void);
extern void MouseOff(void);
extern void MouseCursor(void *Cursor);
extern void KillMouse(void);
extern void StdCursor(int CursorNo);
extern int MouseButton(void);
extern void ReadMouse(void);

/*
**  The display font(s).
*/

extern char Sans14N[8192];

/*
**  Keyboard stuff.
*/

extern int KeyASCII();
extern int KeyScan();
extern int ReadKeyASCII(void);
extern int ReadKeyScan(void);
extern int KeyStatus(void);
extern int KeyFlags(void);
extern int EReadKeyASCII(void);
extern int EReadKeyScan(void);
extern int EKeyStatus(void);
extern int EKeyFlags(void);
extern int IsEKeybd(void);

