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

Function IsPartHeader

3rdParty/StormLib/src/FileStream.cpp:1435–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1433// Local functions - partial stream support
1434
1435static bool IsPartHeader(PPART_FILE_HEADER pPartHdr)
1436{
1437 // Version number must be 2
1438 if(pPartHdr->PartialVersion == 2)
1439 {
1440 // GameBuildNumber must be an ASCII number
1441 if(isdigit(pPartHdr->GameBuildNumber[0]) && isdigit(pPartHdr->GameBuildNumber[1]) && isdigit(pPartHdr->GameBuildNumber[2]))
1442 {
1443 // Block size must be power of 2
1444 if((pPartHdr->BlockSize & (pPartHdr->BlockSize - 1)) == 0)
1445 return true;
1446 }
1447 }
1448
1449 return false;
1450}
1451
1452static DWORD PartStream_CheckFile(TBlockStream * pStream)
1453{

Callers 1

PartStream_LoadBitmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected