OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Functions
lod Namespace Reference

Functions

LodFileFormat magic (const Blob &blob, std::string_view fileName)
 
Blob decodeCompressed (const Blob &blob)
 
Blob encodeCompressed (const Blob &blob)
 
Palette decodePalette (const Blob &blob)
 
LodImage decodeImage (const Blob &blob)
 
LodSprite decodeSprite (const Blob &blob)
 

Function Documentation

◆ decodeCompressed()

Blob lod::decodeCompressed ( const Blob blob)

This functions processes LOD_FILE_COMPRESSED, LOD_FILE_PSEUDO_IMAGE and LOD_FILE_RAW formats, returning uncompressed data.

In case of LOD_FILE_RAW, it just does nothing and returns the blob as is.

Parameters
blobBlob from a LOD file.
Returns
Uncompressed Blob.
Exceptions
ExceptionIf the provided Blob is of unsupported type.

◆ decodeImage()

LodImage lod::decodeImage ( const Blob blob)

This function processes LOD_FILE_IMAGE and LOD_FILE_PALETTE formats. In case of the latter, the pixel data will be empty.

Parameters
blobImage Blob, as read from a LOD file.
Returns
Decoded LodImage.

◆ decodePalette()

Palette lod::decodePalette ( const Blob blob)

This function processes LOD_FILE_PALETTE and LOD_FILE_IMAGE formats. In case of the latter, the pixel data is ignored.

Parameters
blobBlob from a LOD file.
Returns
Decoded Palette.
Exceptions
ExceptionIf the provided Blob is of unsupported type.

◆ decodeSprite()

LodSprite lod::decodeSprite ( const Blob blob)

This function processes LOD_FILE_SPRITE format.

Parameters
blobSprite blob, as read from a LOD file.
Returns
Decoded LodSprite.

◆ encodeCompressed()

Blob lod::encodeCompressed ( const Blob blob)

This function compresses the provided Blob into the LOD_FILE_COMPRESSED format.

Parameters
blobBlob to compress.
Returns
Compressed Blob in LOD_FILE_COMPRESSED format.

◆ magic()

LodFileFormat lod::magic ( const Blob blob,
std::string_view  fileName 
)