|
xoreos
0.0.5
|
BioWare's own texture format, TPC. More...
#include <tpc.h>


Public Member Functions | |
| TPC (Common::SeekableReadStream &tpc) | |
| ~TPC () | |
Public Member Functions inherited from Graphics::ImageDecoder | |
| ImageDecoder () | |
| ImageDecoder (const ImageDecoder &image) | |
| virtual | ~ImageDecoder () |
| ImageDecoder & | operator= (const ImageDecoder &image) |
| bool | isCompressed () const |
| Is the image data compressed? More... | |
| bool | hasAlpha () const |
| Does the image data have alpha? . More... | |
| PixelFormat | getFormat () const |
| Return the image data's general format. More... | |
| PixelFormatRaw | getFormatRaw () const |
| Return the image data's raw format. More... | |
| PixelDataType | getDataType () const |
| Return the image data pixel's type. More... | |
| size_t | getMipMapCount () const |
| Return the number of mip maps contained in the image. More... | |
| size_t | getLayerCount () const |
| Return the number of layers contained in the image. More... | |
| bool | isCubeMap () const |
| Is this image a cube map? More... | |
| const MipMap & | getMipMap (size_t mipMap, size_t layer=0) const |
| Return a mip map. More... | |
| void | decompress () |
| Manually decompress the texture image data. More... | |
| const TXI & | getTXI () const |
| Return the texture information TXI, which may be embedded in the image. More... | |
| bool | dumpTGA (const Common::UString &fileName) const |
| Dump the image into a TGA. More... | |
Private Member Functions | |
| void | load (Common::SeekableReadStream &tpc) |
| void | readHeader (Common::SeekableReadStream &tpc, byte &encoding) |
| void | readData (Common::SeekableReadStream &tpc, byte encoding) |
| void | readTXI (Common::SeekableReadStream &tpc) |
| bool | checkCubeMap (uint32 &width, uint32 &height) |
| void | fixupCubeMap () |
Static Private Member Functions | |
| static void | deSwizzle (byte *dst, const byte *src, uint32 width, uint32 height) |
Additional Inherited Members | |
Protected Types inherited from Graphics::ImageDecoder | |
| typedef Common::PtrVector< MipMap > | MipMaps |
Static Protected Member Functions inherited from Graphics::ImageDecoder | |
| static void | decompress (MipMap &out, const MipMap &in, PixelFormatRaw format) |
Protected Attributes inherited from Graphics::ImageDecoder | |
| bool | _compressed |
| bool | _hasAlpha |
| PixelFormat | _format |
| PixelFormatRaw | _formatRaw |
| PixelDataType | _dataType |
| size_t | _layerCount |
| Number of layers in this image. More... | |
| bool | _isCubeMap |
| Is this image a cube map? A cube map always needs to have 6 layers! More... | |
| MipMaps | _mipMaps |
| TXI | _txi |
BioWare's own texture format, TPC.
This format is used by the two Knights of the Old Republic games. In the Xbox versions, these files have a .txb extension, but are still this format (not the TXB format used in Jade Empire).
| Graphics::TPC::TPC | ( | Common::SeekableReadStream & | tpc | ) |
Definition at line 216 of file tpc.cpp.
References Graphics::ImageDecoder::_isCubeMap, and Graphics::ImageDecoder::_layerCount.
Referenced by readHeader().

|
staticprivate |
Definition at line 252 of file tpc.cpp.
References Graphics::deSwizzleOffset().
Referenced by readData().


|
private |
Definition at line 314 of file tpc.cpp.
References Graphics::ImageDecoder::_formatRaw, Graphics::ImageDecoder::_mipMaps, Graphics::ImageDecoder::MipMap::data, Graphics::ImageDecoder::decompress(), Graphics::ImageDecoder::getLayerCount(), Graphics::ImageDecoder::getMipMapCount(), Graphics::ImageDecoder::isCubeMap(), Graphics::kPixelFormatRGB8, Graphics::kPixelFormatRGBA8, Graphics::rotate90(), and Common::ScopedPtrBase< T, Deallocator >::swap().
Referenced by load().


|
private |
Definition at line 50 of file tpc.cpp.
References Common::StackException::add(), fixupCubeMap(), readData(), readHeader(), and readTXI().
Referenced by TPC().


|
private |
Definition at line 265 of file tpc.cpp.
References Graphics::ImageDecoder::_mipMaps, deSwizzle(), kEncodingGray, kEncodingSwizzledBGRA, Common::kReadError, Common::ReadStream::read(), and Common::ScopedPtrBase< T, Deallocator >::reset().
Referenced by load().


|
private |
Definition at line 67 of file tpc.cpp.
References Graphics::ImageDecoder::_compressed, Graphics::ImageDecoder::_dataType, Graphics::ImageDecoder::_format, Graphics::ImageDecoder::_formatRaw, Graphics::ImageDecoder::_hasAlpha, Graphics::ImageDecoder::_layerCount, Graphics::ImageDecoder::_mipMaps, checkCubeMap(), Graphics::getDataSize(), Graphics::hasValidDimensions(), kEncodingGray, kEncodingRGB, kEncodingRGBA, kEncodingSwizzledBGRA, Graphics::kPixelDataType8, Graphics::kPixelFormatBGR, Graphics::kPixelFormatBGRA, Graphics::kPixelFormatDXT1, Graphics::kPixelFormatDXT5, Graphics::kPixelFormatRGB, Graphics::kPixelFormatRGB8, Graphics::kPixelFormatRGBA, Graphics::kPixelFormatRGBA8, Common::ReadStream::readByte(), Common::ReadStream::readUint16LE(), Common::ReadStream::readUint32LE(), Common::ScopedPtrBase< T, Deallocator >::release(), Common::SeekableReadStream::size(), and Common::SeekableReadStream::skip().
Referenced by load().


|
private |
Definition at line 301 of file tpc.cpp.
References Graphics::ImageDecoder::_txi, Graphics::TXI::load(), Common::SeekableReadStream::pos(), Common::ReadStream::readStream(), and Common::SeekableReadStream::size().
Referenced by load().


1.8.14