BSPParser
Simple and modern library for parsing the Valve BSP format
Loading...
Searching...
No Matches
surface.hpp
1#pragma once
2
3#include <cstdint>
4
5namespace BspParser::Enums {
6 // Size is excessive but matches width in the file
7 enum class Surface : int32_t { // NOLINT(*-enum-size)
8 None = 0x0,
9 Light = 0x1,
10 Sky2d = 0x2,
11 Sky = 0x4,
12 Warp = 0x8,
13 Transparent = 0x10,
14 NoPortal = 0x20,
15 Trigger = 0x40,
16 NoDraw = 0x80,
17 Hint = 0x100,
18 Skip = 0x200,
19 NoLight = 0x400,
20 BumpLight = 0x800,
21 NoShadows = 0x1000,
22 NoDecals = 0x2000,
23 NoChop = 0x4000,
24 Hitbox = 0x8000
25 };
26
27 inline Surface operator|(Surface lhs, Surface rhs) {
28 return static_cast<Surface>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
29 }
30
31 inline Surface& operator|=(Surface& lhs, const Surface rhs) {
32 lhs = lhs | rhs;
33 return lhs;
34 }
35
36 inline Surface operator&(Surface lhs, Surface rhs) {
37 return static_cast<Surface>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
38 }
39
40 inline Surface& operator&=(Surface& lhs, const Surface rhs) {
41 lhs = lhs & rhs;
42 return lhs;
43 }
44}
Definition: BSPParser.hpp:17