|
|
|
@ -5,14 +5,15 @@ namespace VFS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BsaArchive::BsaArchive(const std::string &filename)
|
|
|
|
|
: mFileName(filename)
|
|
|
|
|
{
|
|
|
|
|
mFile.open(filename);
|
|
|
|
|
load();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Bsa::BSAFile::FileList &filelist = mFile.getList();
|
|
|
|
|
for(Bsa::BSAFile::FileList::const_iterator it = filelist.begin();it != filelist.end();++it)
|
|
|
|
|
void BsaArchive::reset()
|
|
|
|
|
{
|
|
|
|
|
mResources.push_back(BsaArchiveFile(&*it, &mFile));
|
|
|
|
|
}
|
|
|
|
|
mResources.clear();
|
|
|
|
|
load();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BsaArchive::listResources(std::map<std::string, File *> &out, char (*normalize_function)(char))
|
|
|
|
@ -26,6 +27,17 @@ void BsaArchive::listResources(std::map<std::string, File *> &out, char (*normal
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BsaArchive::load()
|
|
|
|
|
{
|
|
|
|
|
mFile.open(mFileName);
|
|
|
|
|
|
|
|
|
|
const Bsa::BSAFile::FileList &filelist = mFile.getList();
|
|
|
|
|
for(Bsa::BSAFile::FileList::const_iterator it = filelist.begin();it != filelist.end();++it)
|
|
|
|
|
{
|
|
|
|
|
mResources.push_back(BsaArchiveFile(&*it, &mFile));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
BsaArchiveFile::BsaArchiveFile(const Bsa::BSAFile::FileStruct *info, Bsa::BSAFile* bsa)
|
|
|
|
|