diff --git a/src/pck/PckFile.cpp b/src/pck/PckFile.cpp index 941c1fa..2359109 100644 --- a/src/pck/PckFile.cpp +++ b/src/pck/PckFile.cpp @@ -94,7 +94,11 @@ bool PckFile::Load() if(FormatVersion == 2) { entry.Flags = Read32(); - // TODO: check encrypted flag + if(entry.Flags & PCK_FILE_ENCRYPTED) { + std::cout << "WARNING: pck file (" << entry.Path + << ") is marked as encrypted, decoding the encryption is not " + "implemented\n"; + } } entry.GetData = [offset = entry.Offset, size = entry.Size, this]() { diff --git a/src/pck/PckFile.h b/src/pck/PckFile.h index dc3f9cf..e653d4b 100644 --- a/src/pck/PckFile.h +++ b/src/pck/PckFile.h @@ -14,7 +14,8 @@ namespace pcktool { // Pck magic constexpr uint32_t PCK_HEADER_MAGIC = 0x43504447; -constexpr uint32_t PACK_DIR_ENCRYPTED = 1; +constexpr uint32_t PACK_DIR_ENCRYPTED = 1 << 0; +constexpr uint32_t PCK_FILE_ENCRYPTED = 1 << 0; // Highest pck version supported by this tool constexpr int MAX_SUPPORTED_PCK_VERSION_LOAD = 2; @@ -39,7 +40,7 @@ class PckFile { }; public: - explicit PckFile(std::string path); + explicit PckFile(std::string path); PckFile(PckFile&& other) = delete; PckFile(const PckFile& other) = delete;