Support zlib-compressed version 3 DDS BA2s

pull/3235/head
Alexei Kotov 8 months ago
parent b32385a0af
commit f796e051cb

@ -122,7 +122,13 @@ namespace Bsa
case BA2Version::Fallout4NG: case BA2Version::Fallout4NG:
break; break;
case BA2Version::StarfieldDDS: 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: default:
fail("Unrecognized DDS BA2 version"); fail("Unrecognized DDS BA2 version");
} }

Loading…
Cancel
Save