Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
958 | leency | 1 | #pragma pack(push, 1) |
2 | typedef struct sTGAHeader |
||
3 | { |
||
4 | Byte BytesInIdentField; |
||
5 | Byte ColorMapType; // Color map type - 0 [no map] 1 [256 entry] |
||
6 | Byte ImageTypeCode; /* Image type |
||
7 | [0] No image data included |
||
8 | [1] Uncompressed color map image [4,6] |
||
9 | [2] Uncompressed RGB Image [16,24] |
||
10 | [3] Uncompressed Black & White |
||
11 | [9] RLE Color map image |
||
12 | [10] RLE RGB Image |
||
13 | [11] RLE Black & White |
||
14 | [32 | 33] compressed color map by Huffman, Delta, RLE |
||
15 | */ |
||
16 | Word ColorMapOrigin; // Offset of first color map entry |
||
17 | Word ColorMapLength; // Number of color map entries |
||
18 | Byte ColorMapEntrySize; // Number of bits per color map entries |
||
19 | Word XOrigin; |
||
20 | Word YOrigin; |
||
21 | Word Width; |
||
22 | Word Height; |
||
23 | Byte ImagePixelSize; // BPP |
||
24 | Byte ImageDescByte; // Flags |
||
25 | } sTGAHeader; |
||
26 | #pragma pack(pop) |
||
27 | |||
28 | class TGAFile |
||
29 | { |
||
30 | protected: |
||
31 | sTGAHeader Tga_head; |
||
32 | public: |
||
33 | Word width; |
||
34 | Word height; |
||
35 | Byte* buffer; |
||
36 | int LoadTGAFile(Byte* filebuff, Dword filesize); |
||
37 | }; |