void scdspmsg(coord row, coord col, attrib fore, attrib back, char * str);
void scattrib(attrib fore, attrib back, unsigned char c, short rep);
void sc_setnocursor(void);
void sc_clearscreen(void);
void sc_setnormalcursor(void);
short sc_remappalette(short index, long rgb);
short sc_setvideomode(short mode);
void sc_outtext(char *s);
void sc_settextposition(short row, short col);
void sc_settextcursor(short cursor);
unsigned char scread(attrib * fore, attrib * back);
void sccurpos(coord * row, coord * col);
void sccurset(coord row, coord col);
void scattribs(attrib color, coord y0, coord x0, coord y1, coord x1);

void scscroll(unsigned char numlines, attrib color, coord y0, coord x0, coord y1, coord x1, unsigned char dir);

void real_mouse(short *m1, short *m2, short *m3, short *m4);

int sc_init_graphics(void);

#define SCR_UP (unsigned char)0x06
#define SCR_DOWN (unsigned char)0x07

extern void click(void);

#ifndef __BORLANDC__

#define SC_EGA	_EGA
#define SC_VGA	_VGA
#define SC_CGA	_CGA
#define SC_HGC	_HGC

#define SC_C80	_TEXTC80
#define SC_BW80	_TEXTBW80

#define SC_CURSOR_UNDERLINE 0x0707
#define SC_CURSOR_BLOCK	    0x0007
#define SC_CURSOR_DOUBLE    0x0607
#define SC_CURSOR_NONE	    0x2000

#endif

#ifdef __BORLANDC__

#include <graphics.h>
#include <conio.h>

struct videoconfig {
	short numxpixels;	/* number of pixels on x axis */
	short numypixels;	/* number of pixels on y axis */
	short numtextcols;	/* number of text columns available */
	short numtextrows;	/* number of text rows available */
	short numcolors;	/* number of color indexes */
	short bitsperpixel;	/* number of bits per pixel */
	short numvideopages;	/* number of available video pages */
	short mode;		/* current video mode */
	short adapter;		/* active display adapter */
	short monitor;		/* active display monitor */
	short memory;		/* adapter video memory in K bytes */
};

#define SC_VGA	VGA
#define SC_EGA	EGA
#define SC_CGA	CGA
#define SC_HGC	HERCMONO

#define SC_C80	C80
#define SC_BW80	BW80

#define SC_MONO	3

#define SC_CURSOR_UNDERLINE	_NORMALCURSOR
#define SC_CURSOR_BLOCK		_SOLIDCURSOR
#define SC_CURSOR_DOUBLE	_NORMALCURSOR
#define SC_CURSOR_NONE		_NOCURSOR

struct rccoord {
	short row;
	short col;
};


#endif
