FS2_Open
Open source remastering of the Freespace 2 engine
tgautils.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 __TARGA_H
13 #define __TARGA_H
14 
15 #include "cfile/cfile.h"
16 
17 // --------------------
18 //
19 // Defines
20 //
21 // --------------------
22 
23 #define TARGA_ERROR_NONE 0
24 #define TARGA_ERROR_READING 1
25 #define TARGA_ERROR_WRITING 2
26 
27 // --------------------
28 //
29 // Prototypes
30 //
31 // --------------------
32 
33 int targa_read_header(const char *filename, CFILE *img_cfp = NULL, int *w = 0, int *h = 0, int *bpp = 0, ubyte *palette=NULL );
34 int targa_read_bitmap(const char *filename, ubyte *data, ubyte *palette, int dest_size, int cf_type = CF_TYPE_ANY );
35 int targa_write_bitmap(const char *filename, ubyte *data, ubyte *palette, int w, int h, int bpp);
36 
37 // The following are used by the tools\vani code.
38 int targa_compress(char *out, const char *in, int outsize, int pixsize, int bytecount);
39 int targa_uncompress( ubyte *dst, ubyte *src, int bitmap_width, int bytes_per_pixel );
40 
41 #endif // __TARGA_H
GLfloat GLfloat GLfloat GLfloat h
Definition: Glext.h:7280
int targa_uncompress(ubyte *dst, ubyte *src, int bitmap_width, int bytes_per_pixel)
Definition: cfile.h:28
GLuint in
Definition: Glext.h:9087
int targa_compress(char *out, const char *in, int outsize, int pixsize, int bytecount)
GLenum GLenum dst
Definition: Glext.h:5917
int targa_read_header(const char *filename, CFILE *img_cfp=NULL, int *w=0, int *h=0, int *bpp=0, ubyte *palette=NULL)
Definition: tgautils.cpp:361
char * filename
int targa_write_bitmap(const char *filename, ubyte *data, ubyte *palette, int w, int h, int bpp)
unsigned char ubyte
Definition: pstypes.h:62
GLubyte GLubyte GLubyte GLubyte w
Definition: Glext.h:5679
GLenum src
Definition: Glext.h:5917
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
int targa_read_bitmap(const char *filename, ubyte *data, ubyte *palette, int dest_size, int cf_type=CF_TYPE_ANY)
Definition: tgautils.cpp:503
#define CF_TYPE_ANY
Definition: cfile.h:42