wavelength 1.0.0
Loading...
Searching...
No Matches
Archive.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "os/ArkHash.h"
6#include "os/FileEntry.h"
7#include "utl/Str.h"
8
15class Archive {
16public:
23 explicit Archive(const char *basename);
24
36 bool GetFileInfo(const char *name, __int64 &offset, int &size, int &ucSize);
37
43 void Read();
44
45 std::vector<FileEntry> mFileEntries;
46 ArkHash mHashTable;
47 String mBasename;
48 __int64 mArcBase;
49 int mReserved40; // +0x40, cleared by the constructor and not read.
50};
51
57extern Archive *gArchive;
58
65
72
83bool ArchiveGetFileInfo(const char *name, __int64 &offset, int &size, int &ucSize);
bool ArchiveGetFileInfo(const char *name, __int64 &offset, int &size, int &ucSize)
Find a file in the archive.
Archive * gArchive
The archive, created by ArchiveInit() when the files come from the disc.
void ArchiveInit()
Open the archive when the files come from the disc, and start the block manager.
void ArchivePreInit()
Clear the three words before gArchive.
The archive on the disc that the game files are read from.
Definition archive.h:27
bool GetFileInfo(const char *name, __int64 &offset, int &size, int &ucSize)
Find a file.
__int64 mArcBase
Definition Archive.h:48
void Read()
Read the header.
Archive(const char *basename)
Open an archive and read its header.
Hash table of the names of the files and directories of an archive.
Definition arkhash.h:12
Growable text buffer that is also a PrnStream.
Definition string.h:19