using System; #pragma warning disable CA1069 // Enums values should not be duplicated namespace SabreTools.Data.Models.BSP { /// public enum BspContents : int { CONTENTS_EMPTY = -1, CONTENTS_SOLID = -2, CONTENTS_WATER = -3, CONTENTS_SLIME = -4, CONTENTS_LAVA = -5, CONTENTS_SKY = -6, CONTENTS_ORIGIN = -7, CONTENTS_CLIP = -8, CONTENTS_CURRENT_0 = -9, CONTENTS_CURRENT_90 = -10, CONTENTS_CURRENT_180 = -11, CONTENTS_CURRENT_270 = -12, CONTENTS_CURRENT_UP = -13, CONTENTS_CURRENT_DOWN = -14, CONTENTS_TRANSLUCENT = -15, } /// [Flags] public enum VbspContents : uint { /// /// No contents /// CONTENTS_EMPTY = 0x00000000, /// /// An eye is never valid in a solid /// CONTENTS_SOLID = 0x00000001, /// /// Translucent, but not watery (glass) /// CONTENTS_WINDOW = 0x00000002, /// /// Unused /// CONTENTS_AUX = 0x00000004, /// /// Alpha-tested "grate" textures. Bullets/sight pass through, /// but solids don't /// CONTENTS_GRATE = 0x00000008, /// /// Set via %CompileSlime. Unlike Quake II, slime does not do /// damage; a separate trigger_hurt should be used for this. /// CONTENTS_SLIME = 0x00000010, /// /// Set via %CompileWater. /// CONTENTS_WATER = 0x00000020, /// /// Unknown purpose; only set by %CompilePlayerControlClip. /// CONTENTS_MIST = 0x00000040, /// /// Block AI line of sight /// CONTENTS_BLOCKLOS = 0x00000040, /// /// Things that cannot be seen through (may be non-solid though) /// CONTENTS_OPAQUE = 0x00000080, /// /// Unknown /// CONTENTS_TESTFOGVOLUME = 0x00000100, /// /// Unused /// CONTENTS_UNUSED = 0x00000200, /// /// Unused /// CONTENTS_UNUSED6 = 0x00000400, /// /// If it's visible, grab from the top + update LAST_VISIBLE_CONTENTS /// if not visible, then grab from the bottom. /// CONTENTS_BLOCKLIGHT = 0x00000400, /// /// Per team contents used to differentiate collisions /// between players and objects on different teams /// CONTENTS_TEAM1 = 0x00000800, /// /// Per team contents used to differentiate collisions /// between players and objects on different teams /// CONTENTS_TEAM2 = 0x00001000, /// /// Ignore CONTENTS_OPAQUE on surfaces that have SURF_NODRAW /// CONTENTS_IGNORE_NODRAW_OPAQUE = 0x00002000, /// /// Hits entities which are MOVETYPE_PUSH (doors, plats, etc.) /// CONTENTS_MOVEABLE = 0x00004000, /// /// Is an areaportal. /// CONTENTS_AREAPORTAL = 0x00008000, /// /// Solid to players, including bots. /// CONTENTS_PLAYERCLIP = 0x00010000, /// /// Solid to monsters, better known in Source as NPCs. Also solid /// to bots in CSGO, even though they are players. /// CONTENTS_MONSTERCLIP = 0x00020000, /// /// Currents can be added to any other contents, and may be mixed /// CONTENTS_CURRENT_0 = 0x00040000, /// /// Currents can be added to any other contents, and may be mixed /// CONTENTS_CURRENT_90 = 0x00080000, /// /// Currents can be added to any other contents, and may be mixed /// CONTENTS_CURRENT_180 = 0x00100000, /// /// Currents can be added to any other contents, and may be mixed /// CONTENTS_CURRENT_270 = 0x00200000, /// /// Currents can be added to any other contents, and may be mixed /// CONTENTS_CURRENT_UP = 0x00400000, /// /// Currents can be added to any other contents, and may be mixed /// CONTENTS_CURRENT_DOWN = 0x00800000, /// /// Unknown /// CONTENTS_BRUSH_PAINT = 0x00040000, /// /// Unknown /// CONTENTS_GRENADECLIP = 0x00080000, /// /// Unknown /// CONTENTS_DRONECLIP = 0x00100000, /// /// Removed before bsping an entity /// CONTENTS_ORIGIN = 0x01000000, /// /// Should never be on a brush, only in game /// CONTENTS_MONSTER = 0x02000000, /// /// Solid to point traces (ex hitscan weapons) and non-debris /// physics objects[confirm]. Non-solid to QPhysics entities, /// such as players. /// CONTENTS_DEBRIS = 0x04000000, /// /// Brushes to be added after vis leafs /// CONTENTS_DETAIL = 0x08000000, /// /// Auto set if any surface has trans /// CONTENTS_TRANSLUCENT = 0x10000000, /// /// Is a ladder /// CONTENTS_LADDER = 0x20000000, /// /// Use accurate hitboxes on trace /// CONTENTS_HITBOX = 0x40000000, } /// [Flags] public enum DispTriTag : ushort { DISPTRI_TAG_SURFACE = 0x01, DISPTRI_TAG_WALKABLE = 0x02, DISPTRI_TAG_BUILDABLE = 0x04, DISPTRI_FLAG_SURFPROP1 = 0x08, DISPTRI_FLAG_SURFPROP2 = 0x10, } /// public enum EmitType { /// /// 90 degree spotlight /// EMIT_SURFACE, /// /// Simple point light source /// EMIT_POINT, /// /// Spotlight with penumbra /// EMIT_SPOTLIGHT, /// /// Directional light with no falloff /// (surface must trace to SKY texture) /// EMIT_SKYLIGHT, /// /// Linear falloff, non-lambertian /// EMIT_QUAKELIGHT, /// /// Spherical light source with no falloff /// (surface must trace to SKY texture) /// EMIT_SKYAMBIENT, } /// public enum BspLumpType : int { /// /// The entity lump is basically a pure ASCII text section. /// It consists of the string representations of all entities, /// which are copied directly from the input file to the output /// BSP file by the compiler. /// LUMP_ENTITIES = 0, /// /// This lump is a simple array of binary data structures. /// Each of this structures defines a plane in 3-dimensional /// space by using the Hesse normal form /// LUMP_PLANES = 1, /// /// The texture lump is somehow a bit more complex then the /// other lumps, because it is possible to save textures /// directly within the BSP file instead of storing them in /// external WAD files. /// /// LUMP_TEXDATA in VBSP LUMP_TEXTURES = 2, /// /// This lump simply consists of all vertices of the BSP tree. /// They are stored as a primitve array of triples of floats. /// /// LUMP_VERTEXES in VBSP LUMP_VERTICES = 3, /// /// The VIS lump contains data, which is irrelevant to the actual /// BSP tree, but offers a way to boost up the speed of the /// renderer significantly. Especially complex maps profit from /// the use if this data. This lump contains the so-called /// Potentially Visible Sets (PVS) (also called VIS lists) in the /// same amout of leaves of the tree, the user can enter (often /// referred to as VisLeaves). The visiblilty lists are stored as /// sequences of bitfields, which are run-length encoded. /// LUMP_VISIBILITY = 4, /// /// This lump is simple again and contains an array of binary /// structures, the nodes, which are a major part of the BSP tree. /// LUMP_NODES = 5, /// /// The texinfo lump contains informations about how textures are /// applied to surfaces. The lump itself is an array of binary data /// structures. /// LUMP_TEXINFO = 6, /// /// The face lump contains the surfaces of the scene. /// LUMP_FACES = 7, /// /// This is one of the largest lumps in the BSP file. The lightmap /// lump stores all lightmaps used in the entire map. The lightmaps /// are arrays of triples of bytes (3 channel color, RGB) and stored /// continuously. /// LUMP_LIGHTING = 8, /// /// This lump contains the so-called clipnodes, which build a second /// BSP tree used only for collision detection. /// /// LUMP_OCCLUSION in VBSP LUMP_CLIPNODES = 9, /// /// The leaves lump contains the leaves of the BSP tree. /// /// LUMP_LEAFS in VBSP LUMP_LEAVES = 10, /// /// The marksurfaces lump is a simple array of short integers. /// /// LUMP_FACEIDS in VBSP LUMP_MARKSURFACES = 11, /// /// The edges delimit the face and further refer to the vertices of the /// face. Each edge is pointing to the start and end vertex of the edge. /// LUMP_EDGES = 12, /// /// This lump represents pretty much the same mechanism as the marksurfaces. /// A face can insert its surfedge indexes into this array to get the /// corresponding edges delimitting the face and further pointing to the /// vertexes, which are required for rendering. The index can be positive /// or negative. If the value of the surfedge is positive, the first vertex /// of the edge is used as vertex for rendering the face, otherwise, the /// value is multiplied by -1 and the second vertex of the indexed edge is /// used. /// LUMP_SURFEDGES = 13, /// /// A model is kind of a mini BSP tree. Its size is determinded by the /// bounding box spaned by the first to members of this struct. /// LUMP_MODELS = 14, } /// public enum VbspLumpType : int { /// /// The entity lump is basically a pure ASCII text section. /// It consists of the string representations of all entities, /// which are copied directly from the input file to the output /// BSP file by the compiler. /// LUMP_ENTITIES = 0, /// /// This lump is a simple array of binary data structures. /// Each of this structures defines a plane in 3-dimensional /// space by using the Hesse normal form /// LUMP_PLANES = 1, /// /// The texture lump is somehow a bit more complex then the /// other lumps, because it is possible to save textures /// directly within the BSP file instead of storing them in /// external WAD files. /// /// LUMP_TEXDATA in VBSP LUMP_TEXTURES = 2, /// /// This lump simply consists of all vertices of the BSP tree. /// They are stored as a primitve array of triples of floats. /// /// LUMP_VERTEXES in VBSP LUMP_VERTICES = 3, /// /// The VIS lump contains data, which is irrelevant to the actual /// BSP tree, but offers a way to boost up the speed of the /// renderer significantly. Especially complex maps profit from /// the use if this data. This lump contains the so-called /// Potentially Visible Sets (PVS) (also called VIS lists) in the /// same amout of leaves of the tree, the user can enter (often /// referred to as VisLeaves). The visiblilty lists are stored as /// sequences of bitfields, which are run-length encoded. /// LUMP_VISIBILITY = 4, /// /// This lump is simple again and contains an array of binary /// structures, the nodes, which are a major part of the BSP tree. /// LUMP_NODES = 5, /// /// The texinfo lump contains informations about how textures are /// applied to surfaces. The lump itself is an array of binary data /// structures. /// LUMP_TEXINFO = 6, /// /// The face lump contains the surfaces of the scene. /// LUMP_FACES = 7, /// /// This is one of the largest lumps in the BSP file. The lightmap /// lump stores all lightmaps used in the entire map. The lightmaps /// are arrays of triples of bytes (3 channel color, RGB) and stored /// continuously. /// LUMP_LIGHTING = 8, /// /// This lump contains the so-called clipnodes, which build a second /// BSP tree used only for collision detection. /// /// LUMP_OCCLUSION in VBSP LUMP_CLIPNODES = 9, /// /// The leaves lump contains the leaves of the BSP tree. /// /// LUMP_LEAFS in VBSP LUMP_LEAVES = 10, /// /// The marksurfaces lump is a simple array of short integers. /// /// LUMP_FACEIDS in VBSP LUMP_MARKSURFACES = 11, /// /// The edges delimit the face and further refer to the vertices of the /// face. Each edge is pointing to the start and end vertex of the edge. /// LUMP_EDGES = 12, /// /// This lump represents pretty much the same mechanism as the marksurfaces. /// A face can insert its surfedge indexes into this array to get the /// corresponding edges delimitting the face and further pointing to the /// vertexes, which are required for rendering. The index can be positive /// or negative. If the value of the surfedge is positive, the first vertex /// of the edge is used as vertex for rendering the face, otherwise, the /// value is multiplied by -1 and the second vertex of the indexed edge is /// used. /// LUMP_SURFEDGES = 13, /// /// A model is kind of a mini BSP tree. Its size is determinded by the /// bounding box spaned by the first to members of this struct. /// LUMP_MODELS = 14, /// /// Internal world lights converted from the entity lump /// LUMP_WORLDLIGHTS = 15, /// /// Index to faces in each leaf /// LUMP_LEAFFACES = 16, /// /// Index to brushes in each leaf /// LUMP_LEAFBRUSHES = 17, /// /// Brush array /// LUMP_BRUSHES = 18, /// /// Brushside array /// LUMP_BRUSHSIDES = 19, /// /// Area array /// LUMP_AREAS = 20, /// /// Portals between areas /// LUMP_AREAPORTALS = 21, /// Source 2004 LUMP_PORTALS = 22, /// /// Unused /// /// Source 2007/2009 LUMP_UNUSED0 = 22, /// /// Static props convex hull lists /// /// Source (L4D2 Branch) LUMP_PROPCOLLISION = 22, /// /// Leaves that are enterable by the player /// /// Source 2004 LUMP_CLUSTERS = 23, /// /// Unused /// /// Source 2007/2009 LUMP_UNUSED1 = 23, /// /// Static prop convex hulls /// /// Source (L4D2 Branch) LUMP_PROPHULLS = 23, /// /// Vertices of portal polygons /// /// Source 2004 LUMP_PORTALVERTS = 24, /// /// Unused /// /// Source 2007/2009 LUMP_UNUSED2 = 24, /// /// Used to store client side entities (Similar to Lump #0) /// /// Source (TacInt branch) LUMP_FAKEENTITIES = 24, /// /// Static prop collision vertices /// /// Source (L4D2 Branch) LUMP_PROPHULLVERTS = 24, /// Source 2004 LUMP_CLUSTERPORTALS = 25, /// /// Unused /// /// Source 2007/2009 LUMP_UNUSED3 = 25, /// /// Static prop per hull triangle index start/count /// /// Source (L4D2 Branch) LUMP_PROPTRIS = 25, /// /// Displacement surface array /// LUMP_DISPINFO = 26, /// /// Brush faces array before splitting /// LUMP_ORIGINALFACES = 27, /// /// Displacement physics collision data /// LUMP_PHYSDISP = 28, /// /// Physics collision data /// LUMP_PHYSCOLLIDE = 29, /// /// Face plane normals /// LUMP_VERTNORMALS = 30, /// /// Face plane normal index array /// LUMP_VERTNORMALINDICES = 31, /// /// Displacement lightmap alphas (unused/empty since Source 2006) /// LUMP_DISP_LIGHTMAP_ALPHAS = 32, /// /// Vertices of displacement surface meshes /// LUMP_DISP_VERTS = 33, /// /// Displacement lightmap sample positions /// LUMP_DISP_LIGHTMAP_SAMPLE_POSITIONS = 34, /// /// Game-specific data lump /// LUMP_GAME_LUMP = 35, /// /// Data for leaf nodes that are inside water /// LUMP_LEAFWATERDATA = 36, /// /// Water polygon data /// LUMP_PRIMITIVES = 37, /// /// Water polygon vertices /// LUMP_PRIMVERTS = 38, /// /// Water polygon vertex index array /// LUMP_PRIMINDICES = 39, /// /// Embedded uncompressed or LZMA-compressed Zip-format file /// LUMP_PAKFILE = 40, /// /// Clipped portal polygon vertices /// LUMP_CLIPPORTALVERTS = 41, /// /// env_cubemap location array /// LUMP_CUBEMAPS = 42, /// /// Texture name data /// LUMP_TEXDATA_STRING_DATA = 43, /// /// Index array into texdata string data /// LUMP_TEXDATA_STRING_TABLE = 44, /// /// info_overlay data array /// LUMP_OVERLAYS = 45, /// /// Distance from leaves to water /// LUMP_LEAFMINDISTTOWATER = 46, /// /// Macro texture info for faces /// LUMP_FACE_MACRO_TEXTURE_INFO = 47, /// /// Displacement surface triangles /// LUMP_DISP_TRIS = 48, /// /// Compressed win32-specific Havok terrain surface collision data. /// Deprecated and no longer used. /// /// Source 2004 LUMP_PHYSCOLLIDESURFACE = 49, /// /// Static prop triangle and string data /// /// Source (L4D2 Branch) LUMP_PROP_BLOB = 49, /// /// Tied to any entity that uses the overlay_transition helper in FGD /// LUMP_WATEROVERLAYS = 50, /// /// Alternate lightdata implementation for Xbox /// /// Source 2006 LUMP_LIGHTMAPPAGES = 51, /// /// Index of LUMP_LEAF_AMBIENT_LIGHTING_HDR /// /// Source 2007/2009 LUMP_LEAF_AMBIENT_INDEX_HDR = 51, /// /// Alternate lightdata indices for Xbox /// /// Source 2006 LUMP_LIGHTMAPPAGEINFOS = 52, /// /// Index of LUMP_LEAF_AMBIENT_LIGHTING /// /// Source 2007/2009 LUMP_LEAF_AMBIENT_INDEX = 52, /// /// HDR lightmap samples /// LUMP_LIGHTING_HDR = 53, /// /// Internal HDR world lights converted from the entity lump /// LUMP_WORLDLIGHTS_HDR = 54, /// /// Per-leaf ambient light samples (HDR) /// LUMP_LEAF_AMBIENT_LIGHTING_HDR = 55, /// /// Per-leaf ambient light samples (LDR) /// LUMP_LEAF_AMBIENT_LIGHTING = 56, /// /// XZip version of pak file for Xbox. Deprecated. /// LUMP_XZIPPAKFILE = 57, /// /// HDR maps may have different face data /// LUMP_FACES_HDR = 58, /// /// Extended level-wide flags. Not present in all levels. /// LUMP_MAP_FLAGS = 59, /// /// Fade distances for overlays /// LUMP_OVERLAY_FADES = 60, /// /// System level settings (min/max CPU & GPU to render this overlay) /// LUMP_OVERLAY_SYSTEM_LEVELS = 61, /// /// PhysX model of the World Brush. /// LUMP_PHYSLEVEL = 62, /// /// Displacement multiblend info /// LUMP_DISP_MULTIBLEND = 63, } /// public enum PlaneType : int { // Plane is perpendicular to given axis PLANE_X = 0, PLANE_Y = 1, PLANE_Z = 2, // Non-axial plane is snapped to the nearest PLANE_ANYX = 3, PLANE_ANYY = 4, PLANE_ANYZ = 5, } /// [Flags] public enum StaticPropFlags : uint { /// /// Set by engine at runtime if the model fades out at a distance. /// STATIC_PROP_FLAG_FADES = 0x01, /// /// Set by engine at runtime if the model's lighting origin is /// different from its position in the world. /// STATIC_PROP_USE_LIGHTING_ORIGIN = 0x02, /// /// Computed at run time based on dx level /// STATIC_PROP_NO_DRAW = 0x04, /// /// Set if disableflashlight is enabled. /// STATIC_PROP_NO_FLASHLIGHT = 0x04, /// /// Set if ignorenormals is enabled. /// STATIC_PROP_IGNORE_NORMALS = 0x08, /// /// Set if disableshadows is enabled. /// STATIC_PROP_NO_SHADOW = 0x10, /// /// Set if disableshadows is enabled. /// STATIC_PROP_SCREEN_SPACE_FADE = 0x20, /// /// Set if drawinfastreflection is enabled. /// STATIC_PROP_MARKED_FOR_FAST_REFLECTION = 0x20, /// /// In vrad, compute lighting at lighting origin, /// not for each vertex /// STATIC_PROP_NO_PER_VERTEX_LIGHTING = 0x40, /// /// Disable self shadowing in vrad /// STATIC_PROP_NO_SELF_SHADOWING = 0x80, /// /// Whether we should do per-texel lightmaps in vrad /// STATIC_PROP_NO_PER_TEXEL_LIGHTING = 0x100, } /// [Flags] public enum StaticPropFlagsEx : uint { /// /// Set if disableshadowdepth is enabled. /// STATIC_PROP_FLAGS_EX_DISABLE_SHADOW_DEPTH = 0x00000001, /// /// Automatically set at runtime /// STATIC_PROP_FLAGS_EX_DISABLE_CSM = 0x00000002, /// /// Set if enablelightbounce is enabled. /// STATIC_PROP_FLAGS_EX_ENABLE_LIGHT_BOUNCE = 0x00000004, } /// [Flags] public enum SurfaceFlag : uint { /// /// Normally set on any surface that matches a RAD file entry; /// not actually written to the BSP, unlike Quake II. /// SURF_LIGHT = 0x0001, /// /// Deprecated: Legacy Quake II flag; deprecated in favor of /// surface properties. /// SURF_SLICK = 0x0002, /// /// Shows only the 2D skybox. Set via $Compile2DSky /// SURF_SKY2D = 0x0002, /// /// Shows both the 2D and 3D skybox. Set via $CompileSky /// SURF_SKY = 0x0004, /// /// Tells VVIS and the engine renderer that the surface is water. /// Set via %CompileWater, but not %CompileSlime. /// SURF_WARP = 0x0008, /// /// Surface is translucent, either via $translucent or $alpha. /// SURF_TRANS = 0x0010, /// /// Deprecated: Legacy Quake II flag; deprecated in favor of /// surface properties. /// SURF_WET = 0x0020, /// /// Set via %NoPortal /// SURF_NOPORTAL = 0x0020, /// /// Deprecated: Legacy Quake II flag; deprecated in favor of /// material proxies. /// SURF_FLOWING = 0x0040, /// /// Set via %CompileTrigger. Doesn't do anything in the PC versions. /// SURF_TRIGGER = 0x0040, /// /// Set via %CompileNoDraw /// SURF_NODRAW = 0x0080, /// /// Set via %CompileHint /// SURF_HINT = 0x0100, /// /// Set via %CompileSkip. Should never be used on anything except /// a hint brush. /// SURF_SKIP = 0x0200, /// /// Don't calculate light /// SURF_NOLIGHT = 0x0400, /// /// Calculate three lightmaps for the surface for bumpmapping /// SURF_BUMPLIGHT = 0x0800, /// /// Don't receive shadows /// SURF_NOSHADOWS = 0x1000, /// /// Don't receive decals /// SURF_NODECALS = 0x2000, /// /// Don't subdivide patches on this surface /// SURF_NOCHOP = 0x4000, /// /// Surface is part of a hitbox /// SURF_HITBOX = 0x8000, } /// [Flags] public enum TextureFlag : uint { /// /// Disable lightmaps and subdivision for the surface /// /// Used by sky and liquids DisableLightmaps = 0x01, } }