xoreos
0.0.5
|
Loader for CDPTH, BioWare's Compressed DePTH, into a linear array of uint16 values. More...
#include <cdpth.h>
Static Public Member Functions | |
static const uint16 * | load (Common::SeekableReadStream &cdpth, uint32 width, uint32 height) |
Read a CDPTH out of this stream. More... | |
static const uint16 * | load (Common::SeekableReadStream *cdpth, uint32 width, uint32 height) |
Read a CDPTH out of this stream and delete it afterwards. More... | |
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.
|
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().
|
static |