This commit is contained in:
Frater 2017-09-24 01:45:36 +02:00
commit 43352ff262
1291 changed files with 220976 additions and 0 deletions

42
START/READP.C Normal file
View file

@ -0,0 +1,42 @@
struct st_readp
{
int magic;
int wid;
int hig;
int cols;
int add;
};
void readp(char *dest,int row,char *src)
{
int bytes,a,b;
struct st_readp *hdr;
hdr=(struct st_readp *)src;
if(row==-1)
{
memcpy(dest,src+16,hdr->cols*3);
return;
}
if(row>=hdr->hig) return;
src+=hdr->add*16;
while(row)
{
src+=*(int *)src;
src+=2;
row--;
}
bytes=*(int *)src;
src+=2;
while(bytes--)
{
a=*src++;
if(a&0x80)
{
b=*src++;
bytes--;
a&=0x7f;
while(a--) *dest++=b;
}
else *dest++=a;
}
}