1#ifdef INCLUDE_MPQ_SUPPORT
11#include <unordered_map>
14#include <unordered_set>
45 OtrArchive(
const std::string& archivePath, std::shared_ptr<ResourceManager> resourceManager =
nullptr,
46 std::shared_ptr<Keystore> keystore =
nullptr);
67 bool WriteFile(
const std::string& filename,
const std::vector<uint8_t>& data);
74 std::shared_ptr<File>
LoadFile(
const std::string& filePath);
Abstract base class representing a mounted archive (OTR, O2R, or folder).
Definition Archive.h:61
Archive implementation backed by an MPQ file (Blizzard's MoPaQ format).
Definition OtrArchive.h:39
bool WriteFile(const std::string &filename, const std::vector< uint8_t > &data)
Writes raw data to a file entry inside the MPQ archive.
bool Close()
Closes the MPQ file handle and releases StormLib resources.
std::shared_ptr< File > LoadFile(const std::string &filePath)
Loads a file from the archive by its virtual path.
bool Open()
Opens the underlying MPQ file via StormLib.
OtrArchive(const std::string &archivePath, std::shared_ptr< ResourceManager > resourceManager=nullptr, std::shared_ptr< Keystore > keystore=nullptr)
Constructs an OtrArchive for the given MPQ file path.
std::shared_ptr< File > LoadFile(uint64_t hash)
Loads a file from the archive by its 64-bit hash.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14