From 31380b4bb93d1fb65faff8f71753de80fb0a8c9d Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 20 Feb 2012 05:30:01 +0100 Subject: AnmChr/Clr/TexSrt writing done for now. Not 100% perfect but it works! --- TestApp/Main.cs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) mode change 100644 => 100755 TestApp/Main.cs (limited to 'TestApp/Main.cs') diff --git a/TestApp/Main.cs b/TestApp/Main.cs old mode 100644 new mode 100755 index 9d01957..a61577f --- a/TestApp/Main.cs +++ b/TestApp/Main.cs @@ -9,10 +9,14 @@ using OpenTK.Graphics.OpenGL; namespace TestApp { class MainClass { public static void Main(string[] args) { + blah(args); + return; + string mdlPath = "/home/me/Games/Newer/ModelRev/"; //skawo(); return; - oldBehaviour(); return; + oldBehaviour(); + return; // Going to create a model! @@ -116,6 +120,29 @@ namespace TestApp { //ColladaExporter.WriteModel(objFile, rf, "lift_han_wood_M"); //objFile.Close(); } + + + private static void blah(string[] args) { + string mdlPath; + if (Directory.Exists("/home/me")) + mdlPath = "/home/me/Games/Newer/WaterL/"; + else + mdlPath = "Z:/stuff/Games/Newer/WaterL/"; + + ResFile rf = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4.brres")); + File.WriteAllBytes(mdlPath + "CS_W4a.brres", BrresWriter.WriteFile(rf)); + + if (args.Length > 0 && args [0] == "a") { + ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4a.brres")); + File.WriteAllBytes(mdlPath + "CS_W4b.brres", BrresWriter.WriteFile(rf2)); + ResFile rf3 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4b.brres")); + File.WriteAllBytes(mdlPath + "CS_W4c.brres", BrresWriter.WriteFile(rf3)); + ResFile rf4 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4c.brres")); + File.WriteAllBytes(mdlPath + "CS_W4d.brres", BrresWriter.WriteFile(rf4)); + ResFile rf5 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4d.brres")); + File.WriteAllBytes(mdlPath + "CS_W4e.brres", BrresWriter.WriteFile(rf5)); + } + } } } -- cgit v1.2.3