From: ShadowFlare Date: Tue, 5 Jan 2010 13:00:57 +0000 (-0700) Subject: Move bitmasks for unsupported compression types from MPQ library to SComp. X-Git-Url: https://sfsrealm.hopto.org/projects/?a=commitdiff_plain;h=0379c6fe345dcaa49a6624f51a02bc494eebde51;p=SComp.git Move bitmasks for unsupported compression types from MPQ library to SComp. --- diff --git a/SComp.cpp b/SComp.cpp index f02fea6..19b47a9 100644 --- a/SComp.cpp +++ b/SComp.cpp @@ -92,6 +92,25 @@ typedef struct { unsigned int FillInput(char *lpvBuffer, unsigned int *lpdwSize, void *param); void FillOutput(char *lpvBuffer, unsigned int *lpdwSize, void *param); +const unsigned int UNSUPPORTED_COMPRESSION = (0xFF ^ (0x40 | 0x80 | 0x01 +#ifdef USE_ZLIB + | 0x02 +#endif + | 0x08 +#ifdef USE_BZIP2 + | 0x10 +#endif + )); +const unsigned int UNSUPPORTED_DECOMPRESSION = (0xFF ^ (0x40 | 0x80 | 0x01 +#ifdef USE_ZLIB + | 0x02 +#endif + | 0x08 +#ifdef USE_BZIP2 + | 0x10 +#endif + )); + CompressFunc CompressionFunctions[] = { {0x40, CompressWaveMono}, diff --git a/SComp.h b/SComp.h index 37a8e93..dd5d53f 100644 --- a/SComp.h +++ b/SComp.h @@ -14,6 +14,9 @@ extern "C" { #endif +extern const unsigned int UNSUPPORTED_COMPRESSION; +extern const unsigned int UNSUPPORTED_DECOMPRESSION; + BOOL WINAPI SCompCompress(LPVOID lpvDestinationMem, LPDWORD lpdwCompressedSize, LPVOID lpvSourceMem, DWORD dwDecompressedSize, DWORD dwCompressionType, DWORD dwCompressionSubType, DWORD dwCompressLevel); BOOL WINAPI SCompDecompress(LPVOID lpvDestinationMem, LPDWORD lpdwDecompressedSize, LPVOID lpvSourceMem, DWORD dwCompressedSize);