]> icculus.org git repositories - taylor/freespace2.git/blob - include/tgautils.h
finished cfilesystem.
[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.3  2002/05/26 20:22:48  theoddone33
10  * Most of network/ works
11  *
12  * Revision 1.2  2002/05/04 04:36:56  theoddone33
13  * More changes, took out a lot of the sound stuff which will bite later but
14  * I don't care.
15  *
16  * Revision 1.1.1.1  2002/05/03 03:28:12  root
17  * Initial import.
18  *
19  * 
20  * 3     3/20/99 3:46p Dave
21  * Added support for model-based background nebulae. Added 3 new
22  * sexpressions.
23  * 
24  * 2     12/01/98 4:46p Dave
25  * Put in targa bitmap support (16 bit).
26  *  
27  * $NoKeywords: $
28  */
29
30
31 #ifndef __TARGA_H
32 #define __TARGA_H
33
34 #include "pstypes.h"
35
36 // --------------------
37 //
38 // Defines
39 //
40 // --------------------
41
42 #define TARGA_ERROR_NONE                        0
43 #define TARGA_ERROR_READING             1
44 #define TARGA_ERROR_WRITING             2
45
46 // --------------------
47 //
48 // Prototypes
49 //
50 // --------------------
51
52 int targa_read_header(char *filename, int *w, int *h, int *bpp, ubyte *palette=NULL );
53 int targa_read_bitmap(char *filename, ubyte *data, ubyte *palette, int dest_size );
54 int targa_write_bitmap(char *filename, ubyte *data, ubyte *palette, int w, int h, int bpp);
55
56 // The following are used by the tools\vani code.
57 int targa_compress(char *out, char *in, int outsize, int pixsize, int bytecount);
58 int targa_uncompress( ubyte *dst, ubyte *src, int bitmap_width, int bytes_per_pixel );
59
60 #endif // __TARGA_H
61