fix: parsing tex0004

This commit is contained in:
Almamu 2025-08-14 01:56:00 +02:00
parent e5355d0013
commit 958c97f791

View File

@ -284,7 +284,7 @@ std::unique_ptr<CTexture::TextureHeader> CTexture::parseHeader (const char* file
header->freeImageFormat = static_cast<FreeImageFormat> (*pointer++); header->freeImageFormat = static_cast<FreeImageFormat> (*pointer++);
header->isVideoMp4 = *pointer++ == 1; header->isVideoMp4 = *pointer++ == 1;
if (header->freeImageFormat == FIF_UNKNOWN) { if (header->freeImageFormat == FIF_UNKNOWN && header->isVideoMp4) {
header->freeImageFormat = FIF_MP4; header->freeImageFormat = FIF_MP4;
} }
@ -412,6 +412,8 @@ std::shared_ptr<CTexture::TextureMipmap> CTexture::parseMipmap (const TextureHea
fileData ++; fileData ++;
pointer = reinterpret_cast<const uint32_t*> (fileData); pointer = reinterpret_cast<const uint32_t*> (fileData);
// this is another param to ignore
pointer++;
} }
mipmap->width = *pointer++; mipmap->width = *pointer++;