using System.Runtime.InteropServices; namespace SabreTools.Data.Models.MoPaQ { /// /// MPQ User Data are optional, and is commonly used in custom maps for /// Starcraft II. If MPQ User Data header is present, it contains an offset, /// from where the MPQ header should be searched. /// /// [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public sealed class UserData { /// /// The user data signature /// /// /// 4 bytes [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] public string Signature = string.Empty; /// /// Maximum size of the user data /// public uint UserDataSize; /// /// Offset of the MPQ header, relative to the beginning of this header /// public uint HeaderOffset; /// /// Appears to be size of user data header (Starcraft II maps) /// public uint UserDataHeaderSize; // TODO: Does this area contain extra data that should be read in? } }