+ MPQ Bitmap processign was moved to TFileStream

+ Preparing for implementation of master-mirror streaming (like Blizzard games do)
This commit is contained in:
Ladislav
2013-12-22 12:47:26 +01:00
parent ebd502e0c2
commit 3dd8d1198c
7 changed files with 1313 additions and 1365 deletions

View File

@@ -161,8 +161,13 @@ bool WINAPI SFileOpenArchive(
// Open the MPQ archive file
if(nError == ERROR_SUCCESS)
{
DWORD dwStreamFlags = (dwFlags & STREAM_FLAGS_MASK);
// If not forcing MPQ v 1.0, also use file bitmap
dwStreamFlags |= (dwFlags & MPQ_OPEN_FORCE_MPQ_V1) ? 0 : STREAM_FLAG_USE_BITMAP;
// Initialize the stream
pStream = FileStream_OpenFile(szMpqName, (dwFlags & STREAM_OPTIONS_MASK) | STREAM_FLAG_USE_BITMAP);
pStream = FileStream_OpenFile(szMpqName, dwStreamFlags);
if(pStream == NULL)
nError = GetLastError();
}