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 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'TestApp/Main.cs') 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(); } } } -- cgit v1.2.3