2 * $Logfile: /Freespace2/code/PcxUtils/pcxutils.h $
7 * header file for PCX utilities
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 6 8/10/99 6:54p Dave
15 * Mad optimizations. Added paging to the nebula effect.
17 * 5 2/05/99 12:52p Dave
18 * Fixed Glide nondarkening textures.
20 * 4 12/01/98 4:46p Dave
21 * Put in targa bitmap support (16 bit).
23 * 3 11/30/98 1:07p Dave
24 * 16 bit conversion, first run.
26 * 2 10/07/98 10:53a Dave
29 * 1 10/07/98 10:50a Dave
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.
36 * 6 11/26/96 9:28a Allender
37 * get palette info when getting pcx info
39 * 5 11/18/96 12:36p John
40 * Added code to dump screen to a PCX file.
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)
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
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 );
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 );