summaryrefslogtreecommitdiff
path: root/TestApp/Main.cs
blob: a4d9545f90705cbe4e90ca292f2d65acdf3ce13c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.IO;
using NW4RTools;

namespace TestApp {
	class MainClass {
		public static void Main(string[] args) {
			string mdlPath = "/home/me/Games/Newer/ModelRev/";

			string mdlName = "CS_W1";
			//string mdlName = "bgB_4502";

			byte[] file = File.ReadAllBytes(mdlPath + mdlName + ".brres");
			ResFile rf = BrresReader.LoadFile(file);

			//var objFile = File.Open(mdlPath + mdlName + ".obj", FileMode.OpenOrCreate);
			var objFile = File.Open(mdlPath + mdlName + ".dae", FileMode.OpenOrCreate);
			//var sw = new StreamWriter(objFile);
			//ObjWriter.WriteModel(sw, rf, mdlName);
			ColladaWriter.WriteModel(objFile, rf, mdlName);
			objFile.Close();
		}
	}
}