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/VBSPFile.h"/>
|
|
|
|
|
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(Source)"/>
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
public sealed class VbspHeader
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// BSP file signature
|
|
|
|
|
/// </summary>
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
|
2025-10-31 13:59:28 -04:00
|
|
|
public string Signature = string.Empty;
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// BSP file version
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>17,18,19,20,21,22,23,25,27,29</remarks>
|
|
|
|
|
public int Version;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Lump directory array
|
|
|
|
|
/// </summary>
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.VBSP_HEADER_LUMPS)]
|
2025-10-30 21:21:56 -04:00
|
|
|
public VbspLumpEntry[] Lumps = new VbspLumpEntry[Constants.VBSP_HEADER_LUMPS];
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The map's revision (iteration, version) number.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int MapRevision;
|
|
|
|
|
}
|
|
|
|
|
}
|