Difference between revisions of "Targa.c"

From Organic Design wiki
m
 
(add defaults generated by "the shop")
Line 1: Line 1:
 
+
typedef struct {
   putc(0,fptr);
+
   char  idlength = 0;
   putc(0,fptr);
+
   char  colourmaptype = 0;
   putc(2,fptr);                         /* uncompressed RGB */
+
   char  datatypecode = 0;
   putc(0,fptr); putc(0,fptr);
+
   short int colourmaporigin = 512;
   putc(0,fptr); putc(0,fptr);
+
   short int colourmaplength = 0;
   putc(0,fptr);
+
   char  colourmapdepth = 0;
   putc(0,fptr); putc(0,fptr);           /* X origin */
+
   short int x_origin = 0;
   putc(0,fptr); putc(0,fptr);          /* y origin */
+
   short int y_origin = 0;
  putc((width & 0x00FF),fptr);
+
   short width = 400;
   putc((width & 0xFF00) / 256,fptr);
+
   short height = 300;
   putc((height & 0x00FF),fptr);
+
   char  bitsperpixel = 8;
   putc((height & 0xFF00) / 256,fptr);
+
   char  imagedescriptor = ' ';
   putc(24,fptr);                       /* 24 bit bitmap */
+
} HEADER;
  putc(0,fptr);
 

Revision as of 09:33, 3 July 2006

typedef struct {

  char  idlength = 0;
  char  colourmaptype = 0;
  char  datatypecode = 0;
  short int colourmaporigin = 512;
  short int colourmaplength = 0;
  char  colourmapdepth = 0;
  short int x_origin = 0;
  short int y_origin = 0;
  short width = 400;
  short height = 300;
  char  bitsperpixel = 8;
  char  imagedescriptor = ' ';

} HEADER;