]> icculus.org git repositories - taylor/freespace2.git/blob - include/pcxutils.h
Initial revision
[taylor/freespace2.git] / include / pcxutils.h
1 /*
2  * $Logfile: /Freespace2/code/PcxUtils/pcxutils.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * header file for PCX utilities
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  *
13  * 
14  * 6     8/10/99 6:54p Dave
15  * Mad optimizations. Added paging to the nebula effect.
16  * 
17  * 5     2/05/99 12:52p Dave
18  * Fixed Glide nondarkening textures.
19  * 
20  * 4     12/01/98 4:46p Dave
21  * Put in targa bitmap support (16 bit).
22  * 
23  * 3     11/30/98 1:07p Dave
24  * 16 bit conversion, first run.
25  * 
26  * 2     10/07/98 10:53a Dave
27  * Initial checkin.
28  * 
29  * 1     10/07/98 10:50a Dave
30  * 
31  * 7     9/03/97 4:32p John
32  * changed bmpman to only accept ani and pcx's.  made passing .pcx or .ani
33  * to bm_load functions not needed.   Made bmpman keep track of palettes
34  * for bitmaps not mapped into game palettes.
35  * 
36  * 6     11/26/96 9:28a Allender
37  * get palette info when getting pcx info
38  * 
39  * 5     11/18/96 12:36p John
40  * Added code to dump screen to a PCX file.
41  * 
42  * 4     11/13/96 4:51p Allender
43  * started overhaul of bitmap manager.  bm_load no longer actually load
44  * the data, only the info for the bitmap.  Locking the bitmap now forces
45  * load when no data present (or will if bpp changes)
46  *
47  * $NoKeywords: $
48  */
49
50 #ifndef _PCXUTILS_H
51 #define _PCXUTILS_H
52
53 #include "pstypes.h"
54
55 /*
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 */
60
61 #define PCX_ERROR_NONE                          0
62 #define PCX_ERROR_OPENING                       1
63 #define PCX_ERROR_NO_HEADER             2
64 #define PCX_ERROR_WRONG_VERSION 3
65 #define PCX_ERROR_READING                       4
66 #define PCX_ERROR_NO_PALETTE            5
67 #define PCX_ERROR_WRITING                       6
68 #define PCX_ERROR_MEMORY                        7
69
70 extern int pcx_read_header(char *filename, int *w, int *h, ubyte *pal );
71 extern int pcx_read_bitmap_8bpp( char * filename, ubyte *org_data, ubyte *palette );
72 extern int pcx_read_bitmap_16bpp( char * filename, ubyte *org_data );
73 extern int pcx_read_bitmap_16bpp_aabitmap( char *filename, ubyte *org_data );
74 extern int pcx_read_bitmap_16bpp_nondark( char *filename, ubyte *org_data );
75
76
77 // Dumps a 8bpp bitmap to a file.
78 // Set rowoff to -w for upside down bitmaps.
79 extern int pcx_write_bitmap( char * filename, int w, int h, ubyte ** row_ptrs, ubyte * palette );
80
81
82 /*
83 #ifdef __cplusplus
84 }
85 #endif
86 */
87
88 #endif
89