Migrate recent HLLib work to BOS

It's better suited for the model of BOS and not an update to HLLibSharp
This commit is contained in:
Matt Nadareski
2022-12-24 12:57:10 -08:00
parent 3a862f343c
commit d8aec5aa97
101 changed files with 5399 additions and 22 deletions

View File

@@ -0,0 +1,14 @@
namespace BurnOutSharp.Models.VBSP
{
/// <summary>
/// Half-Life 2 Level
/// </summary>
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/VBSPFile.h"/>
public sealed class File
{
/// <summary>
/// Directory header data
/// </summary>
public Header Header { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
namespace BurnOutSharp.Models.VBSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/VBSPFile.h"/>
public sealed class Header
{
/// <summary>
/// BSP file signature.
/// </summary>
public string Signature;
/// <summary>
/// BSP file version.
/// </summary>
/// <remarks>
/// 19-20: Source
/// 21: Source - The lump version property was moved to the start of the struct.
/// 0x00040014: Dark Messiah - Looks like the 32 bit version has been split into two 16 bit fields.
/// </remarks>
public int Version;
/// <summary>
/// Lumps.
/// </summary>
public Lump[] Lumps;
/// <summary>
/// The map's revision (iteration, version) number.
/// </summary>
public int MapRevision;
}
}

View File

@@ -0,0 +1,20 @@
namespace BurnOutSharp.Models.VBSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/VBSPFile.h"/>
public sealed class Lump
{
public uint Offset;
public uint Length;
/// <summary>
/// Default to zero.
/// </summary>
public uint Version;
/// <summary>
/// Default to (char)0, (char)0, (char)0, (char)0.
/// </summary>
public char[] FourCC;
}
}

View File

@@ -0,0 +1,16 @@
namespace BurnOutSharp.Models.VBSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/VBSPFile.h"/>
public sealed class LumpHeader
{
public int LumpOffset;
public int LumpID;
public int LumpVersion;
public int LumpLength;
public int MapRevision;
}
}