Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <png.h>
#include <stdio.h>
#include <stdlib.h>
#include "../endianness.h"
#include <assert.h>
Go to the source code of this file.
Classes | |
struct | BITMAPINFOHEADER |
struct | BITMAPFILEHEADER |
struct | RGBQUAD |
Typedefs | |
typedef unsigned int | DWORD |
typedef int | LONG |
typedef unsigned short | WORD |
typedef unsigned char | BYTE |
Functions | |
static unsigned char * | LoadTex (char *FileName, int &sizeX, int &sizeY) |
holds all the textures in a huge hash table More... | |
void | png_write (const char *myfile, unsigned char *data, unsigned int width, unsigned int height, bool alpha, char bpp) |
int | main (int argc, char **argv) |
Variables | |
const int | ltwid = 256 |
const int | lthei = 256 |
const int | SIZEOF_BITMAPFILEHEADER = sizeof (WORD)+sizeof (DWORD)+sizeof (WORD)+sizeof (WORD)+sizeof (DWORD) |
Defined for gcc which pads the size of structs. More... | |
const int | SIZEOF_BITMAPINFOHEADER |
Defined for gcc which pads the size of structs. More... | |
const int | SIZEOF_RGBQUAD = sizeof (BYTE)*4 |
defined for gcc which pads size of structs (not entirely necessary) More... | |
typedef unsigned char BYTE |
Definition at line 12 of file bmp_to_png.cpp.
Definition at line 9 of file bmp_to_png.cpp.
Definition at line 10 of file bmp_to_png.cpp.
typedef unsigned short WORD |
Definition at line 11 of file bmp_to_png.cpp.
holds all the textures in a huge hash table
Definition at line 72 of file bmp_to_png.cpp.
References BITMAPINFOHEADER::biBitCount, BITMAPINFOHEADER::biHeight, BITMAPINFOHEADER::biWidth, i, j, k, le16_to_cpu, le32_to_cpu, SIZEOF_BITMAPFILEHEADER, VSFileSystem::vs_close(), and VSFileSystem::vs_open().
Referenced by main().
void png_write | ( | const char * | myfile, |
unsigned char * | data, | ||
unsigned int | width, | ||
unsigned int | height, | ||
bool | alpha, | ||
char | bpp | ||
) |
Definition at line 128 of file bmp_to_png.cpp.
References height, i, VSFileSystem::vs_close(), VSFileSystem::vs_open(), and width.
Referenced by main().
const int lthei = 256 |
Definition at line 7 of file bmp_to_png.cpp.
const int ltwid = 256 |
Definition at line 6 of file bmp_to_png.cpp.
const int SIZEOF_BITMAPFILEHEADER = sizeof (WORD)+sizeof (DWORD)+sizeof (WORD)+sizeof (WORD)+sizeof (DWORD) |
Defined for gcc which pads the size of structs.
Definition at line 64 of file bmp_to_png.cpp.
Referenced by LoadTex().
const int SIZEOF_BITMAPINFOHEADER |
defined for gcc which pads size of structs (not entirely necessary)
Definition at line 69 of file bmp_to_png.cpp.