home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
67.img
/
VGAKIT34.ZIP
/
STICKS.C
< prev
next >
Wrap
Text File
|
1990-05-04
|
1KB
|
77 lines
/*
VGAKIT Version 3.4
Copyright 1988,89,90 John Bridges
Free for use in commercial, shareware or freeware applications
STICKS.C
*/
extern int tseng;
extern int tseng4;
extern int trident;
extern int video7;
extern int paradise;
extern int chipstech;
extern int ativga;
extern int everex;
extern int aheada;
extern int aheadb;
extern int oaktech;
extern int vga512;
extern int maxx,maxy;
extern void bline(int x1,int y1,int x2,int y2,int color,void (*func)());
extern void xpoint(),xpoint13x();
main(argc,argv)
int argc;
char **argv;
{
unsigned char palbuf[256][3];
int svga;
unsigned int color;
unsigned int x,y,mx;
void (*func)();
for(x=0;x<256;x++)
{
y=x&63;
if(x&64) y=63-y;
palbuf[x][0]=y;
palbuf[x][1]=y*y/63;
y=(x>>1)&63;
if(x&128) y=63-y;
palbuf[x][2]=y;
}
svga=whichvga();
if(svga)
{
svgamode();
func=xpoint;
}
else
{
mode13x();
func=xpoint13x;
}
setmany(palbuf,0,256);
if(maxx>maxy)
mx=maxx;
else
mx=maxy;
for(x=0;x<mx;x++)
{
for(y=0;y<mx;y++)
{
bline(x,y,y,x,y&0xff,func);
}
}
getch();
txtmode();
}