Classes | Defines | Functions | Variables

src/util/src/TextureData.cpp File Reference

#include "../pch.h"

Go to the source code of this file.

Classes

struct  BMP_SIGNATURE
struct  BITMAP_FILEHEADER
struct  BITMAP_HEADER
struct  RGBA
struct  BGRA
struct  BGR
struct  BGR16

Defines

#define BITMAP_FILEHEADER_SIZE   14
#define SAVEEXIT(rs)
#define CHECK(_b)   if(_b){fclose(file);return false;}

Functions

bool loadUnknown (const wchar *filename, int &width, int &height, Pixel **outData)
bool loadTextureData (const wchar *colorFilename, const wchar *normalFilename, const wchar *heightFilename, TextureData &out)
uint myShiftRightByMask (uint Color, uint Mask, uint DistributeToBits)
bool loadBMP (const wchar *filename, int &width, int &height, Pixel **outData)
 Load a BMP file.
bool myLoadUncompressedTGA (int &width, int &height, Pixel **outData, FILE *datei)
bool myLoadCompressedTGA (int &width, int &height, Pixel **outData, FILE *datei)
bool loadTGA (const wchar *filename, int &width, int &height, Pixel **outData)
 Load a TGA file.

Variables

const BMP_SIGNATURE bmpSignature
const unsigned short int BITMAP_SIGNATURE = bmpSignature.s

Define Documentation

#define BITMAP_FILEHEADER_SIZE   14

Definition at line 188 of file TextureData.cpp.

#define CHECK (   _b  )     if(_b){fclose(file);return false;}
#define SAVEEXIT (   rs  ) 
Value:
{\
                if(file){fclose(file);file=0;}\
                SAVEFREE(m_BitmapData);\
                SAVEFREE(Line);\
                return rs;}

Function Documentation

bool loadBMP ( const wchar filename,
int &  width,
int &  height,
Pixel **  outData 
)

Load a BMP file.

Definition at line 275 of file TextureData.cpp.

bool loadTextureData ( const wchar colorFilename,
const wchar normalFilename,
const wchar heightFilename,
TextureData out 
)

Load a texture from a file. This function combines a color, a normal, and a heigh map into a texture, which contains a color and a detail mip map array.

Definition at line 39 of file TextureData.cpp.

bool loadTGA ( const wchar filename,
int &  width,
int &  height,
Pixel **  outData 
)

Load a TGA file.

Definition at line 692 of file TextureData.cpp.

bool loadUnknown ( const wchar filename,
int &  width,
int &  height,
Pixel **  outData 
) [inline]

Definition at line 21 of file TextureData.cpp.

bool myLoadCompressedTGA ( int &  width,
int &  height,
Pixel **  outData,
FILE *  datei 
)

Definition at line 567 of file TextureData.cpp.

bool myLoadUncompressedTGA ( int &  width,
int &  height,
Pixel **  outData,
FILE *  datei 
)

Definition at line 524 of file TextureData.cpp.

uint myShiftRightByMask ( uint  Color,
uint  Mask,
uint  DistributeToBits 
)

Definition at line 240 of file TextureData.cpp.


Variable Documentation

const unsigned short int BITMAP_SIGNATURE = bmpSignature.s

Definition at line 179 of file TextureData.cpp.

Definition at line 178 of file TextureData.cpp.