mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 13:57:59 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
30
components/nif/tests/nif_bsa_test.cpp
Normal file
30
components/nif/tests/nif_bsa_test.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
Runs NIFFile through all the NIFs in Morrowind.bsa.
|
||||
*/
|
||||
|
||||
#include "../nif_file.hpp"
|
||||
#include "../../bsa/bsa_file.hpp"
|
||||
#include "../../tools/stringops.hpp"
|
||||
#include <iostream>
|
||||
|
||||
using namespace Mangle::Stream;
|
||||
using namespace std;
|
||||
using namespace Nif;
|
||||
|
||||
int main(int argc, char **args)
|
||||
{
|
||||
BSAFile bsa;
|
||||
cout << "Reading Morrowind.bsa\n";
|
||||
bsa.open("../../data/Morrowind.bsa");
|
||||
|
||||
const BSAFile::FileList &files = bsa.getList();
|
||||
|
||||
for(int i=0; i<files.size(); i++)
|
||||
{
|
||||
const char *n = files[i].name;
|
||||
if(!ends(n, ".nif")) continue;
|
||||
|
||||
cout << "Decoding " << n << endl;
|
||||
NIFFile nif(bsa.getFile(n), n);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue