xoreos  0.0.5
Static Public Member Functions | List of all members
Aurora::CDPTH Class Reference

Loader for CDPTH, BioWare's Compressed DePTH, into a linear array of uint16 values. More...

#include <cdpth.h>

Static Public Member Functions

static const uint16load (Common::SeekableReadStream &cdpth, uint32 width, uint32 height)
 Read a CDPTH out of this stream. More...
 
static const uint16load (Common::SeekableReadStream *cdpth, uint32 width, uint32 height)
 Read a CDPTH out of this stream and delete it afterwards. More...
 

Detailed Description

Loader for CDPTH, BioWare's Compressed DePTH, into a linear array of uint16 values.

CDPTH are found in Sonic, where they are used to indicate the depth information of each pixel of the area background images (which are in CBGT format).

Layout-wise, a CDPTH is stored similar to CBGT: cells of 64x64 pixels, compressed using Nintendo's 0x10 LZSS algorithm. Unlike CBGT, though, the cells themselves are not swizzled into 8x8 tiles, and the pixel value in CDPTH is a 16bit integer specifying a depth.

The width and height of the image is not stored within the CDPTH file, and have to be provided from the outside. And because of the cell nature of the data, we do need to know these dimensions during loading.

Definition at line 54 of file cdpth.h.

Member Function Documentation

◆ load() [1/2]

const uint16 * Aurora::CDPTH::load ( Common::SeekableReadStream cdpth,
uint32  width,
uint32  height 
)
static

Read a CDPTH out of this stream.

Definition at line 60 of file cdpth.cpp.

References Common::StackException::add(), Aurora::ReadContext::depth, Aurora::ReadContext::height, Aurora::loadCDPTH(), Common::ScopedPtrBase< T, Deallocator >::release(), and Aurora::ReadContext::width.

Referenced by load().

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

◆ load() [2/2]

const uint16 * Aurora::CDPTH::load ( Common::SeekableReadStream cdpth,
uint32  width,
uint32  height 
)
static

Read a CDPTH out of this stream and delete it afterwards.

Definition at line 79 of file cdpth.cpp.

References load().

Here is the call graph for this function:

The documentation for this class was generated from the following files: