SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
vtfpp::TTX Class Reference

#include <TTX.h>

Collaboration diagram for vtfpp::TTX:

Public Member Functions

 TTX (VTF &&vtf_)
 TTX (std::span< const std::byte > tthData, std::span< const std::byte > ttzData={})
 TTX (const std::filesystem::path &tthPath, const std::filesystem::path &ttzPath={})
 operator bool () const
uint8_t getMajorVersion () const
uint8_t getMinorVersion () const
void setVersion (uint8_t newMajorVersion, uint8_t newMinorVersion)
void setMajorVersion (uint8_t newMajorVersion)
void setMinorVersion (uint8_t newMinorVersion)
uint8_t getAspectRatioType () const
void setAspectRatioType (uint8_t newAspectRatioType)
const std::vector< uint64_t > & getMipFlags () const
std::vector< uint64_t > & getMipFlags ()
const VTFgetVTF () const
VTFgetVTF ()
int16_t getCompressionLevel () const
void setCompressionLevel (int16_t newCompressionLevel)
std::pair< std::vector< std::byte >, std::vector< std::byte > > bake () const
bool bake (const std::filesystem::path &tthPath, const std::filesystem::path &ttzPath) const

Protected Attributes

bool opened = false
int16_t compressionLevel = -1
VTF vtf
uint8_t majorVersion = 1
uint8_t minorVersion = 0
uint8_t aspectRatioType {}
std::vector< uint64_t > mipFlags

Detailed Description

Definition at line 9 of file TTX.h.

Constructor & Destructor Documentation

◆ TTX() [1/3]

TTX::TTX ( VTF && vtf_)
explicit

Definition at line 10 of file TTX.cpp.

◆ TTX() [2/3]

TTX::TTX ( std::span< const std::byte > tthData,
std::span< const std::byte > ttzData = {} )
explicit

Definition at line 18 of file TTX.cpp.

◆ TTX() [3/3]

TTX::TTX ( const std::filesystem::path & tthPath,
const std::filesystem::path & ttzPath = {} )
explicit

Definition at line 61 of file TTX.cpp.

Member Function Documentation

◆ bake() [1/2]

std::pair< std::vector< std::byte >, std::vector< std::byte > > TTX::bake ( ) const
nodiscard

Definition at line 121 of file TTX.cpp.

◆ bake() [2/2]

bool TTX::bake ( const std::filesystem::path & tthPath,
const std::filesystem::path & ttzPath ) const

Definition at line 171 of file TTX.cpp.

◆ getAspectRatioType()

uint8_t TTX::getAspectRatioType ( ) const
nodiscard

Definition at line 89 of file TTX.cpp.

◆ getCompressionLevel()

int16_t TTX::getCompressionLevel ( ) const
nodiscard

Definition at line 113 of file TTX.cpp.

◆ getMajorVersion()

uint8_t TTX::getMajorVersion ( ) const
nodiscard

Definition at line 68 of file TTX.cpp.

◆ getMinorVersion()

uint8_t TTX::getMinorVersion ( ) const
nodiscard

Definition at line 72 of file TTX.cpp.

◆ getMipFlags() [1/2]

std::vector< uint64_t > & TTX::getMipFlags ( )
nodiscard

Definition at line 101 of file TTX.cpp.

◆ getMipFlags() [2/2]

const std::vector< uint64_t > & TTX::getMipFlags ( ) const
nodiscard

Definition at line 97 of file TTX.cpp.

◆ getVTF() [1/2]

VTF & TTX::getVTF ( )
nodiscard

Definition at line 109 of file TTX.cpp.

◆ getVTF() [2/2]

const VTF & TTX::getVTF ( ) const
nodiscard

Definition at line 105 of file TTX.cpp.

◆ operator bool()

TTX::operator bool ( ) const
explicitnodiscard

Definition at line 64 of file TTX.cpp.

◆ setAspectRatioType()

void TTX::setAspectRatioType ( uint8_t newAspectRatioType)

Definition at line 93 of file TTX.cpp.

◆ setCompressionLevel()

void TTX::setCompressionLevel ( int16_t newCompressionLevel)

Definition at line 117 of file TTX.cpp.

◆ setMajorVersion()

void TTX::setMajorVersion ( uint8_t newMajorVersion)

Definition at line 81 of file TTX.cpp.

◆ setMinorVersion()

void TTX::setMinorVersion ( uint8_t newMinorVersion)

Definition at line 85 of file TTX.cpp.

◆ setVersion()

void TTX::setVersion ( uint8_t newMajorVersion,
uint8_t newMinorVersion )

Definition at line 76 of file TTX.cpp.

Member Data Documentation

◆ aspectRatioType

uint8_t vtfpp::TTX::aspectRatioType {}
protected

Definition at line 57 of file TTX.h.

◆ compressionLevel

int16_t vtfpp::TTX::compressionLevel = -1
protected

Definition at line 51 of file TTX.h.

◆ majorVersion

uint8_t vtfpp::TTX::majorVersion = 1
protected

Definition at line 55 of file TTX.h.

◆ minorVersion

uint8_t vtfpp::TTX::minorVersion = 0
protected

Definition at line 56 of file TTX.h.

◆ mipFlags

std::vector<uint64_t> vtfpp::TTX::mipFlags
protected

Definition at line 58 of file TTX.h.

◆ opened

bool vtfpp::TTX::opened = false
protected

Definition at line 50 of file TTX.h.

◆ vtf

VTF vtfpp::TTX::vtf
protected

Definition at line 53 of file TTX.h.


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