2014-12-18 16:26:57 +00:00
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
#include "rwbase.h"
|
|
|
|
#include "rwplugin.h"
|
|
|
|
#include "rw.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
// Rw::Version = 0x31000;
|
|
|
|
// Rw::Build = 0;
|
|
|
|
|
2014-12-19 15:24:29 +00:00
|
|
|
registerNodeNamePlugin();
|
|
|
|
registerMeshPlugin();
|
2014-12-20 17:13:45 +00:00
|
|
|
registerNativeDataPlugin();
|
2014-12-18 16:26:57 +00:00
|
|
|
Rw::Clump *c;
|
|
|
|
|
|
|
|
ifstream in(argv[1], ios::binary);
|
|
|
|
Rw::FindChunk(in, Rw::ID_CLUMP, NULL, NULL);
|
|
|
|
c = Rw::Clump::streamRead(in);
|
|
|
|
in.close();
|
|
|
|
|
2014-12-20 14:05:34 +00:00
|
|
|
ofstream out(argv[2], ios::binary);
|
2014-12-18 16:26:57 +00:00
|
|
|
c->streamWrite(out);
|
|
|
|
out.close();
|
|
|
|
|
|
|
|
delete c;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|