#include <stdio.h>
#include <string.h>
#define UC unsigned char
#define US unsigned short
#define UI unsigned int
#define D 128
#define S (18+D*D*3)
void p(UC *t,US x,US y, UI c){t+=D*y*3+x*3;*t++=c&0xFF;*t++=(c&0xFF00)>>8;*t=(c&0xFF0000)
>>16;}int main(){int x,y,i;UC d[S],*t=d+18;memset(d,0,18);memset(t,0xFF,S-18);*(d+2)=2;*(
US*)(d+12)=D;*(US*)(d+14)=D;*(d+16)=24;for(y=0;y<D;y++)for(x=0;x+y<D;x++)(!(x&y))?p(t,x,y
,0xE16F00):p(t,D-x,D-y,0x1E90FF);FILE*fp=fopen("s.tga","wb");fwrite(d,1,S,fp);fclose(fp);}