【 tulaoshi.com - 编程语言 】
/*--------本程序由sunny整理完成-----------*/
*** 基于DOS平台,在Turbo c2.0中调试通过 **
*** 原码见于http://sunny1979.icpcn.com http://tchome.icpcn.com ***/#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;i16;i++)
for(n=0;nROW;n++)
for(j=0;j2;j++)
for(k=0;k8;k++)
for(m=0;mCOL;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);
}
点这里下载