summaryrefslogtreecommitdiff
path: root/src/StormLib.h
diff options
context:
space:
mode:
authorLadislav <zezula@volny.cz>2013-07-24 23:37:05 -0700
committerLadislav <zezula@volny.cz>2013-07-24 23:37:05 -0700
commit443c92349a38c8ba3b6ac798eb52ce82e5a068bb (patch)
tree6c22431d6358e0104093083071d80694af417841 /src/StormLib.h
parentd18ad30df72afd78dfa3456e524215bddca7c209 (diff)
parent426e0bb9c117fe043873d4c8f67e62a6ef034cf3 (diff)
Merge pull request #3 from Deaod/master
Make AddFile and Compact callbacks part of TMPQArchive
Diffstat (limited to 'src/StormLib.h')
-rw-r--r--src/StormLib.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/StormLib.h b/src/StormLib.h
index a355eb6..a2d5513 100644
--- a/src/StormLib.h
+++ b/src/StormLib.h
@@ -590,10 +590,10 @@ typedef struct _TMPQBlock
// Patch file information, preceding the sector offset table
typedef struct _TPatchInfo
{
- DWORD dwLength; // Length of patch info header, in bytes
- DWORD dwFlags; // Flags. 0x80000000 = MD5 (?)
- DWORD dwDataSize; // Uncompressed size of the patch file
- BYTE md5[0x10]; // MD5 of the entire patch file after decompression
+ DWORD dwLength; // Length of patch info header, in bytes
+ DWORD dwFlags; // Flags. 0x80000000 = MD5 (?)
+ DWORD dwDataSize; // Uncompressed size of the patch file
+ BYTE md5[0x10]; // MD5 of the entire patch file after decompression
// Followed by the sector table (variable length)
} TPatchInfo;
@@ -744,6 +744,14 @@ typedef struct _TMPQArchive
DWORD dwFileFlags2; // Flags for (attributes)
DWORD dwAttrFlags; // Flags for the (attributes) file, see MPQ_ATTRIBUTE_XXX
DWORD dwFlags; // See MPQ_FLAG_XXXXX
+
+ SFILE_ADDFILE_CALLBACK aAddFileCB; // Callback function for adding files
+ void * pvAddFileUserData; // User data thats passed to the callback
+
+ SFILE_COMPACT_CALLBACK aCompactCB; // Callback function for compacting the archive
+ void * pvCompactUserData; // User data thats passed to the callback
+ ULONGLONG CompactBytesProcessed; // Amount of bytes that have been processed during a particular compact call
+ ULONGLONG CompactTotalBytes; // Total amount of bytes to be compacted
} TMPQArchive;
// File handle structure