OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Functions
pcx.h File Reference

PCX image reader. More...

#include "TextureManager.h"
Include dependency graph for pcx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int pcxCheck (const char *filename)
 Check if a file is a valid PCX image. More...
 
int pcxLoad (const char *filename, unsigned char **image, unsigned int *width, unsigned int *height, ColorMode *mode, unsigned int *bpp)
 Load a PCX image file into a buffer. More...
 

Detailed Description

PCX image reader.

Based on official technical documentation from ZSoft: http://bespin.org/~qz/pc-gpe/pcx.txt

Author
xythobuz

Definition in file pcx.h.

Function Documentation

int pcxCheck ( const char *  filename)

Check if a file is a valid PCX image.

Parameters
filenamepath of file to read
Returns
0 on success

Definition at line 17 of file pcx.cpp.

int pcxLoad ( const char *  filename,
unsigned char **  image,
unsigned int *  width,
unsigned int *  height,
ColorMode mode,
unsigned int *  bpp 
)

Load a PCX image file into a buffer.

Parameters
filenamepath of file to read
imageplace where allocated buffer of size (width * height * (bpp / 8)) will be allocated
widthplace where image width will be stored
heightplace where image height will be stored
modeplace where Color Mode of image will be stored
bppplace where pixel width will be stored (8, 24, 32)
Returns
0 on success

Definition at line 69 of file pcx.cpp.