69 lines
868 B
Plaintext
69 lines
868 B
Plaintext
#include <vga.h>
|
|
|
|
int Initialize (void)
|
|
{
|
|
if ( vga_init () == 0 )
|
|
return 1;
|
|
else
|
|
return 0;
|
|
}
|
|
|
|
void SetMode (int newmode)
|
|
{
|
|
vga_setmode (newmode);
|
|
}
|
|
|
|
int GetMode (void)
|
|
{
|
|
return vga_getcurrentmode ();
|
|
}
|
|
|
|
int MaxWidth (void)
|
|
{
|
|
return vga_getxdim ();
|
|
}
|
|
|
|
int MaxHeight (void)
|
|
{
|
|
return vga_getydim ();
|
|
}
|
|
|
|
void Clear (void)
|
|
{
|
|
vga_clear ();
|
|
}
|
|
void SetColour (int colour)
|
|
{
|
|
vga_setcolor (colour);
|
|
}
|
|
|
|
void SetEGAcolour (int colour)
|
|
{
|
|
vga_setegacolor (colour);
|
|
}
|
|
|
|
void SetRGB (int red, int green, int blue)
|
|
{
|
|
vga_setrgbcolor (red, green, blue);
|
|
}
|
|
|
|
void DrawLine (int x0, int y0, int dx, int dy)
|
|
{
|
|
vga_drawline (x0, y0, x0 + dx, y0 + dy);
|
|
}
|
|
|
|
void Plot (int x, int y)
|
|
{
|
|
vga_drawpixel (x, y);
|
|
}
|
|
|
|
int ThisColour (int x, int y)
|
|
{
|
|
return vga_getpixel (x, y);
|
|
}
|
|
|
|
void GetKey (char *ch)
|
|
{
|
|
*ch = vga_getkey ();
|
|
}
|