Files
SabreTools.Serialization/SabreTools.Data.Models/WAD3/DirEntry.cs
Matt Nadareski 7689c6dd07 Libraries
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
2026-03-21 16:26:56 -04:00

49 lines
1.3 KiB
C#

using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.WAD3
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/WADFile.h"/>
/// <see href="https://twhl.info/wiki/page/Specification:_WAD3"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class DirEntry
{
/// <summary>
/// Offset from the beginning of the WAD3 data
/// </summary>
public uint Offset;
/// <summary>
/// The entry's size in the archive in bytes
/// </summary>
public uint DiskLength;
/// <summary>
/// The entry's uncompressed size
/// </summary>
public uint Length;
/// <summary>
/// File type of the entry
/// </summary>
public FileType Type;
/// <summary>
/// Whether the file was compressed
/// </summary>
/// <remarks>Actually a boolean value</remarks>
public byte Compression;
/// <summary>
/// Padding
/// </summary>
public ushort Padding;
/// <summary>
/// Null-terminated texture name
/// </summary>
/// <remarks>16 bytes</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
public string Name = string.Empty;
}
}