FS2_Open
Open source remastering of the Freespace 2 engine
pcxutils.cpp File Reference
#include "cfile/cfile.h"
#include "pcxutils/pcxutils.h"
#include "palman/palman.h"
#include "bmpman/bmpman.h"

Go to the source code of this file.

Classes

struct  PCXHeader
 
struct  COLOR32
 

Functions

int pcx_read_header (const char *real_filename, CFILE *img_cfp, int *w, int *h, int *bpp, ubyte *pal)
 
int pcx_read_bitmap (const char *real_filename, ubyte *org_data, ubyte *pal, int byte_size, int aabitmap, int nondark, int cf_type)
 
int pcx_encode_byte (ubyte byt, ubyte cnt, FILE *fid)
 
int pcx_encode_line (ubyte *inBuff, int inLen, FILE *fp)
 
int pcx_write_bitmap (const char *real_filename, int w, int h, ubyte **row_ptrs, ubyte *palette)
 
char * pcx_errormsg (int error_number)
 

Variables

char pcx_error_messages []
 

Function Documentation

int pcx_encode_byte ( ubyte  byt,
ubyte  cnt,
FILE *  fid 
)

Definition at line 389 of file pcxutils.cpp.

int pcx_encode_line ( ubyte inBuff,
int  inLen,
FILE *  fp 
)

Definition at line 408 of file pcxutils.cpp.

char* pcx_errormsg ( int  error_number)

Definition at line 537 of file pcxutils.cpp.

int pcx_read_bitmap ( const char *  real_filename,
ubyte org_data,
ubyte pal,
int  byte_size,
int  aabitmap,
int  nondark,
int  cf_type 
)

Definition at line 217 of file pcxutils.cpp.

int pcx_read_header ( const char *  real_filename,
CFILE img_cfp,
int w,
int h,
int bpp,
ubyte pal 
)

Definition at line 40 of file pcxutils.cpp.

int pcx_write_bitmap ( const char *  real_filename,
int  w,
int  h,
ubyte **  row_ptrs,
ubyte palette 
)

Definition at line 455 of file pcxutils.cpp.

Variable Documentation

char pcx_error_messages[]
Initial value:
= {
"No error.\0"
"Error opening file.\0"
"Couldn't read PCX header.\0"
"Unsupported PCX version.\0"
"Error reading data.\0"
"Couldn't find palette information.\0"
"Error writing data.\0"
}

Definition at line 525 of file pcxutils.cpp.