using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.WAD3
{
///
public sealed class MipTex : FileEntry
{
///
/// Null-terminated texture name
///
/// 16 bytes
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
public string Name = string.Empty;
///
/// Dimensions of the texture (must be divisible by 16)
///
public uint Width;
///
/// Dimensions of the texture (must be divisible by 16)
///
public uint Height;
///
/// Offset from start of this struct to each mipmap level's image
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public uint[] MipOffsets = new uint[4];
///
/// One MipMap for each mipmap level
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public MipMap[] MipImages = new MipMap[4];
///
/// Number of colors used in the palette (always 256 for GoldSrc)
///
public ushort ColorsUsed;
///
/// The color palette for the mipmaps (always 256 * 3 = 768 for GoldSrc)
///
/// [ColorsUsed][3]
public byte[][]? Palette { get; set; }
}
}