Files
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

45 lines
1.4 KiB
C#

using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.VPK
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/VPKFile.h"/>
/// <see href="https://developer.valvesoftware.com/wiki/VPK_(file_format)"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryEntry
{
/// <summary>
/// A 32bit CRC of the file's data.
/// </summary>
public uint CRC;
/// <summary>
/// The number of bytes contained in the index file.
/// </summary>
public ushort PreloadBytes;
/// <summary>
/// A zero based index of the archive this file's data is contained in.
/// If 0x7fff, the data follows the directory.
/// </summary>
public ushort ArchiveIndex;
/// <summary>
/// If ArchiveIndex is 0x7fff, the offset of the file data relative to the
/// end of the directory (see the header for more details).
/// Otherwise, the offset of the data from the start of the specified archive.
/// </summary>
public uint EntryOffset;
/// <summary>
/// If zero, the entire file is stored in the preload data.
/// Otherwise, the number of bytes stored starting at EntryOffset.
/// </summary>
public uint EntryLength;
/// <summary>
/// Always 0xffff.
/// </summary>
public ushort Dummy0;
}
}