shp2pcx.cc File Reference

#include "SDL_byteorder.h"
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include "exult_types.h"

Include dependency graph for shp2pcx.cc:

Go to the source code of this file.

Classes

struct  PCX_Header
struct  u7frame
struct  u7shape

Defines

#define qtohl(x)   (x)
#define qtohs(x)   (x)
#define htoql(x)   qtohl(x)
#define htoqs(x)   qtohs(x)

Functions

unsigned int read1 (FILE *f)
unsigned int read2 (FILE *f)
signed int read2signed (FILE *f)
unsigned int read4 (FILE *f)
u7shapeload_shape (char *filename)
uint8load_palette (char *filename)
static void writeline (FILE *dst, uint8 *buffer, int bytes)
void save_8 (FILE *dst, int width, int height, int pitch, uint8 *buffer)
void save_image (uint8 *pixels, uint8 *palette, int width, int height, char *filename)
int main (int argc, char *argv[])


Define Documentation

#define htoql (  )     qtohl(x)

Definition at line 47 of file shp2pcx.cc.

#define htoqs (  )     qtohs(x)

Definition at line 48 of file shp2pcx.cc.

#define qtohl (  )     (x)

Definition at line 35 of file shp2pcx.cc.

#define qtohs (  )     (x)

Definition at line 36 of file shp2pcx.cc.


Function Documentation

uint8* load_palette ( char *  filename  ) 

Definition at line 291 of file shp2pcx.cc.

References len, and read1().

Here is the call graph for this function:

u7shape* load_shape ( char *  filename  ) 

Definition at line 131 of file shp2pcx.cc.

References Ucscript::frame, u7shape::frames, u7shape::height, height, u7shape::num_frames, u7frame::pixels, read1(), read2(), read2signed(), read4(), u7shape::width, and width.

Referenced by main().

Here is the call graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 411 of file shp2pcx.cc.

References u7shape::frames, u7shape::height, load_palette(), load_shape(), u7shape::num_frames, u7frame::pixels, save_image(), and u7shape::width.

Here is the call graph for this function:

unsigned int read1 ( FILE *  f  ) 

Definition at line 93 of file shp2pcx.cc.

unsigned int read2 ( FILE *  f  ) 

Definition at line 100 of file shp2pcx.cc.

signed int read2signed ( FILE *  f  ) 

Definition at line 109 of file shp2pcx.cc.

unsigned int read4 ( FILE *  f  ) 

Definition at line 120 of file shp2pcx.cc.

void save_8 ( FILE *  dst,
int  width,
int  height,
int  pitch,
uint8 buffer 
)

Definition at line 356 of file shp2pcx.cc.

References writeline().

Here is the call graph for this function:

void save_image ( uint8 pixels,
uint8 palette,
int  width,
int  height,
char *  filename 
)

Definition at line 369 of file shp2pcx.cc.

References PCX_Header::bpp, PCX_Header::bytesperline, PCX_Header::color, PCX_Header::compression, PCX_Header::hdpi, htoqs, PCX_Header::manufacturer, PCX_Header::planes, PCX_Header::reserved, save_8(), PCX_Header::vdpi, PCX_Header::version, PCX_Header::x1, PCX_Header::x2, PCX_Header::y1, and PCX_Header::y2.

Here is the call graph for this function:

static void writeline ( FILE *  dst,
uint8 buffer,
int  bytes 
) [static]

Definition at line 333 of file shp2pcx.cc.

References Ucscript::finish.


Generated on Mon Jul 9 14:45:48 2007 for ExultEngine by  doxygen 1.5.1