Open source remastering of the Freespace 2 engine
tgautils.h File Reference
#include "cfile/cfile.h"

Go to the source code of this file.


#define TARGA_ERROR_NONE   0


int targa_read_header (const char *filename, CFILE *img_cfp=NULL, int *w=0, int *h=0, int *bpp=0, ubyte *palette=NULL)
int targa_read_bitmap (const char *filename, ubyte *data, ubyte *palette, int dest_size, int cf_type=CF_TYPE_ANY)
int targa_write_bitmap (const char *filename, ubyte *data, ubyte *palette, int w, int h, int bpp)
int targa_compress (char *out, const char *in, int outsize, int pixsize, int bytecount)
int targa_uncompress (ubyte *dst, ubyte *src, int bitmap_width, int bytes_per_pixel)

Macro Definition Documentation

#define TARGA_ERROR_NONE   0

Definition at line 23 of file tgautils.h.


Definition at line 24 of file tgautils.h.


Definition at line 25 of file tgautils.h.

Function Documentation

int targa_compress ( char *  out,
const char *  in,
int  outsize,
int  pixsize,
int  bytecount 
int targa_read_bitmap ( const char *  filename,
ubyte data,
ubyte palette,
int  dest_size,
int  cf_type = CF_TYPE_ANY 

Definition at line 503 of file tgautils.cpp.

int targa_read_header ( const char *  filename,
CFILE img_cfp = NULL,
int w = 0,
int h = 0,
int bpp = 0,
ubyte palette = NULL 

Definition at line 361 of file tgautils.cpp.

int targa_uncompress ( ubyte dst,
ubyte src,
int  bitmap_width,
int  bytes_per_pixel 
int targa_write_bitmap ( const char *  filename,
ubyte data,
ubyte palette,
int  w,
int  h,
int  bpp