BSPParser
Simple and modern library for parsing the Valve BSP format
Loading...
Searching...
No Matches
headers.hpp
1#pragma once
2
3#include "../enums/lump.hpp"
4#include <array>
5#include <cstdint>
6
7namespace BspParser::Structs {
8 constexpr int32_t IDBSP_HEADER = 'V' + ('B' << 8u) + ('S' << 16u) + ('P' << 24u);
9 constexpr size_t HEADER_LUMPS = 64;
10
11 struct Lump {
15 int32_t offset;
16
20 int32_t length;
21
25 int32_t version;
26
30 int32_t fourCC;
31 };
32
33 struct Header {
37 int32_t identifier;
38
42 int32_t version;
43
47 std::array<Lump, HEADER_LUMPS> lumps;
48
52 int32_t mapRevision;
53 };
54
55 struct GameLump {
56 Enums::GameLumpID id;
57 uint16_t flags;
58 uint16_t version;
59 int32_t offset;
60 int32_t length;
61 };
62}
Definition: BSPParser.hpp:22
Definition: headers.hpp:55
Definition: headers.hpp:33
int32_t mapRevision
Definition: headers.hpp:52
std::array< Lump, HEADER_LUMPS > lumps
Definition: headers.hpp:47
int32_t version
Definition: headers.hpp:42
int32_t identifier
Definition: headers.hpp:37
Definition: headers.hpp:11
int32_t version
Definition: headers.hpp:25
int32_t offset
Definition: headers.hpp:15
int32_t fourCC
Definition: headers.hpp:30
int32_t length
Definition: headers.hpp:20