From a9ef5367e5696602837900934df9b27ca15d944c Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 10 Mar 2011 05:27:43 +0100 Subject: MapObj lightmap support --- TestApp/Main.cs | 20 ++++++++++---------- TestApp/TestApp.pidb | Bin 4427 -> 4427 bytes TestApp/bin/Debug/NW4RTools.dll | Bin 235008 -> 236544 bytes TestApp/bin/Debug/NW4RTools.dll.mdb | Bin 113949 -> 114260 bytes TestApp/bin/Debug/TestApp.exe | Bin 7680 -> 7680 bytes TestApp/bin/Debug/TestApp.exe.mdb | Bin 1226 -> 1257 bytes 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'TestApp') diff --git a/TestApp/Main.cs b/TestApp/Main.cs index 3d7f063..eb3bcc8 100644 --- a/TestApp/Main.cs +++ b/TestApp/Main.cs @@ -11,9 +11,8 @@ namespace TestApp { public static void Main(string[] args) { string mdlPath = "/home/me/Games/Newer/ModelRev/"; - //skawo(); - //oldBehaviour(); - //return; + //skawo(); return; + //oldBehaviour(); return; // Going to create a model! @@ -23,7 +22,7 @@ namespace TestApp { ResFile rf = new ResFile(); - ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + filename + ".obj"), rf, resmdlname); + ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + filename + ".obj"), rf, resmdlname, ObjImporter.LightmapType.MapObj); File.WriteAllBytes(mdlPath + filename + ".brres", BrresWriter.WriteFile(rf)); @@ -73,7 +72,8 @@ namespace TestApp { private static void oldBehaviour() { string mdlPath = "/home/me/Games/Newer/ModelRev/"; - string mdlName = "lift_han_wood"; + string mdlName = "cobKinokoRed"; + //string mdlName = "lift_han_wood"; //string mdlName = "bgB_4502"; //string mdlName = "cobKoopaCastle"; //string mdlName = "waterPlate_W4boss"; @@ -84,11 +84,11 @@ namespace TestApp { byte[] file = File.ReadAllBytes(mdlPath + mdlName + ".brres"); ResFile rf = BrresReader.LoadFile(file); - /*using (var gw = new RenderWindow()) { + using (var gw = new RenderWindow()) { gw.Title = mdlName; gw.SetModel(rf, mdlName); gw.Run(1, 1); - }*/ + } //File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf)); @@ -98,9 +98,9 @@ namespace TestApp { kv.Value.Images[0].Save(mdlPath + "images/" + kv.Key + ".png"); } - var objFile = File.Open(mdlPath + "lift_han_wood_M.dae", FileMode.OpenOrCreate); - ColladaExporter.WriteModel(objFile, rf, "lift_han_wood_M"); - objFile.Close(); + //var objFile = File.Open(mdlPath + "lift_han_wood_M.dae", FileMode.OpenOrCreate); + //ColladaExporter.WriteModel(objFile, rf, "lift_han_wood_M"); + //objFile.Close(); } } } diff --git a/TestApp/TestApp.pidb b/TestApp/TestApp.pidb index 9242abe..ceb7cc4 100644 Binary files a/TestApp/TestApp.pidb and b/TestApp/TestApp.pidb differ diff --git a/TestApp/bin/Debug/NW4RTools.dll b/TestApp/bin/Debug/NW4RTools.dll index d8f19a2..b6af23d 100755 Binary files a/TestApp/bin/Debug/NW4RTools.dll and b/TestApp/bin/Debug/NW4RTools.dll differ diff --git a/TestApp/bin/Debug/NW4RTools.dll.mdb b/TestApp/bin/Debug/NW4RTools.dll.mdb index 330c38e..dea185a 100644 Binary files a/TestApp/bin/Debug/NW4RTools.dll.mdb and b/TestApp/bin/Debug/NW4RTools.dll.mdb differ diff --git a/TestApp/bin/Debug/TestApp.exe b/TestApp/bin/Debug/TestApp.exe index 75cf443..07e8e26 100755 Binary files a/TestApp/bin/Debug/TestApp.exe and b/TestApp/bin/Debug/TestApp.exe differ diff --git a/TestApp/bin/Debug/TestApp.exe.mdb b/TestApp/bin/Debug/TestApp.exe.mdb index f6489a1..08b9311 100644 Binary files a/TestApp/bin/Debug/TestApp.exe.mdb and b/TestApp/bin/Debug/TestApp.exe.mdb differ -- cgit v1.2.3