这是程序源码,估计ctx24.dat字模偏移量同样为0,我看了一下,有两套阿位伯数字,也就是说电话号码所用的阿拉数字字模有可能与其它地方的阿拉伯数字字模不相干,只有是独立的就可以改,否则无法改.
#include <stdio.h>
#include <Conio.h>
#include <graphics.h>
void initgr(void);
void drawmat(char*mat,int matsize,int x,int y,int color);
int main(void)
{
FILE*fp ;
char mat[32];
char bat[32]=
{
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
}
;
char c;
int k=0 ;
int h=0;
initgr();
if((fp=fopen("CTX16.DAT","rb"))==NULL)
{
fprintf(stderr,"Cannot open CTX16.DAT \
file.\ n ");
return 1 ;
}
while(!feof(fp))
{
c=getc(fp);
h++;
}
fseek(fp,0,SEEK_SET);
for(k=0;k<h/32;k++)
{
drawmat(bat,16,20,20,6);
fread(mat,32,1,fp);
drawmat(mat,16,20,20,11);
getch();
}
closegraph();
return 0 ;
}
void drawmat(char*mat,int matsize,int x,int y,int color)
{
int i,j,k,n ;
n=(matsize-1)/8+1 ;
for(j=0;j<matsize;j++)
for(i=0;i<n;i++)
for(k=0;k<8;k++)
if(mat[j*n+i]&(0x80>>k))putpixel(x+i*8+k,y+j,color);
}
void initgr(void)
{
int gd=DETECT,gm=0 ;
registerbgidriver(EGAVGA_driver);
initgraph(&gd,&gm,"");
}