1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 18:49:54 +00:00
openmw-tes3mp/components/vfs/bsaarchive.hpp
2020-10-16 22:18:54 +04:00

34 lines
771 B
C++

#ifndef VFS_BSAARCHIVE_HPP_
#define VFS_BSAARCHIVE_HPP_
#include "archive.hpp"
#include <components/bsa/bsa_file.hpp>
namespace VFS
{
class BsaArchiveFile : public File
{
public:
BsaArchiveFile(const Bsa::BSAFile::FileStruct* info, Bsa::BSAFile* bsa);
Files::IStreamPtr open() override;
const Bsa::BSAFile::FileStruct* mInfo;
Bsa::BSAFile* mFile;
};
class BsaArchive : public Archive
{
public:
BsaArchive(const std::string& filename);
virtual ~BsaArchive();
void listResources(std::map<std::string, File*>& out, char (*normalize_function) (char)) override;
private:
std::unique_ptr<Bsa::BSAFile> mFile;
std::vector<BsaArchiveFile> mResources;
};
}
#endif