diff options
author | Ladislav Zezula <zezula@volny.cz> | 2020-12-13 12:32:25 +0100 |
---|---|---|
committer | Ladislav Zezula <zezula@volny.cz> | 2020-12-13 12:32:25 +0100 |
commit | 383e1572eecafdfe4f92ddad7a4bece069e12f38 (patch) | |
tree | 9c419d10e4cb4e2e569155f91cc93a7fdec62efc /src/SBaseCommon.cpp | |
parent | 866269d740b32cf209e5188c5269c4118f8be07b (diff) |
Added support for amternative MPQ markers
Diffstat (limited to 'src/SBaseCommon.cpp')
-rw-r--r-- | src/SBaseCommon.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/SBaseCommon.cpp b/src/SBaseCommon.cpp index 9003960..700c4a7 100644 --- a/src/SBaseCommon.cpp +++ b/src/SBaseCommon.cpp @@ -20,7 +20,10 @@ char StormLibCopyright[] = "StormLib v " STORMLIB_VERSION_STRING " Copyright Lad //-----------------------------------------------------------------------------
// Local variables
-LCID lcFileLocale = LANG_NEUTRAL; // File locale
+DWORD g_dwMpqSignature = ID_MPQ; // Marker for MPQ header
+DWORD g_dwHashTableKey = MPQ_KEY_HASH_TABLE; // Key for hash table
+DWORD g_dwBlockTableKey = MPQ_KEY_BLOCK_TABLE; // Key for block table
+LCID g_lcFileLocale = LANG_NEUTRAL; // File locale
USHORT wPlatform = 0; // File platform
//-----------------------------------------------------------------------------
@@ -630,7 +633,7 @@ TMPQArchive * IsValidMpqHandle(HANDLE hMpq) {
TMPQArchive * ha = (TMPQArchive *)hMpq;
- return (ha != NULL && ha->pHeader != NULL && ha->pHeader->dwID == ID_MPQ) ? ha : NULL;
+ return (ha != NULL && ha->pHeader != NULL && ha->pHeader->dwID == g_dwMpqSignature) ? ha : NULL;
}
TMPQFile * IsValidFileHandle(HANDLE hFile)
|