home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
VGAGRAPH.ZIP
/
TESTLIB.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-25
|
857b
|
42 lines
#include <conio.h>
#include <stdlib.h>
#include <dos.h>
#include <stdio.h>
#include "allproc.h"
#include "palette.h"
#include "bgi.h"
#include "mouse.h"
#include "char.h"
void main()
{ int i,j,x,y,dx,dy;
char ch;
char pal[780];
Image W;
if (VGA360x480()!=0) abort();
for (i=0;i<64;i++) for (j=0;j<3;j++) pal[i*3+j]=i;
setallpalette(pal);
barpat(0,0,MaxX,MaxY,0,63);
if (ldfontbgi("",trip)!=0) exit(1);
sizechar(2.2,6,0);
bgitext(10,100,"GRAPHLIB",63,0,0);
bgitext(13,102,"GRAPHLIB",0,63,0);
bgitext(11,101,"GRAPHLIB",0,63,2);
getimage(0,0,MaxX+1,MaxY+1,&W);
clearscr(0);
putimage(0,0,W,0);
initmouse(0,0,63);
do
{
while (kbhit()) ch=getch();
if (mousekey()!=0) putpixel(x0-1,y0-1,63);
}
while(ch!=27);
closemouse();
TextMode();
}