| 340 | } |
| 341 | |
| 342 | bool CGhostLoader::Load(const char *pFilename, const char *pMap, const SHA256_DIGEST &MapSha256, unsigned MapCrc) |
| 343 | { |
| 344 | dbg_assert(!m_File, "File already open"); |
| 345 | |
| 346 | CGhostHeader Header; |
| 347 | IOHANDLE File = ReadHeader(Header, pFilename, pMap, MapSha256, MapCrc, true); |
| 348 | if(!File) |
| 349 | { |
| 350 | return false; |
| 351 | } |
| 352 | |
| 353 | if(Header.m_Version < 6) |
| 354 | { |
| 355 | io_skip(File, -(int)sizeof(SHA256_DIGEST)); |
| 356 | } |
| 357 | |
| 358 | m_File = File; |
| 359 | str_copy(m_aFilename, pFilename); |
| 360 | m_Header = Header; |
| 361 | m_Info = m_Header.ToGhostInfo(); |
| 362 | m_LastItem.Reset(); |
| 363 | ResetBuffer(); |
| 364 | return true; |
| 365 | } |
| 366 | |
| 367 | bool CGhostLoader::ReadChunk(int *pType) |
| 368 | { |
no test coverage detected