1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Support zlib-compressed version 3 DDS BA2s

This commit is contained in:
Alexei Kotov 2024-04-26 10:45:03 +03:00
parent b32385a0af
commit f796e051cb

View file

@ -122,7 +122,13 @@ namespace Bsa
case BA2Version::Fallout4NG:
break;
case BA2Version::StarfieldDDS:
fail("Unsupported DDS BA2 version");
uint64_t dummy;
input.read(reinterpret_cast<char*>(&dummy), 8);
uint32_t compressionMethod;
input.read(reinterpret_cast<char*>(&compressionMethod), 4);
if (compressionMethod == 3)
fail("Unsupported LZ4-compressed DDS BA2");
break;
default:
fail("Unrecognized DDS BA2 version");
}