50 int Read(
void *pBuffer,
int nBytes)
override;
72 int Write(
const void *pBuffer,
int nBytes)
override;
83 int Seek(
int nOffset,
int nOrigin)
override;
113 return mTell == mSize;
146 return mUncompressedSize;
169 long long mArkOffset;
171 int mUncompressedSize;
int Tell() override
Report the position.
Definition arkfile.h:92
bool Eof() override
Report whether the position is at the end.
Definition arkfile.h:112
int Seek(int nOffset, int nOrigin) override
Move the position.
int Size() override
Report the size.
Definition arkfile.h:134
void Flush() override
Do nothing.
Definition arkfile.h:102
bool ReadAsync(void *pBuffer, int nBytes) override
Start reading bytes, one task for each block of the disc they cover.
~ArkFile() override
Drop the reads still waiting for the disc.
bool Fail() override
Report whether the file was not found.
Definition arkfile.h:123
int Read(void *pBuffer, int nBytes) override
Read bytes and wait for them.
bool ReadDone(int *pnBytes) override
Advance the disc cache and report whether every task of the read finished.
int UncompressedSize() override
Report the size before compression.
Definition arkfile.h:145
static const char * ArchivePath(const char *pszPath)
Express a path relative to the root of the game files, as the archive records it.
void TaskDone(int nBytes)
Count a finished task of the read.
ArkFile(const char *pszFile, int nMode)
Find a file in the main archive.
int Write(const void *pBuffer, int nBytes) override
Report that an archive file cannot be written.
Open file of the host or the disc.
Definition file.h:29
Growable text buffer that is also a PrnStream.
Definition string.h:19