mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-05-06 20:43:44 +00:00
BOS.* -> BOS.*
This commit is contained in:
26
BinaryObjectScanner.Models/VBSP/Constants.cs
Normal file
26
BinaryObjectScanner.Models/VBSP/Constants.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace BinaryObjectScanner.Models.VBSP
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public static readonly byte[] SignatureBytes = new byte[] { 0x56, 0x42, 0x53, 0x50 };
|
||||
|
||||
public const string SignatureString = "VBSP";
|
||||
|
||||
public const uint SignatureUInt32 = 0x50534256;
|
||||
|
||||
/// <summary>
|
||||
/// Total number of lumps in the package
|
||||
/// </summary>
|
||||
public const int HL_VBSP_LUMP_COUNT = 64;
|
||||
|
||||
/// <summary>
|
||||
/// Index for the entities lump
|
||||
/// </summary>
|
||||
public const int HL_VBSP_LUMP_ENTITIES = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Index for the pakfile lump
|
||||
/// </summary>
|
||||
public const int HL_VBSP_LUMP_PAKFILE = 40;
|
||||
}
|
||||
}
|
||||
14
BinaryObjectScanner.Models/VBSP/File.cs
Normal file
14
BinaryObjectScanner.Models/VBSP/File.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace BinaryObjectScanner.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; }
|
||||
}
|
||||
}
|
||||
31
BinaryObjectScanner.Models/VBSP/Header.cs
Normal file
31
BinaryObjectScanner.Models/VBSP/Header.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace BinaryObjectScanner.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;
|
||||
}
|
||||
}
|
||||
20
BinaryObjectScanner.Models/VBSP/Lump.cs
Normal file
20
BinaryObjectScanner.Models/VBSP/Lump.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace BinaryObjectScanner.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;
|
||||
}
|
||||
}
|
||||
16
BinaryObjectScanner.Models/VBSP/LumpHeader.cs
Normal file
16
BinaryObjectScanner.Models/VBSP/LumpHeader.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace BinaryObjectScanner.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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user