WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ddslib.cpp File Reference
#include "ddslib.h"
Include dependency graph for ddslib.cpp:

Go to the source code of this file.

Classes

union  floatSwapUnion
 

Macros

#define DDSLIB_C
 

Functions

int DDSLittleLong (int src)
 
short DDSLittleShort (short src)
 
float DDSLittleFloat (float src)
 
int DDSBigLong (int src)
 
short DDSBigShort (short src)
 
float DDSBigFloat (float src)
 
static void DDSGetColorBlockColors (ddsColorBlock_t *block, ddsColor_t colors[4])
 

 
static void DDSDecodeColorBlock (unsigned int *pixel, ddsColorBlock_t *block, int width, unsigned int colors[4])
 
static void DDSDecodeAlphaExplicit (unsigned int *pixel, ddsAlphaBlockExplicit_t *alphaBlock, int width, unsigned int alphaZero)
 
static void DDSDecodeAlpha3BitLinear (unsigned int *pixel, ddsAlphaBlock3BitLinear_t *alphaBlock, int width, unsigned int alphaZero)
 
int DDSDecompressDXT1 (unsigned char *src, int width, int height, unsigned char *dest)
 Decompress a DXT1 (BC1) compressed texture into raw RGBA pixels.
 
int DDSDecompressDXT3 (unsigned char *src, int width, int height, unsigned char *dest)
 Decompress a DXT3 (BC2) compressed texture into raw RGBA pixels.
 
int DDSDecompressDXT5 (unsigned char *src, int width, int height, unsigned char *dest)
 Decompress a DXT5 (BC3) compressed texture into raw RGBA pixels.
 

Macro Definition Documentation

◆ DDSLIB_C

#define DDSLIB_C

Definition at line 38 of file ddslib.cpp.

Function Documentation

◆ DDSBigFloat()

float DDSBigFloat ( float  src)

Definition at line 108 of file ddslib.cpp.

◆ DDSBigLong()

int DDSBigLong ( int  src)

Definition at line 94 of file ddslib.cpp.

◆ DDSBigShort()

short DDSBigShort ( short  src)

Definition at line 102 of file ddslib.cpp.

◆ DDSDecodeAlpha3BitLinear()

static void DDSDecodeAlpha3BitLinear ( unsigned int *  pixel,
ddsAlphaBlock3BitLinear_t alphaBlock,
int  width,
unsigned int  alphaZero 
)
static

Definition at line 366 of file ddslib.cpp.

Here is the caller graph for this function:

◆ DDSDecodeAlphaExplicit()

static void DDSDecodeAlphaExplicit ( unsigned int *  pixel,
ddsAlphaBlockExplicit_t alphaBlock,
int  width,
unsigned int  alphaZero 
)
static

Definition at line 328 of file ddslib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DDSDecodeColorBlock()

static void DDSDecodeColorBlock ( unsigned int *  pixel,
ddsColorBlock_t block,
int  width,
unsigned int  colors[4] 
)
static

Definition at line 278 of file ddslib.cpp.

Here is the caller graph for this function:

◆ DDSDecompressDXT1()

int DDSDecompressDXT1 ( unsigned char *  src,
int  width,
int  height,
unsigned char *  dest 
)

Decompress a DXT1 (BC1) compressed texture into raw RGBA pixels.

Parameters
srcPointer to the DXT1 compressed source data.
widthWidth of the texture in pixels.
heightHeight of the texture in pixels.
destPointer to the destination buffer (must be width * height * 4 bytes).
Returns
0 on success, -1 on failure.

Definition at line 479 of file ddslib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DDSDecompressDXT3()

int DDSDecompressDXT3 ( unsigned char *  src,
int  width,
int  height,
unsigned char *  dest 
)

Decompress a DXT3 (BC2) compressed texture into raw RGBA pixels.

Parameters
srcPointer to the DXT3 compressed source data.
widthWidth of the texture in pixels.
heightHeight of the texture in pixels.
destPointer to the destination buffer (must be width * height * 4 bytes).
Returns
0 on success, -1 on failure.

Definition at line 519 of file ddslib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DDSDecompressDXT5()

int DDSDecompressDXT5 ( unsigned char *  src,
int  width,
int  height,
unsigned char *  dest 
)

Decompress a DXT5 (BC3) compressed texture into raw RGBA pixels.

Parameters
srcPointer to the DXT5 compressed source data.
widthWidth of the texture in pixels.
heightHeight of the texture in pixels.
destPointer to the destination buffer (must be width * height * 4 bytes).
Returns
0 on success, -1 on failure.

Definition at line 566 of file ddslib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DDSGetColorBlockColors()

static void DDSGetColorBlockColors ( ddsColorBlock_t block,
ddsColor_t  colors[4] 
)
static

Definition at line 187 of file ddslib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DDSLittleFloat()

float DDSLittleFloat ( float  src)

Definition at line 92 of file ddslib.cpp.

◆ DDSLittleLong()

int DDSLittleLong ( int  src)

Definition at line 90 of file ddslib.cpp.

◆ DDSLittleShort()

short DDSLittleShort ( short  src)

Definition at line 91 of file ddslib.cpp.

Here is the caller graph for this function: