Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
ArchiveDirectoryFile.hpp
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <Common/ResourcePipeline/AssetType.hpp>
7#include <Common/ResourcePipeline/Uuid.hpp>
8
9namespace Grindstone::Assets {
11 const static uint32_t CURRENT_VERSION = 1;
12
13 struct Header {
14 const char signature[4] = { 'G', 'D', 'I', 'R' };
15 uint32_t version = CURRENT_VERSION;
16 uint32_t buildCode = 0;
17 uint32_t headerSize = sizeof(Header);
18 uint32_t assetTypeCount = static_cast<uint32_t>(AssetType::Count);
19 uint32_t assetTypeIndexSize;
20 uint32_t assetInfoIndexSize;
21 uint32_t archiveIndexSize;
22 uint32_t stringsSize;
23 };
24
26 uint64_t offset;
27 uint16_t count;
28 };
29
30 struct AssetInfo {
32 uint64_t filenameOffset;
33 uint16_t filenameSize;
34 uint32_t crc;
35 uint16_t archiveIndex;
36 uint64_t offset;
37 uint64_t size;
38 };
39
40 struct ArchiveInfo {
41 uint32_t crc;
42 };
43
44 Header header;
45 std::vector<AssetTypeSectionInfo> assetInfoIndex;
46 std::vector<AssetInfo> assets;
47 std::vector<ArchiveInfo> archives;
48 std::vector<std::string> strings;
49 };
50}
Definition Uuid.hpp:6
Definition ArchiveDirectoryFile.hpp:40
Definition ArchiveDirectoryFile.hpp:30
Definition ArchiveDirectoryFile.hpp:13
Definition ArchiveDirectoryFile.hpp:10