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 +++++++++++++- TestApp/TestApp.csproj | 102 ++++++++++++++++++++++++------------------------- 2 files changed, 79 insertions(+), 52 deletions(-) mode change 100644 => 100755 TestApp/Main.cs (limited to 'TestApp') 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)); + } + } } } diff --git a/TestApp/TestApp.csproj b/TestApp/TestApp.csproj index d21525e..4168d26 100644 --- a/TestApp/TestApp.csproj +++ b/TestApp/TestApp.csproj @@ -1,51 +1,51 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {3A064CD8-CFAD-412D-986F-ED7D2D54CDB1} - Exe - TestApp - TestApp - v3.5 - - - true - full - false - bin\Debug - DEBUG - prompt - 4 - true - - - none - false - bin\Release - prompt - 4 - true - - - - - False - ..\ExternalLibs\OpenTK.dll - - - - - - - - - - - {A9C9FABD-0A5F-4DAB-979D-9F288F96866F} - NW4RTools - - - + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {3A064CD8-CFAD-412D-986F-ED7D2D54CDB1} + Exe + TestApp + TestApp + v3.5 + + + true + full + false + bin\Debug + DEBUG + prompt + 4 + true + + + none + false + bin\Release + prompt + 4 + true + + + + + ..\ExternalLibs\OpenTK.dll + + + + + + + + + + + + {A9C9FABD-0A5F-4DAB-979D-9F288F96866F} + NW4RTools + + + \ No newline at end of file -- cgit v1.2.3