Added nif_bsa_test, tested nif reader on Morrowind.bsa
parent
7191c51828
commit
d6e4dc0b2a
@ -1,9 +1,12 @@
|
||||
GCC=g++
|
||||
|
||||
all: niftool
|
||||
all: niftool nif_bsa_test
|
||||
|
||||
niftool: niftool.cpp ../nif_file.h ../nif_file.cpp ../record.h
|
||||
$(GCC) $< ../nif_file.cpp ../../tools/stringops.cpp -o $@
|
||||
|
||||
nif_bsa_test: nif_bsa_test.cpp ../nif_file.cpp ../../bsa/bsa_file.cpp ../../tools/stringops.cpp
|
||||
$(GCC) $^ -o $@
|
||||
|
||||
clean:
|
||||
rm niftool
|
||||
rm niftool *_test
|
||||
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
Runs NIFFile through all the NIFs in Morrowind.bsa.
|
||||
*/
|
||||
|
||||
#include "../nif_file.h"
|
||||
#include "../../bsa/bsa_file.h"
|
||||
#include "../../tools/stringops.h"
|
||||
#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);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue