aboutsummaryrefslogtreecommitdiff
path: root/src/StormLib.h
diff options
context:
space:
mode:
authorLadislav Zezula <E:\Ladik\Mail>2016-05-27 16:50:50 +0200
committerLadislav Zezula <E:\Ladik\Mail>2016-05-27 16:50:50 +0200
commit47b6b6eb4addd82a89d6bcd8fa92f9c0a09a5781 (patch)
tree5fb9c92f6352c9275d27d6ebb9aee87e20c75151 /src/StormLib.h
parentf1655f8afe2ef76d4906eb3e94dfd3c2b5241eb4 (diff)
+ Support for MPQs that have invalid (and ignored) flags in the block table
+ Support for MPQs that have malformed block indexes (0x8000xxxx or 0x4000xxxx)
Diffstat (limited to 'src/StormLib.h')
-rw-r--r--src/StormLib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/StormLib.h b/src/StormLib.h
index 22658bd..c25a1a8 100644
--- a/src/StormLib.h
+++ b/src/StormLib.h
@@ -218,7 +218,6 @@ extern "C" {
#define MPQ_FILE_REPLACEEXISTING 0x80000000 // Replace when the file exist (SFileAddFile)
#define MPQ_FILE_COMPRESS_MASK 0x0000FF00 // Mask for a file being compressed
-#define MPQ_FILE_EXISTS_MASK 0xF00000FF // These must be either zero or MPQ_FILE_EXISTS
#define MPQ_FILE_VALID_FLAGS (MPQ_FILE_IMPLODE | \
MPQ_FILE_COMPRESS | \
@@ -231,6 +230,8 @@ extern "C" {
MPQ_FILE_SIGNATURE | \
MPQ_FILE_EXISTS)
+#define MPQ_BLOCK_INDEX(bi) ((bi) & 0x0FFFFFFF) // Index mask for block table index
+
// Compression types for multiple compressions
#define MPQ_COMPRESSION_HUFFMANN 0x01 // Huffmann compression (used on WAVE files only)
#define MPQ_COMPRESSION_ZLIB 0x02 // ZLIB compression