mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-09-22 22:57:11 +00:00
Add layouts for some GCF models
This commit is contained in:
@@ -1,46 +1,45 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.GCF
|
||||
{
|
||||
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class DirectoryEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Offset to the directory item name from the end of the directory items.
|
||||
/// </summary>
|
||||
public uint NameOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Directory item name from the end of the directory items.
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
public uint NameOffset;
|
||||
|
||||
/// <summary>
|
||||
/// Size of the item. (If file, file size. If folder, num items.)
|
||||
/// </summary>
|
||||
public uint ItemSize { get; set; }
|
||||
public uint ItemSize;
|
||||
|
||||
/// <summary>
|
||||
/// Checksome index. (0xFFFFFFFF == None).
|
||||
/// </summary>
|
||||
public uint ChecksumIndex { get; set; }
|
||||
public uint ChecksumIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Flags for the directory item. (0x00000000 == Folder).
|
||||
/// </summary>
|
||||
public HL_GCF_FLAG DirectoryFlags { get; set; }
|
||||
[MarshalAs(UnmanagedType.U4)]
|
||||
public HL_GCF_FLAG DirectoryFlags;
|
||||
|
||||
/// <summary>
|
||||
/// Index of the parent directory item. (0xFFFFFFFF == None).
|
||||
/// </summary>
|
||||
public uint ParentIndex { get; set; }
|
||||
public uint ParentIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Index of the next directory item. (0x00000000 == None).
|
||||
/// </summary>
|
||||
public uint NextIndex { get; set; }
|
||||
public uint NextIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Index of the first directory item. (0x00000000 == None).
|
||||
/// </summary>
|
||||
public uint FirstIndex { get; set; }
|
||||
public uint FirstIndex;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user