home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
VGAGRAPH.ZIP
/
PIXEL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-21
|
1KB
|
63 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;
Image W;
char ch;
if (EGA640x480()!=0) abort();
for (i=0;i<=MaxX;i++)
for (j=0;j<=MaxY;j++)
putpixel(i,j,((i+j)/16)%16);
for (i=0;i<=MaxY;i++) line(0,0,MaxX,i,i+j);
bars(100,150,100,100,10); xortext(108,200,"Simple Bar",0);
barpat(220,150,100,100,0,10); xortext(228,200,"Pattern",0);
bar3d(340,150,100,100,4,7); xortext(348,200,"3D extern",0);
bar3dz(460,150,100,100,4,7); xortext(468,200,"3D intern",0);
bar3d(100,270,468,108,4,7);
bar3dz(104,274,460,100,4,7); xortext(120,280,"Example combination bar",15);
if (ldfontbgi("",trip)!=0) exit(1);
sizechar(2.7,2,0);
bgitext(120,280,"GRAPHLIB",15,0,0);
bgitext(123,282,"GRAPHLIB",0,15,0);
bgitext(121,281,"GRAPHLIB",7,0,0);
getch();
getimage(0,0,MaxX+1,MaxY+1,&W);
clearscr(0);
teletext(200,200," All screen clear ",15,1);
getch();
putimage(0,0,W,0);
initmouse(200,200,15);
do
{
while (kbhit()) ch=getch();
if (mousekey()!=0) putpixel(x0-1,y0-1,63);
}
while(ch!=27);
closemouse();
TextMode();
}