FS2_Open
Open source remastering of the Freespace 2 engine
pcxutils.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _PCXUTILS_H
13 #define _PCXUTILS_H
14 
15 #include "globalincs/pstypes.h"
16 #include "cfile/cfile.h"
17 
18 
19 /*
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 */
24 
25 #define PCX_ERROR_NONE 0
26 #define PCX_ERROR_OPENING 1
27 #define PCX_ERROR_NO_HEADER 2
28 #define PCX_ERROR_WRONG_VERSION 3
29 #define PCX_ERROR_READING 4
30 #define PCX_ERROR_NO_PALETTE 5
31 #define PCX_ERROR_WRITING 6
32 #define PCX_ERROR_MEMORY 7
33 
34 extern int pcx_read_header(const char *filename, CFILE *img_cfp = NULL, int *w = 0, int *h = 0, int *bpp = 0, ubyte *pal = NULL );
35 //extern int pcx_read_bitmap_8bpp( const char * filename, ubyte *org_data, ubyte *palette );
36 //extern int pcx_read_bitmap_16bpp( const char * filename, ubyte *org_data );
37 //extern int pcx_read_bitmap_16bpp_aabitmap( const char *filename, ubyte *org_data );
38 //extern int pcx_read_bitmap_16bpp_nondark( const char *filename, ubyte *org_data );
39 //extern int pcx_read_bitmap_32(const char *real_filename, ubyte *data );
40 extern int pcx_read_bitmap(const char *filename, ubyte *org_data, ubyte *pal, int byte_size, int aabitmap = 0, int nondark = 0, int cf_type = CF_TYPE_ANY);
41 
42 // Dumps a 8bpp bitmap to a file.
43 // Set rowoff to -w for upside down bitmaps.
44 extern int pcx_write_bitmap( const char * filename, int w, int h, ubyte ** row_ptrs, ubyte * palette );
45 
46 
47 /*
48 #ifdef __cplusplus
49 }
50 #endif
51 */
52 
53 #endif
GLfloat GLfloat GLfloat GLfloat h
Definition: Glext.h:7280
Definition: cfile.h:28
char * filename
unsigned char ubyte
Definition: pstypes.h:62
int pcx_read_bitmap(const char *filename, ubyte *org_data, ubyte *pal, int byte_size, int aabitmap=0, int nondark=0, int cf_type=CF_TYPE_ANY)
Definition: pcxutils.cpp:217
GLubyte GLubyte GLubyte GLubyte w
Definition: Glext.h:5679
int pcx_write_bitmap(const char *filename, int w, int h, ubyte **row_ptrs, ubyte *palette)
Definition: pcxutils.cpp:455
#define CF_TYPE_ANY
Definition: cfile.h:42
int pcx_read_header(const char *filename, CFILE *img_cfp=NULL, int *w=0, int *h=0, int *bpp=0, ubyte *pal=NULL)
Definition: pcxutils.cpp:40