![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
Handles TEX files. More...
#include <VGearsTexFile.h>
Classes | |
struct | BitData |
Bit data in a TEX file. More... | |
struct | Header |
A TEX file header. More... | |
struct | ImageData |
Texture image data. More... | |
struct | PaletteData |
Colour palette data. More... | |
struct | PixelFormat |
Pixel format structure. More... | |
struct | RGBAData |
RGBA colour data. More... | |
struct | TextureFormat |
Texture format. More... | |
Public Types | |
enum | PaletteType { PF_A8R8G8B8 = 0x00 , PF_FLOAT32_ARGB = 0x01 , PF_B8G8R8A8 = 0x02 } |
typedef Ogre::int32 | TexEntry |
typedef ColorA8R8G8B8 | Color |
typedef std::vector< Color > | Palette |
typedef std::vector< Color > | TexImageData |
Public Member Functions | |
TexFile () | |
Constructor. More... | |
virtual | ~TexFile () |
Destructor. More... | |
void | Read (Ogre::DataStreamPtr &input) |
Reads texture data. More... | |
void | ReadHeader (Ogre::DataStreamPtr &input) |
Reads the TEX file header and sets the instance data. More... | |
void | ReadPalleted (Ogre::DataStreamPtr &input) |
Reads texture data and matches it with the color palette. More... | |
Ogre::MemoryDataStream * | GetPixelData () const |
Retrieves pixel information from the texture image. More... | |
Ogre::ImageCodec::ImageData * | GetImageData () const |
Retrieves image data from the texture. More... | |
Public Attributes | |
struct VGears::TexFile::Header | header_ |
Palette | palette |
The texture palette. More... | |
TexImageData | image_data_ |
The texture image data. More... | |
Private Member Functions | |
void | FlipEndian (void *data, size_t size, size_t count) const |
Flips the endian mode of data. More... | |
void | FlipEndian (void *data, size_t size) const |
Flips the endian mode of data. More... | |
Private Attributes | |
Palette | palettes_ [8] |
Colour palettes in the TEXT file. More... | |
Static Private Attributes | |
static const Ogre::uint8 | USE_REFERENCE_ALPHA |
Handles TEX files.
TEX files contain texture data for the PC version of Final Fantasy VII.
typedef ColorA8R8G8B8 VGears::TexFile::Color |
typedef std::vector<Color> VGears::TexFile::Palette |
typedef Ogre::int32 VGears::TexFile::TexEntry |
typedef std::vector<Color> VGears::TexFile::TexImageData |
TexFile::TexFile | ( | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Flips the endian mode of data.
If the data was big endian, it will be conterted to little endian. If it was little endian, it will be converted to big endian.
[in,out] | data | Data to flip. |
[in] | size | Size of data. |
|
private |
Flips the endian mode of data.
If the data was big endian, it will be conterted to little endian. If it was little endian, it will be converted to big endian.
[in,out] | data | Data to flip. |
[in] | size | Size of data. |
[in] | count | How much data to flip. |
ImageCodec::ImageData * TexFile::GetImageData | ( | ) | const |
Retrieves image data from the texture.
MemoryDataStream * TexFile::GetPixelData | ( | ) | const |
Retrieves pixel information from the texture image.
void TexFile::Read | ( | Ogre::DataStreamPtr & | input | ) |
Reads texture data.
[in] | input | The contents of the TEX file. |
void TexFile::ReadHeader | ( | Ogre::DataStreamPtr & | input | ) |
Reads the TEX file header and sets the instance data.
[in] | input | The contents of the TEX file. |
void TexFile::ReadPalleted | ( | Ogre::DataStreamPtr & | input | ) |
Reads texture data and matches it with the color palette.
[in] | input | The contents of the TEX file. |
struct VGears::TexFile::Header VGears::TexFile::header_ |
TexImageData VGears::TexFile::image_data_ |
The texture image data.
Palette VGears::TexFile::palette |
The texture palette.
|
private |
Colour palettes in the TEXT file.
|
staticprivate |