namespace SabreTools.Data.Models.XenonExecutable
{
///
/// Xenon (Xbox 360) Executable format optional header
/// This is a flexible metadata list of data types and either their value or a pointer to their value
///
///
///
public class OptionalHeader
{
///
/// Header type identifier
/// Known ID values are stored in Constants.OptionalHeaderTypes
///
/// Big-endian
public uint HeaderID { get; set; }
///
/// If lowest byte of HeaderID is 0x00/0x01, then HeaderOffset is the data itself
/// If the lowest byte is 0xFF, then HeaderOffset is the base offset into XEX file
/// and the first DWORD read is the total size to read
/// Otherwise, the lowest byte is the number of uint to read from HeaderOffset
///
/// Big-endian
public uint HeaderOffset { get; set; }
///
/// If HeaderData is a data offset, then HeaderDataBytes is variable-length data it points to
/// The meaning and structure of these bytes is dependent on the HeaderID value
/// If HeaderData is the data itself, then this field is null
///
public byte[]? HeaderData { get; set; }
}
}