From 383e1572eecafdfe4f92ddad7a4bece069e12f38 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Sun, 13 Dec 2020 12:32:25 +0100 Subject: Added support for amternative MPQ markers --- test/StormTest.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test/StormTest.cpp') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 497ecee..8b54a43 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -322,6 +322,8 @@ static bool IsMpqExtension(LPCTSTR szFileName) return true; if(!_tcsicmp(szExtension, _T(".w3x"))) return true; + if(!_tcsicmp(szExtension, _T(".asi"))) + return true; if(!_tcsicmp(szExtension, _T(".mpqe"))) return true; if(!_tcsicmp(szExtension, _T(".part"))) @@ -994,7 +996,7 @@ static int VerifyFileMpqHeader(TLogHelper * pLogger, TFileStream * pStream, ULON memset(&Header, 0xFE, sizeof(TMPQHeader)); if(FileStream_Read(pStream, pByteOffset, &Header, sizeof(TMPQHeader))) { - if(Header.dwID != ID_MPQ) + if(Header.dwID != g_dwMpqSignature) { pLogger->PrintMessage(_T("Read error - the data is not a MPQ header")); nError = ERROR_FILE_CORRUPT; @@ -4253,6 +4255,13 @@ int _tmain(int argc, TCHAR * argv[]) // // Open all files from the command line // + /* + SFILE_MARKERS Markers = { sizeof(SFILE_MARKERS) }; + Markers.dwSignature = 'XHSC'; + Markers.szHashTableKey = "(cash table)"; + Markers.szBlockTableKey = "(clock table)"; + SFileSetArchiveMarkers(&Markers); + */ for(int i = 1; i < argc; i++) { -- cgit v1.2.3