|
wavelength 1.0.0
|
The archive on the disc that the game files are read from. More...
#include <archive.h>
Public Member Functions | |
| Archive (const char *pszBasename) | |
| Find an archive on the disc and read its header from the host or disc file system. | |
| bool | GetFileInfo (const char *pszFile, long long *pnOffset, int *pnSize, int *pnUncompressedSize) |
| Find a file in the archive. | |
| void | ReadHeader () |
| Read the file records and the name table of the archive. | |
| const std::vector< FileEntry > & | GetFileEntries () const |
| const String & | GetBasename () const |
| Archive (const char *basename) | |
| Open an archive and read its header. | |
| bool | GetFileInfo (const char *name, __int64 &offset, int &size, int &ucSize) |
| Find a file. | |
| void | Read () |
| Read the header. | |
Static Public Member Functions | |
| static void | Init () |
| Open the main archive when the game runs from the disc, and build the disc cache. | |
| static bool | Locate (const char *pszFile, long long *pnOffset, int *pnSize, int *pnUncompressedSize) |
| Find a file in the main archive. | |
Public Attributes | |
| __int64 | mArcBase |
The archive on the disc that the game files are read from.
Archive of the game files on the disc, gen/main.ark.
The class is not polymorphic and emits no RTTI, and the name is inferred.
The object is 0x48 bytes. The header stores the version, the file table, and the string hash table of the file and directory names.
|
explicit |
Find an archive on the disc and read its header from the host or disc file system.
| pszBasename | The archive, relative to the root of the game files. |
|
explicit |
Open an archive and read its header.
| basename | The path of the archive. |
|
static |
Open the main archive when the game runs from the disc, and build the disc cache.
|
static |
Find a file in the main archive.
| pszFile | The file, as ArkFile::ArchivePath() reports it. |
| pnOffset | Receives the byte of the disc the file starts at. |
| pnSize | Receives the size. |
| pnUncompressedSize | Receives the size before compression. |
| bool Archive::GetFileInfo | ( | const char * | pszFile, |
| long long * | pnOffset, | ||
| int * | pnSize, | ||
| int * | pnUncompressedSize ) |
Find a file in the archive.
| pszFile | The file, as ArkFile::ArchivePath() reports it. |
| pnOffset | Receives the byte of the disc the file starts at, or 0. |
| pnSize | Receives the size, or 0. |
| pnUncompressedSize | Receives the size before compression, or 0. |
| void Archive::ReadHeader | ( | ) |
Read the file records and the name table of the archive.
|
inline |
|
inline |
| bool Archive::GetFileInfo | ( | const char * | name, |
| __int64 & | offset, | ||
| int & | size, | ||
| int & | ucSize ) |
Find a file.
| name | The file's path relative to the root. |
| offset | Receives the offset of the file in the archive. |
| size | Receives the size of the file. |
| ucSize | Receives the size of the file before compression. |
| void Archive::Read | ( | ) |
Read the header.
Any version other than 2 is a failure.
| __int64 Archive::mArcBase |
Offset added to every file offset.