Files

49 lines
1.3 KiB
C#
Raw Permalink Normal View History

2025-09-26 10:57:15 -04:00
using System.Runtime.InteropServices;
2025-09-26 13:06:18 -04:00
namespace SabreTools.Data.Models.WAD3
2025-09-26 10:57:15 -04:00
{
/// <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;
2025-09-26 10:57:15 -04:00
}
}