#include \"conio.h\"
#include \"stdio.h\"
#include \"graphics.h\"
#include \"stdlib.h\"
#include \"dos.h\"
void *buffer;
FILE *fp;
void hz(int x,int y,int a,int COL,int b,char *s)
{
int ROW;
char buffer[32];
register m,n,i,j,k;
unsigned char qh,wh;
unsigned long offset;
ROW=COL;
while(*s)
{
qh=*(s)-0xa0;
wh=*(s+1)-0xa0;
offset=(94*(qh-1)+(wh-1))*32L;
fseek(fp,offset,SEEK_SET);
fread(buffer,32,1,fp);
for (i=0;i<16;i++)
for(n=0;n<ROW;n++)
for(j=0;j<2;j++)
for(k=0;k<8;k++)
for(m=0;m<COL;m++)
if (((buffer[i*2+j]>>(7-k))&0x1)!=NULL)
putpixel(x+8*j*COL+k*COL+m,y+i*ROW+n,b);
s+=2;
x+=a;
}
}
main()
{
int GD=DETECT,GM;
initgraph(&GD,&GM,\"\");
if ((fp=fopen(\"hzk16\",\"rb\"))==NULL)
{ printf(\"Can\'t open haz16,Please add it\");
getch(); closegraph(); exit(0);
}
hz(342,245,25,1,4,\"确定\");
getch();
closegraph();
close(fp);
clrscr();
exit(0);
}