MCPcopy Create free account
hub / github.com/diasurgical/devilution / DoMPQSearch_FileTable

Function DoMPQSearch_FileTable

3rdParty/StormLib/src/SFileFindFile.cpp:314–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

DoMPQSearchFunction · 0.85

Calls 1

DoMPQSearch_FileEntryFunction · 0.85

Tested by

no test coverage detected