DataFile: add API to access spriteflags count/offset
[rofl0r-agsutils.git] / Targa.h
blobe689969322b3ed7b8eaff41c617fc146c6dc4128
1 #ifndef TARGA_H
2 #define TARGA_H
4 struct TargaHeader {
5 char idlength;
6 char colourmaptype;
7 char datatypecode;
8 short colourmaporigin;
9 short colourmaplength;
10 char colourmapdepth;
11 short x_origin;
12 short y_origin;
13 short width;
14 short height;
15 char bitsperpixel;
16 char imagedescriptor;
17 } __attribute__((packed, aligned (1)));
19 enum TargaImageType {
20 TIT_COLOR_MAPPED = 1,
21 TIT_TRUE_COLOR = 2,
22 TIT_BLACK_WHITE = 3,
23 TIT_RLE_COLOR_MAPPED = 9,
24 TIT_RLE_TRUE_COLOR = 10,
25 TIT_RLE_BLACK_WHITE = 11,
28 struct TargaFooter {
29 unsigned extensionareaoffset;
30 unsigned developerdirectoryoffset;
31 char signature[16];
32 char dot;
33 char null;
34 } __attribute__((packed, aligned (1)));
36 #define TARGA_FOOTER_SIGNATURE "TRUEVISION-XFILE"
38 #endif