+ Support for SQP and MPK archives

+ Makefiles fixed
This commit is contained in:
Ladislav Zezula
2013-11-13 07:56:31 +01:00
parent 66b71713c2
commit a70863499e
20 changed files with 1521 additions and 662 deletions

View File

@@ -56,7 +56,9 @@ static int WriteNakedMPQHeader(TMPQArchive * ha)
Header.wSectorSize = pHeader->wSectorSize;
// Write it to the file
BSWAP_TMPQHEADER(&Header);
BSWAP_TMPQHEADER(&Header, MPQ_FORMAT_VERSION_1);
BSWAP_TMPQHEADER(&Header, MPQ_FORMAT_VERSION_3);
BSWAP_TMPQHEADER(&Header, MPQ_FORMAT_VERSION_4);
if(!FileStream_Write(ha->pStream, &ha->MpqPos, &Header, dwBytesToWrite))
nError = GetLastError();
@@ -172,6 +174,7 @@ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCrea
if(nError == ERROR_SUCCESS)
{
memset(ha, 0, sizeof(TMPQArchive));
ha->pfnHashString = HashString;
ha->pStream = pStream;
ha->dwSectorSize = pCreateInfo->dwSectorSize;
ha->UserDataPos = MpqPos;