xoreos  0.0.5
Public Member Functions | Private Member Functions | List of all members
Graphics::SBM Class Reference

SBM font bitmap data. More...

#include <sbm.h>

Inheritance diagram for Graphics::SBM:
Inheritance graph
[legend]
Collaboration diagram for Graphics::SBM:
Collaboration graph
[legend]

Public Member Functions

 SBM (Common::SeekableReadStream &sbm, bool deswizzle=false)
 Read an SBM image out of a stream. More...
 
 ~SBM ()
 
- Public Member Functions inherited from Graphics::ImageDecoder
 ImageDecoder ()
 
 ImageDecoder (const ImageDecoder &image)
 
virtual ~ImageDecoder ()
 
ImageDecoderoperator= (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 MipMapgetMipMap (size_t mipMap, size_t layer=0) const
 Return a mip map. More...
 
void decompress ()
 Manually decompress the texture image data. More...
 
const TXIgetTXI () 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 &sbm, bool deswizzle)
 
void readData (Common::SeekableReadStream &sbm, bool deswizzle)
 

Additional Inherited Members

- Protected Types inherited from Graphics::ImageDecoder
typedef Common::PtrVector< MipMapMipMaps
 
- 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
 

Detailed Description

SBM font bitmap data.

This format is used for fonts in Jade Empire.

Definition at line 40 of file sbm.h.

Constructor & Destructor Documentation

◆ SBM()

Graphics::SBM::SBM ( Common::SeekableReadStream sbm,
bool  deswizzle = false 
)

Read an SBM image out of a stream.

Parameters
Thestream to read out of.
deswizzleThis is an Xbox SBM that has swizzled data.

Definition at line 36 of file sbm.cpp.

References Graphics::ImageDecoder::_compressed, Graphics::ImageDecoder::_dataType, Graphics::ImageDecoder::_format, Graphics::ImageDecoder::_formatRaw, Graphics::ImageDecoder::_hasAlpha, Graphics::kPixelDataType8, Graphics::kPixelFormatBGRA, Graphics::kPixelFormatRGBA8, and load().

Here is the call graph for this function:

◆ ~SBM()

Graphics::SBM::~SBM ( )

Definition at line 46 of file sbm.cpp.

Member Function Documentation

◆ load()

void Graphics::SBM::load ( Common::SeekableReadStream sbm,
bool  deswizzle 
)
private

Definition at line 49 of file sbm.cpp.

References Common::StackException::add(), and readData().

Referenced by SBM().

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

◆ readData()

void Graphics::SBM::readData ( Common::SeekableReadStream sbm,
bool  deswizzle 
)
private

Definition at line 60 of file sbm.cpp.

References Graphics::ImageDecoder::_mipMaps, Graphics::deSwizzleOffset(), Common::kReadError, NEXTPOWER2(), Common::ReadStream::read(), and Common::SeekableReadStream::size().

Referenced by load().

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

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