2024-04-23 13:30:43 -04:00
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2023-09-04 00:12:49 -04:00
|
|
|
namespace SabreTools.Models.GCF
|
2023-09-04 00:11:04 -04:00
|
|
|
{
|
|
|
|
|
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
|
2024-04-23 13:30:43 -04:00
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
2023-09-04 00:11:04 -04:00
|
|
|
public sealed class BlockEntry
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Flags for the block entry. 0x200F0000 == Not used.
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint EntryFlags;
|
2023-09-04 00:11:04 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The offset for the data contained in this block entry in the file.
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint FileDataOffset;
|
2023-09-04 00:11:04 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The length of the data in this block entry.
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint FileDataSize;
|
2023-09-04 00:11:04 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The offset to the first data block of this block entry's data.
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint FirstDataBlockIndex;
|
2023-09-04 00:11:04 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The next block entry in the series. (N/A if == BlockCount.)
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint NextBlockEntryIndex;
|
2023-09-04 00:11:04 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The previous block entry in the series. (N/A if == BlockCount.)
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint PreviousBlockEntryIndex;
|
2023-09-04 00:11:04 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The offset of the block entry in the directory.
|
|
|
|
|
/// </summary>
|
2024-04-23 13:30:43 -04:00
|
|
|
public uint DirectoryIndex;
|
2023-09-04 00:11:04 -04:00
|
|
|
}
|
|
|
|
|
}
|