home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fun CD 26
/
OTACD26.ISO
/
archive
/
game
/
kaqcut
/
kaqcut.lzh
/
MKOFF.C
< prev
Wrap
C/C++ Source or Header
|
1997-09-20
|
614b
|
30 lines
/* オフセット配列自動生成プログラム */
/* 最後のコンマは消してください。…0x56A800,}; */
/* ↑これを消す */
#include <stdio.h>
#include <stdlib.h>
main(int ac,char **av)
{
unsigned char buf[0x800];
int i;
FILE *fp;
if(ac<2) return 0;
fp=fopen(av[1],"rb");
if(fp==NULL) return 0;
printf("long offsets[]={");
for(i=0;i<0xB53;i++)
{
fread(buf,0x800,sizeof(unsigned char),fp);
if(buf[0]=='B' && buf[1]=='M' && buf[2]=='6')
printf("0x%lX,",ftell(fp)-0x800L);
}
fclose(fp);
printf("};");
return 1;
}