aboutsummaryrefslogtreecommitdiff
path: root/src/StormLib.h
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2021-12-18 07:24:46 +0100
committerGitHub <noreply@github.com>2021-12-18 07:24:46 +0100
commite29888e48a41879dba68e690a675324097802270 (patch)
treeac0102cb6c3b58e8eb4fe8d9132a2355b3394855 /src/StormLib.h
parent5ced3835f9d52584bc20fb6a3a0e58069374e9af (diff)
parente7af34bcfb5cba3c1ff6ac1b2ebd8c4ba47f1df4 (diff)
Merge pull request #232 from ladislav-zezula/LZ_CannotExtractCHK
Update for protected Starcraft I maps
Diffstat (limited to 'src/StormLib.h')
-rw-r--r--src/StormLib.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/StormLib.h b/src/StormLib.h
index f7279e6..1335f0e 100644
--- a/src/StormLib.h
+++ b/src/StormLib.h
@@ -25,7 +25,7 @@
/* hash table */
/* 08.12.03 4.11 DCH Fixed bug in reading file sector larger than 0x1000 */
/* on certain files. */
-/* Fixed bug in AddFile with MPQ_FILE_REPLACE_EXISTING */
+/* Fixed bug in AddFile with MPQ_FILE_REPLACEEXISTING */
/* (Thanx Daniel Chiamarello, dchiamarello@madvawes.com)*/
/* 21.12.03 4.50 Lad Completed port for Mac */
/* Fixed bug in compacting (if fsize is mul of 0x1000) */
@@ -193,7 +193,7 @@ extern "C" {
#define MPQ_FLAG_CHECK_SECTOR_CRC 0x00000020 // Checking sector CRC when reading files
#define MPQ_FLAG_SAVING_TABLES 0x00000040 // If set, we are saving MPQ internal files and MPQ tables
#define MPQ_FLAG_PATCH 0x00000080 // If set, this MPQ is a patch archive
-#define MPQ_FLAG_WAR3_MAP 0x00000100 // If set, this MPQ is a map for Warcraft III
+#define MPQ_FLAG_WAR3_MAP 0x00000100 // If set, this MPQ is a Warcraft III map
#define MPQ_FLAG_LISTFILE_NONE 0x00000200 // Set when no (listfile) was found in InvalidateInternalFiles
#define MPQ_FLAG_LISTFILE_NEW 0x00000400 // Set when (listfile) invalidated by InvalidateInternalFiles
#define MPQ_FLAG_LISTFILE_FORCE 0x00000800 // Save updated listfile on exit
@@ -250,6 +250,12 @@ extern "C" {
MPQ_FILE_SIGNATURE | \
MPQ_FILE_EXISTS)
+#define MPQ_FILE_VALID_FLAGS_SCX (MPQ_FILE_IMPLODE | \
+ MPQ_FILE_COMPRESS | \
+ MPQ_FILE_ENCRYPTED | \
+ MPQ_FILE_FIX_KEY | \
+ MPQ_FILE_EXISTS)
+
// We need to mask out the upper 4 bits of the block table index.
// This is because it gets shifted out when calculating block table offset
// BlockTableOffset = pHash->dwBlockIndex << 0x04
@@ -839,6 +845,7 @@ typedef struct _TMPQArchive
DWORD dwFileFlags2; // Flags for (attributes)
DWORD dwFileFlags3; // Flags for (signature)
DWORD dwAttrFlags; // Flags for the (attributes) file, see MPQ_ATTRIBUTE_XXX
+ DWORD dwValidFileFlags; // Valid flags for the current MPQ
DWORD dwFlags; // See MPQ_FLAG_XXXXX
DWORD dwSubType; // See MPQ_SUBTYPE_XXX