From d73ab7ef6feb3405b901976093f56520d49fd5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Mocquillon?= Date: Fri, 3 Mar 2023 13:27:40 +0100 Subject: [PATCH] Add comments --- components/bsa/ba2gnrlfile.cpp | 3 +-- components/bsa/bsa_file.cpp | 1 + components/bsa/bsa_file.hpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/bsa/ba2gnrlfile.cpp b/components/bsa/ba2gnrlfile.cpp index 14eb671f93..0e4cabd075 100644 --- a/components/bsa/ba2gnrlfile.cpp +++ b/components/bsa/ba2gnrlfile.cpp @@ -29,7 +29,6 @@ namespace Bsa { // special marker for invalid records, - // equal to max uint32_t value const uint32_t sInvalidOffset = std::numeric_limits::max(); BA2GNRLFile::FileRecord::FileRecord() @@ -108,7 +107,7 @@ namespace Bsa if (header[0] == 0x00415342) /*"BSA\x00"*/ fail("Unrecognized compressed BSA format"); mVersion = header[1]; - if (mVersion != 0x01 /*F04*/) + if (mVersion != 0x01 /*FO4*/) fail("Unrecognized compressed BSA version"); type = header[2]; diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp index ec95e86729..a8604dfe83 100644 --- a/components/bsa/bsa_file.cpp +++ b/components/bsa/bsa_file.cpp @@ -365,6 +365,7 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath) 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")) return BSAVER_BA2_GNRL; if (head[2] == ESM::fourCC("DX10")) diff --git a/components/bsa/bsa_file.hpp b/components/bsa/bsa_file.hpp index db68c0c485..8a953245d2 100644 --- a/components/bsa/bsa_file.hpp +++ b/components/bsa/bsa_file.hpp @@ -40,8 +40,8 @@ namespace Bsa BSAVER_UNKNOWN = 0x0, BSAVER_UNCOMPRESSED = 0x100, BSAVER_COMPRESSED = 0x415342, // B, S, A, - BSAVER_BA2_GNRL, - BSAVER_BA2_DX10 + BSAVER_BA2_GNRL, // used by FO4, BSA which contains files + BSAVER_BA2_DX10 // used by FO4, BSA which contains textures }; /**