xoreos  0.0.5
Classes | Namespaces | Macros | Functions
s3tc.cpp File Reference

Manual S3TC DXTn decompression methods. More...

#include "src/common/util.h"
#include "src/common/readstream.h"
#include "src/graphics/images/s3tc.h"
Include dependency graph for s3tc.cpp:

Go to the source code of this file.

Classes

struct  Graphics::DXT1Texel
 
struct  Graphics::DXT23Texel
 
struct  Graphics::DXT45Texel
 

Namespaces

 Graphics
 

Macros

#define READ_DXT1_TEXEL(x)
 
#define READ_DXT3_TEXEL(x)
 
#define READ_DXT5_TEXEL(x)
 

Functions

static uint32 Graphics::convert565To8888 (uint16 color)
 
static uint32 Graphics::interpolate32 (double weight, uint32 color_0, uint32 color_1)
 
void Graphics::decompressDXT1 (byte *dest, Common::SeekableReadStream &src, uint32 width, uint32 height, uint32 pitch)
 
void Graphics::decompressDXT3 (byte *dest, Common::SeekableReadStream &src, uint32 width, uint32 height, uint32 pitch)
 
static uint64 Graphics::readUint48LE (Common::SeekableReadStream &src)
 
void Graphics::decompressDXT5 (byte *dest, Common::SeekableReadStream &src, uint32 width, uint32 height, uint32 pitch)
 

Detailed Description

Manual S3TC DXTn decompression methods.

Definition in file s3tc.cpp.

Macro Definition Documentation

◆ READ_DXT1_TEXEL

#define READ_DXT1_TEXEL (   x)
Value:
x.color_0 = src.readUint16LE(); \
x.color_1 = src.readUint16LE(); \
x.pixels = src.readUint32BE()

Definition at line 59 of file s3tc.cpp.

Referenced by Graphics::decompressDXT1().

◆ READ_DXT3_TEXEL

#define READ_DXT3_TEXEL (   x)
Value:
x.alpha[0] = src.readUint16LE(); \
x.alpha[1] = src.readUint16LE(); \
x.alpha[2] = src.readUint16LE(); \
x.alpha[3] = src.readUint16LE(); \
READ_DXT1_TEXEL(x)

Definition at line 107 of file s3tc.cpp.

Referenced by Graphics::decompressDXT3().

◆ READ_DXT5_TEXEL

#define READ_DXT5_TEXEL (   x)
Value:
x.alpha_0 = src.readByte(); \
x.alpha_1 = src.readByte(); \
x.alphabl = readUint48LE(src); \
READ_DXT1_TEXEL(x)
static uint64 readUint48LE(Common::SeekableReadStream &src)
Definition: s3tc.cpp:154

Definition at line 159 of file s3tc.cpp.

Referenced by Graphics::decompressDXT5().