#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) |
u7shape * | load_shape (char *filename) |
uint8 * | load_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 htoql | ( | x | ) | qtohl(x) |
Definition at line 47 of file shp2pcx.cc.
#define htoqs | ( | x | ) | qtohs(x) |
Definition at line 48 of file shp2pcx.cc.
#define qtohl | ( | x | ) | (x) |
Definition at line 35 of file shp2pcx.cc.
#define qtohs | ( | x | ) | (x) |
Definition at line 36 of file shp2pcx.cc.
uint8* load_palette | ( | char * | filename | ) |
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:
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] |