From 626c49312d80312f421a68e42ad052ba880c58e9 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Wed, 26 Feb 2025 20:56:05 +0100 Subject: Minors --- src/StormLib.h | 2 +- test/StormTest.cpp | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/StormLib.h b/src/StormLib.h index c4542d9..4392bc0 100644 --- a/src/StormLib.h +++ b/src/StormLib.h @@ -278,7 +278,7 @@ extern "C" { #define MPQ_COMPRESSION_ZLIB 0x02 // ZLIB compression #define MPQ_COMPRESSION_PKWARE 0x08 // PKWARE DCL compression #define MPQ_COMPRESSION_BZIP2 0x10 // BZIP2 compression (added in Warcraft III) -#define MPQ_COMPRESSION_SPARSE 0x20 // Sparse compression (added in Starcraft 2) +#define MPQ_COMPRESSION_SPARSE 0x20 // Run-length (sparse) compression (added in Starcraft 2) #define MPQ_COMPRESSION_ADPCM_MONO 0x40 // IMA ADPCM compression (mono) #define MPQ_COMPRESSION_ADPCM_STEREO 0x80 // IMA ADPCM compression (stereo) #define MPQ_COMPRESSION_LZMA 0x12 // LZMA compression. Added in Starcraft 2. This value is NOT a combination of flags. diff --git a/test/StormTest.cpp b/test/StormTest.cpp index afc4ab8..5a442a5 100755 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -3864,26 +3864,21 @@ static DWORD TestUtf8Conversions(const BYTE * szTestString, const TCHAR * szList static void Test_PlayingSpace() { -/* HANDLE hFile = NULL; HANDLE hMpq = NULL; - if(SFileOpenArchive(_T("\\Ladik\\Incoming\\texture.MPQ"), 0, STREAM_FLAG_READ_ONLY, &hMpq)) + if(SFileOpenArchive(_T("E:\\DIABDAT.MPQ"), 0, 0, &hMpq)) { - if(SFileOpenPatchArchive(hMpq, _T("\\Ladik\\Incoming\\patch.mpq"), NULL, 0)) + if(SFileOpenFileEx(hMpq, "d1221a.mpq", 0, &hFile)) { - if(SFileOpenFileEx(hMpq, "Creature\\GnomeSpidertank\\FlameLickSmallBlue.blp", 0, &hFile)) - { - DWORD dwBytesRead = 0; - BYTE Buffer[1024]; + DWORD dwBytesRead = 0; + BYTE Buffer[1024]; - SFileReadFile(hFile, Buffer, sizeof(Buffer), &dwBytesRead, NULL); - SFileCloseFile(hFile); - } + SFileReadFile(hFile, Buffer, sizeof(Buffer), &dwBytesRead, NULL); + SFileCloseFile(hFile); } SFileCloseArchive(hMpq); } -*/ } //----------------------------------------------------------------------------- -- cgit v1.2.3