using System;
namespace BurnOutSharp.Models.MoPaQ
{
///
/// Compression types for multiple compressions
///
[Flags]
public enum CompressionType : uint
{
///
/// Huffmann compression (used on WAVE files only)
///
MPQ_COMPRESSION_HUFFMANN = 0x01,
///
/// ZLIB compression
///
MPQ_COMPRESSION_ZLIB = 0x02,
///
/// PKWARE DCL compression
///
MPQ_COMPRESSION_PKWARE = 0x08,
///
/// BZIP2 compression (added in Warcraft III)
///
MPQ_COMPRESSION_BZIP2 = 0x10,
///
/// Sparse compression (added in Starcraft 2)
///
MPQ_COMPRESSION_SPARSE = 0x20,
///
/// IMA ADPCM compression (mono)
///
MPQ_COMPRESSION_ADPCM_MONO = 0x40,
///
/// IMA ADPCM compression (stereo)
///
MPQ_COMPRESSION_ADPCM_STEREO = 0x80,
///
/// LZMA compression. Added in Starcraft 2. This value is NOT a combination of flags.
///
MPQ_COMPRESSION_LZMA = 0x12,
///
/// Same compression
///
MPQ_COMPRESSION_NEXT_SAME = 0xFFFFFFFF,
}
[Flags]
public enum FileFlags : uint
{
///
/// File is compressed using PKWARE Data compression library
///
MPQ_FILE_IMPLODE = 0x00000100,
///
/// File is compressed using combination of compression methods
///
MPQ_FILE_COMPRESS = 0x00000200,
///
/// The file is encrypted
///
MPQ_FILE_ENCRYPTED = 0x00010000,
///
/// The decryption key for the file is altered according to the
/// position of the file in the archive
///
MPQ_FILE_FIX_KEY = 0x00020000,
///
/// The file contains incremental patch for an existing file in base MPQ
///
MPQ_FILE_PATCH_FILE = 0x00100000,
///
/// Instead of being divided to 0x1000-bytes blocks, the file is stored
/// as single unit
///
MPQ_FILE_SINGLE_UNIT = 0x01000000,
///
/// File is a deletion marker, indicating that the file no longer exists.
/// This is used to allow patch archives to delete files present in
/// lower-priority archives in the search chain. The file usually has
/// length of 0 or 1 byte and its name is a hash
///
MPQ_FILE_DELETE_MARKER = 0x02000000,
///
/// File has checksums for each sector (explained in the File Data section).
/// Ignored if file is not compressed or imploded.
///
MPQ_FILE_SECTOR_CRC = 0x04000000,
///
/// Set if file exists, reset when the file was deleted
///
MPQ_FILE_EXISTS = 0x80000000,
}
public enum FormatVersion : ushort
{
///
/// Format 1 (up to The Burning Crusade)
///
Format1 = 0,
///
/// Format 2 (The Burning Crusade and newer)
///
Format2 = 1,
///
/// Format 3 (WoW - Cataclysm beta or newer)
///
Format3 = 2,
///
/// Format 4 (WoW - Cataclysm beta or newer)
///
Format4 = 3,
}
public enum Locale : short
{
Neutral = 0,
AmericanEnglish = 0,
ChineseTaiwan = 0x404,
Czech = 0x405,
German = 0x407,
English = 0x409,
Spanish = 0x40A,
French = 0x40C,
Italian = 0x410,
Japanese = 0x411,
Korean = 0x412,
Polish = 0x415,
Portuguese = 0x416,
Russian = 0x419,
EnglishUK = 0x809,
}
public enum PatchType : uint
{
///
/// Blizzard-modified version of BSDIFF40 incremental patch
///
BSD0 = 0x30445342,
///
/// Unknown
///
BSDP = 0x50445342,
///
/// Plain replace
///
COPY = 0x59504F43,
///
/// Unknown
///
COUP = 0x50554F43,
///
/// Unknown
///
CPOG = 0x474F5043,
}
}