Changeset View
Changeset View
Standalone View
Standalone View
source/lib/tex/tex_dds.cpp
Show First 20 Lines • Show All 611 Lines • ▼ Show 20 Lines | |||||
Status TexCodecDds::decode(u8* RESTRICT data, size_t UNUSED(size), Tex* RESTRICT t) const | Status TexCodecDds::decode(u8* RESTRICT data, size_t UNUSED(size), Tex* RESTRICT t) const | ||||
{ | { | ||||
const DDS_HEADER* sd = (const DDS_HEADER*)(data+4); | const DDS_HEADER* sd = (const DDS_HEADER*)(data+4); | ||||
RETURN_STATUS_IF_ERR(decode_sd(sd, t->m_Width, t->m_Height, t->m_Bpp, t->m_Flags)); | RETURN_STATUS_IF_ERR(decode_sd(sd, t->m_Width, t->m_Height, t->m_Bpp, t->m_Flags)); | ||||
return INFO::OK; | return INFO::OK; | ||||
} | } | ||||
Status TexCodecDds::encode(Tex* RESTRICT UNUSED(t), DynArray* RESTRICT UNUSED(da)) const | Status TexCodecDds::encode(Tex* RESTRICT UNUSED(t), DynArray* RESTRICT UNUSED(da), int UNUSED(quality)) const | ||||
{ | { | ||||
// note: do not return ERR::NOT_SUPPORTED et al. because that would | // note: do not return ERR::NOT_SUPPORTED et al. because that would | ||||
// break tex_write (which assumes either this, 0 or errors are returned). | // break tex_write (which assumes either this, 0 or errors are returned). | ||||
return INFO::TEX_CODEC_CANNOT_HANDLE; | return INFO::TEX_CODEC_CANNOT_HANDLE; | ||||
} | } | ||||
TIMER_ADD_CLIENT(tc_dds_transform); | TIMER_ADD_CLIENT(tc_dds_transform); | ||||
Show All 30 Lines |
Wildfire Games · Phabricator