1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 13:20:35 +00:00

Support Starfield BA2s

This commit is contained in:
Alexei Kotov 2023-08-30 21:54:31 +03:00
parent 58aeb81e46
commit b2bb19ae4d
2 changed files with 12 additions and 2 deletions

View File

@ -112,11 +112,16 @@ namespace Bsa
if (header[0] == 0x00415342) /*"BSA\x00"*/
fail("Unrecognized compressed BSA format");
mVersion = header[1];
if (mVersion != 0x01 /*F04*/)
if (mVersion != 0x01 /*FO4*/ && mVersion != 0x02 /*Starfield*/)
fail("Unrecognized compressed BSA version");
type = header[2];
fileCount = header[3];
if (mVersion == 0x02)
{
uint64_t dummy;
input.read(reinterpret_cast<char*>(&dummy), 8);
}
}
if (type == ESM::fourCC("DX10"))

View File

@ -107,11 +107,16 @@ namespace Bsa
if (header[0] == 0x00415342) /*"BSA\x00"*/
fail("Unrecognized compressed BSA format");
mVersion = header[1];
if (mVersion != 0x01 /*FO4*/)
if (mVersion != 0x01 /*FO4*/ && mVersion != 0x02 /*Starfield*/)
fail("Unrecognized compressed BSA version");
type = header[2];
fileCount = header[3];
if (mVersion == 0x02)
{
uint64_t dummy;
input.read(reinterpret_cast<char*>(&dummy), 8);
}
}
if (type == ESM::fourCC("GNRL"))