MCPcopy Create free account
hub / github.com/Kenix3/libultraship / DoMPQSearch_FileTable

Function DoMPQSearch_FileTable

extern/StormLib/src/SFileFindFile.cpp:316–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316static DWORD DoMPQSearch_FileTable(TMPQSearch * hs, SFILE_FIND_DATA * lpFindFileData, TMPQArchive * ha)
317{
318 TFileEntry * pFileTableEnd = ha->pFileTable + ha->dwFileTableSize;
319 TFileEntry * pFileEntry;
320
321 // Parse the file table
322 for(pFileEntry = ha->pFileTable + hs->dwNextIndex; pFileEntry < pFileTableEnd; pFileEntry++)
323 {
324 // Increment the next index for subsequent search
325 hs->dwNextIndex++;
326
327 // Check if this file entry should be included in the search result
328 if(DoMPQSearch_FileEntry(hs, lpFindFileData, ha, NULL, pFileEntry))
329 return ERROR_SUCCESS;
330 }
331
332 // No more files
333 return ERROR_NO_MORE_FILES;
334}
335
336// Performs one MPQ search
337static DWORD DoMPQSearch(TMPQSearch * hs, SFILE_FIND_DATA * lpFindFileData)

Callers 1

DoMPQSearchFunction · 0.85

Calls 1

DoMPQSearch_FileEntryFunction · 0.85

Tested by

no test coverage detected