mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-14 02:02:57 +00:00
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.
45 lines
1.4 KiB
C#
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;
|
|
}
|
|
}
|