Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::FileDDS Class Reference

Reads and writes DDS files. More...

Public Member Functions

 FileDDS ()
 Default constructor.
 
ImageLoad (InputMemoryStream *pInput)
 Parses a DDS file.
 
uint_t Save (OutputMemoryStream *pOutput, const Image *pImage)
 Write an Image structure out as a DDS file image.
 
const uint32_t * GetReserved (void) const
 
uint32_t * GetReserved (void)
 

Static Public Attributes

static const uint32_t FILETYPE = 0x44445320
 'DDS ' Mac File type for DDS files (Byte swapped on little endian machines)
 
static const uint32_t AUXTYPE = 0x474B4F4E
 'GKON' Mac creator code for DDS files (Byte swapped on little endian machines)
 

Private Attributes

uint32_t m_uReserved [11]
 

Detailed Description

Reads and writes DDS files.


This class will read and write out Direct Draw Surface (DDS) files and use Burger::Image class instances as data transporters

Constructor & Destructor Documentation

◆ FileDDS()

Burger::FileDDS::FileDDS ( )

Default constructor.


Initializes all extra file data to defaults

Member Function Documentation

◆ GetReserved() [1/2]

uint32_t * Burger::FileDDS::GetReserved ( void )
inline

◆ GetReserved() [2/2]

const uint32_t * Burger::FileDDS::GetReserved ( void ) const
inline

◆ Load()

Burger::Image * Burger::FileDDS::Load ( InputMemoryStream * pInput)

Parses a DDS file.


Read in a DDS file and set the extra variables

Will parse 16, 24, 32 bit uncompressed and DXT compressed DDS files only. Other formats are not supported

Note
A descriptive error message is passed to Debug::Warning()
Parameters
pInputPointer to a memory stream that has a DDS file image
Returns
A pointer to a valid Image on success or NULL on failure

◆ Save()

uint_t Burger::FileDDS::Save ( OutputMemoryStream * pOutput,
const Image * pImage )

Write an Image structure out as a DDS file image.


Given an image in true color and DXT compressed formats, write it out as a DDS file.

Parameters
pOutputPointer to the output stream to store the file image
pImagePointer to a valid Image structure containing the image data
Returns
Zero if successful

Member Data Documentation

◆ AUXTYPE

const uint32_t Burger::FileDDS::AUXTYPE = 0x474B4F4E
static

'GKON' Mac creator code for DDS files (Byte swapped on little endian machines)

◆ FILETYPE

const uint32_t Burger::FileDDS::FILETYPE = 0x44445320
static

'DDS ' Mac File type for DDS files (Byte swapped on little endian machines)

◆ m_uReserved

uint32_t Burger::FileDDS::m_uReserved[11]
private