diff options
author | unknown <E:\Ladik\Mail> | 2015-03-13 17:06:51 +0100 |
---|---|---|
committer | unknown <E:\Ladik\Mail> | 2015-03-13 17:06:51 +0100 |
commit | c2261d51033088429ba960879dd4d9731e6f9bc1 (patch) | |
tree | 3b4d2e12b505721b3957879430b02e42e12ab1f7 /src/StormCommon.h | |
parent | 13c889a84d51692ea3f42e19f04c394bd2caf35d (diff) |
+ Support for MPQ.KangTooJee map protector
+ Compacting optimized
Diffstat (limited to 'src/StormCommon.h')
-rw-r--r-- | src/StormCommon.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/StormCommon.h b/src/StormCommon.h index dbd1d0d..cdca0b0 100644 --- a/src/StormCommon.h +++ b/src/StormCommon.h @@ -170,6 +170,9 @@ TMPQFile * IsValidFileHandle(HANDLE hFile); //----------------------------------------------------------------------------- // Support for MPQ file tables +ULONGLONG FileOffsetFromMpqOffset(TMPQArchive * ha, ULONGLONG MpqOffset); +ULONGLONG CalculateRawSectorOffset(TMPQFile * hf, DWORD dwSectorOffset); + int ConvertMpqHeaderToFormat4(TMPQArchive * ha, ULONGLONG MpqOffset, ULONGLONG FileSize, DWORD dwFlags); TMPQHash * FindFreeHashEntry(TMPQArchive * ha, DWORD dwStartIndex, DWORD dwName1, DWORD dwName2, LCID lcLocale); @@ -191,6 +194,9 @@ ULONGLONG FindFreeMpqSpace(TMPQArchive * ha); int CreateHashTable(TMPQArchive * ha, DWORD dwHashTableSize); int LoadAnyHashTable(TMPQArchive * ha); int BuildFileTable(TMPQArchive * ha); +int DefragmentFileTable(TMPQArchive * ha); +int ShrinkMalformedMpqTables(TMPQArchive * ha); + int RebuildHetTable(TMPQArchive * ha); int RebuildFileTable(TMPQArchive * ha, DWORD dwNewHashTableSize, DWORD dwNewMaxFileCount); int SaveMPQTables(TMPQArchive * ha); @@ -238,12 +244,11 @@ int SCompDecompressMpk(void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer // Common functions - MPQ File TMPQFile * CreateFileHandle(TMPQArchive * ha, TFileEntry * pFileEntry); -void * LoadMpqTable(TMPQArchive * ha, ULONGLONG ByteOffset, DWORD dwCompressedSize, DWORD dwRealSize, DWORD dwKey); +void * LoadMpqTable(TMPQArchive * ha, ULONGLONG ByteOffset, DWORD dwCompressedSize, DWORD dwRealSize, DWORD dwKey, bool * pbTableIsCut); int AllocateSectorBuffer(TMPQFile * hf); int AllocatePatchInfo(TMPQFile * hf, bool bLoadFromFile); int AllocateSectorOffsets(TMPQFile * hf, bool bLoadFromFile); int AllocateSectorChecksums(TMPQFile * hf, bool bLoadFromFile); -void CalculateRawSectorOffset(ULONGLONG & RawFilePos, TMPQFile * hf, DWORD dwSectorOffset); int WritePatchInfo(TMPQFile * hf); int WriteSectorOffsets(TMPQFile * hf); int WriteSectorChecksums(TMPQFile * hf); |