MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / makealpha8

Function makealpha8

tools/fshtool.c:378–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376/* write a line of alpha channel data text */
377
378int makealpha8(FILE **alpha8,char *fname,int *pal)
379{
380 unsigned char alpha[256];
381 char hex[513];
382 int i;
383
384 if (*alpha8==NULL) {
385 *alpha8=fopen("alpha8.dat","wt");
386 if (*alpha8==NULL) return 0;
387 }
388 for (i=0;i<256;i++) alpha[i]=(unsigned char)(pal[i]>>24);
389 hexify(alpha,256,hex);
390 fprintf(*alpha8,"%s\n%s\n",fname,hex);
391 return 1;
392}
393
394/* unpack a DXT packed color */
395

Callers 1

fsh_to_bmpFunction · 0.85

Calls 1

hexifyFunction · 0.85

Tested by

no test coverage detected