Add comments

depth-refraction
Cédric Mocquillon 2 years ago
parent 24272d07bf
commit d73ab7ef6f

@ -29,7 +29,6 @@
namespace Bsa namespace Bsa
{ {
// special marker for invalid records, // special marker for invalid records,
// equal to max uint32_t value
const uint32_t sInvalidOffset = std::numeric_limits<uint32_t>::max(); const uint32_t sInvalidOffset = std::numeric_limits<uint32_t>::max();
BA2GNRLFile::FileRecord::FileRecord() BA2GNRLFile::FileRecord::FileRecord()
@ -108,7 +107,7 @@ namespace Bsa
if (header[0] == 0x00415342) /*"BSA\x00"*/ if (header[0] == 0x00415342) /*"BSA\x00"*/
fail("Unrecognized compressed BSA format"); fail("Unrecognized compressed BSA format");
mVersion = header[1]; mVersion = header[1];
if (mVersion != 0x01 /*F04*/) if (mVersion != 0x01 /*FO4*/)
fail("Unrecognized compressed BSA version"); fail("Unrecognized compressed BSA version");
type = header[2]; type = header[2];

@ -365,6 +365,7 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath)
if (head[0] == ESM::fourCC("BTDX")) if (head[0] == ESM::fourCC("BTDX"))
{ {
// head[1] should contains 0x01 it is checked if we want to open this kind of archive
if (head[2] == ESM::fourCC("GNRL")) if (head[2] == ESM::fourCC("GNRL"))
return BSAVER_BA2_GNRL; return BSAVER_BA2_GNRL;
if (head[2] == ESM::fourCC("DX10")) if (head[2] == ESM::fourCC("DX10"))

@ -40,8 +40,8 @@ namespace Bsa
BSAVER_UNKNOWN = 0x0, BSAVER_UNKNOWN = 0x0,
BSAVER_UNCOMPRESSED = 0x100, BSAVER_UNCOMPRESSED = 0x100,
BSAVER_COMPRESSED = 0x415342, // B, S, A, BSAVER_COMPRESSED = 0x415342, // B, S, A,
BSAVER_BA2_GNRL, BSAVER_BA2_GNRL, // used by FO4, BSA which contains files
BSAVER_BA2_DX10 BSAVER_BA2_DX10 // used by FO4, BSA which contains textures
}; };
/** /**

Loading…
Cancel
Save