clang-format

This commit is contained in:
2026-03-21 23:19:15 +01:00
parent 55b58ded70
commit 366c00fd22
68 changed files with 5585 additions and 5603 deletions
+11 -11
View File
@@ -11,20 +11,20 @@
namespace Resource {
// Entry metadata for each resource in the pack
struct ResourceEntry {
// Entry metadata for each resource in the pack
struct ResourceEntry {
std::string filename; // Relative path within pack
uint64_t offset{0}; // Byte offset in data block
uint64_t size{0}; // Size in bytes
uint32_t checksum{0}; // CRC32 checksum for verification
};
};
// Resource pack file format
// Header: "JDDI" (4 bytes) + Version (4 bytes)
// Metadata: Count + array of ResourceEntry
// Data: Encrypted data block
class Pack {
public:
// Resource pack file format
// Header: "JDDI" (4 bytes) + Version (4 bytes)
// Metadata: Count + array of ResourceEntry
// Data: Encrypted data block
class Pack {
public:
Pack() = default;
~Pack() = default;
@@ -48,7 +48,7 @@ class Pack {
auto getDataSize() const -> size_t { return data_.size(); }
auto calculatePackChecksum() const -> uint32_t; // Validation
private:
private:
static constexpr std::array<char, 4> MAGIC_HEADER = {'J', 'D', 'D', 'I'}; // Pack format constants
static constexpr uint32_t VERSION = 1;
static constexpr const char* DEFAULT_ENCRYPT_KEY = "JDDI_RESOURCES_2024";
@@ -63,6 +63,6 @@ class Pack {
std::unordered_map<std::string, ResourceEntry> resources_; // Member variables
std::vector<uint8_t> data_; // Encrypted data block
bool loaded_{false};
};
};
} // namespace Resource