openmw-tes3coop/components/vfs/bsaarchive.hpp
Kyle Cooley 8c4b12a603 VFS changes, one VFS and resource system per document.
Added ability to reset a VFS::Manager.
Removed ability to rebuild the index for a VFS::Manager.
Moved VFS creation to CSM::Data.
2017-08-21 22:31:19 -04:00

40 lines
778 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);
virtual Files::IStreamPtr open();
const Bsa::BSAFile::FileStruct* mInfo;
Bsa::BSAFile* mFile;
};
class BsaArchive : public Archive
{
public:
BsaArchive(const std::string& filename);
virtual void listResources(std::map<std::string, File*>& out, char (*normalize_function) (char));
private:
void load();
std::string mFileName;
Bsa::BSAFile mFile;
std::vector<BsaArchiveFile> mResources;
};
}
#endif