2025-09-26 10:57:15 -04:00
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2025-09-26 13:06:18 -04:00
|
|
|
namespace SabreTools.Data.Models.BSP
|
2025-09-26 10:57:15 -04:00
|
|
|
{
|
|
|
|
|
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
|
|
|
|
|
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(GoldSrc)"/>
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
public sealed class BspHeader
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Version
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>Must be 30 for a valid HL BSP file</remarks>
|
|
|
|
|
public int Version;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Lumps
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>15 entries</remarks>
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.BSP_HEADER_LUMPS)]
|
2025-10-30 21:21:56 -04:00
|
|
|
public BspLumpEntry[] Lumps = new BspLumpEntry[Constants.BSP_HEADER_LUMPS];
|
2025-09-26 10:57:15 -04:00
|
|
|
}
|
2025-10-30 21:21:56 -04:00
|
|
|
}
|