MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetRemainingSize

Function GetRemainingSize

TombEngine/Specific/level.cpp:1432–1445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430
1431#ifdef _WIN64
1432long long GetRemainingSize(FILE* filePtr)
1433{
1434 auto current_position = _ftelli64(filePtr);
1435
1436 if (_fseeki64(filePtr, 0, SEEK_END) != 0)
1437 return NO_VALUE;
1438
1439 auto size = _ftelli64(filePtr);
1440
1441 if (_fseeki64(filePtr, current_position, SEEK_SET) != 0)
1442 return NO_VALUE;
1443
1444 return (size - current_position);
1445}
1446#else
1447long GetRemainingSize(FILE* filePtr)
1448{

Callers 1

ReadCompressedBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected