diff options
Diffstat (limited to 'TestApp/Main.cs')
-rw-r--r-- | TestApp/Main.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs index b9a8f13..a5db889 100644 --- a/TestApp/Main.cs +++ b/TestApp/Main.cs @@ -11,7 +11,7 @@ namespace TestApp { public static void Main(string[] args) { string mdlPath = "/home/me/Games/Newer/ModelRev/"; - //string mdlName = "CS_W1"; + /*//string mdlName = "CS_W1"; //string mdlName = "bgB_4502"; //string mdlName = "cobKoopaCastle"; string mdlName = "waterPlate_W4boss"; @@ -22,7 +22,22 @@ namespace TestApp { byte[] file = File.ReadAllBytes(mdlPath + mdlName + ".brres"); ResFile rf = BrresReader.LoadFile(file); - File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf)); + File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf));*/ + + // Going to create a model! + ResFile rf = new ResFile(); + + ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "crapmap.obj"), rf, "CrapMap"); + + File.WriteAllBytes(mdlPath + "crapmap.brres", BrresWriter.WriteFile(rf)); + + + ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "crapmap.brres")); + using (var gw = new RenderWindow()) { + gw.Title = "crapmap"; + gw.SetModel(rf2, "CrapMap"); + gw.Run(1, 1); + } /*using (var gw = new RenderWindow()) { gw.Title = mdlName; |