| 12 | } |
| 13 | |
| 14 | bool GobArchive::create(const char *archivePath) |
| 15 | { |
| 16 | m_archiveOpen = m_file.open(archivePath, Stream::MODE_WRITE); |
| 17 | m_curFile = -1; |
| 18 | m_fileOffset = 0; |
| 19 | if (!m_archiveOpen) { return false; } |
| 20 | |
| 21 | memset(&m_header, 0, sizeof(GOB_Header_t)); |
| 22 | m_header.GOB_MAGIC[0] = 'G'; |
| 23 | m_header.GOB_MAGIC[1] = 'O'; |
| 24 | m_header.GOB_MAGIC[2] = 'B'; |
| 25 | m_header.GOB_MAGIC[3] = '\n'; |
| 26 | m_header.MASTERX = sizeof(GOB_Header_t); |
| 27 | |
| 28 | m_fileList.MASTERN = 0; |
| 29 | m_fileList.entries = nullptr; |
| 30 | |
| 31 | m_file.writeBuffer(&m_header, sizeof(GOB_Header_t)); |
| 32 | m_file.writeBuffer(&m_fileList.MASTERN, sizeof(u32)); |
| 33 | |
| 34 | strcpy(m_archivePath, archivePath); |
| 35 | m_file.close(); |
| 36 | |
| 37 | return true; |
| 38 | } |
| 39 | |
| 40 | bool GobArchive::validate(const char *archivePath, s32 minFileCount) |
| 41 | { |
nothing calls this directly
no test coverage detected