]> icculus.org git repositories - taylor/freespace2.git/blob - include/tgautils.h
Initial revision
[taylor/freespace2.git] / include / tgautils.h
1 /*
2  * $Logfile: /Freespace2/code/TgaUtils/TgaUtils.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  *
8  * $Log$
9  * Revision 1.1  2002/05/03 03:28:12  root
10  * Initial revision
11  *
12  * 
13  * 3     3/20/99 3:46p Dave
14  * Added support for model-based background nebulae. Added 3 new
15  * sexpressions.
16  * 
17  * 2     12/01/98 4:46p Dave
18  * Put in targa bitmap support (16 bit).
19  *  
20  * $NoKeywords: $
21  */
22
23
24 #ifndef __TARGA_H
25 #define __TARGA_H
26
27 // --------------------
28 //
29 // Defines
30 //
31 // --------------------
32
33 #define TARGA_ERROR_NONE                        0
34 #define TARGA_ERROR_READING             1
35 #define TARGA_ERROR_WRITING             2
36
37 // --------------------
38 //
39 // Prototypes
40 //
41 // --------------------
42
43 int targa_read_header(char *filename, int *w, int *h, int *bpp, ubyte *palette=NULL );
44 int targa_read_bitmap(char *filename, ubyte *data, ubyte *palette, int dest_size );
45 int targa_write_bitmap(char *filename, ubyte *data, ubyte *palette, int w, int h, int bpp);
46
47 // The following are used by the tools\vani code.
48 int targa_compress(char *out, char *in, int outsize, int pixsize, int bytecount);
49 int targa_uncompress( ubyte *dst, ubyte *src, int bitmap_width, int bytes_per_pixel );
50
51 #endif // __TARGA_H
52