/*
	Definition of the vga class
	2002 Jason Hunt
*/


class vgaclass
{
	public:

	vgaclass(void);
	~vgaclass(void);

	void text_mode ( void );
	void vga_mode ( void );
	void put_pixel(int x, int y, byte color);
	void show_screen_buffer(void);
	void clear_screen_buffer(void);
	void wait_retrace(void);
	void put_pal(byte colorno, byte r, byte g, byte b);
	void load_pall(char *filename);
	void draw_bitmap(byte *data,int x, int y, int x_size,int y_size);
	void un_setup_background( void );
	void blit_back(void);
	void blit_back_offset(int map_x);
	void set_background(char *the_bk) {background = the_bk;};

	unsigned char* get_back(void) { return(background);};
	unsigned char* get_screen(void) { return(vga);};
	unsigned char* get_buffer(void) { return(screen_buffer);};

private:

	unsigned char *vga;			// pointer to the vga frame buffer
	unsigned char *screen_buffer;   // the offscreen buffer
	unsigned char *background;      // another offscreen buffer
	int mode;

} vga;
