diff options
author | Treeki <treeki@gmail.com> | 2011-03-23 22:27:17 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-03-23 22:27:17 +0100 |
commit | 799330e70c7d074c4d923c12cc71ae39c3d0c20d (patch) | |
tree | 821a2aad1285c352dca067d294727b73bd08e649 /TestApp | |
parent | d1c9bf937e6efd59af45b3d38b9ba96ef927dade (diff) | |
download | nw4rtools-799330e70c7d074c4d923c12cc71ae39c3d0c20d.tar.gz nw4rtools-799330e70c7d074c4d923c12cc71ae39c3d0c20d.zip |
just testing
Diffstat (limited to '')
-rw-r--r-- | TestApp/Main.cs | 24 | ||||
-rwxr-xr-x | TestApp/bin/Debug/NW4RTools.dll | bin | 237568 -> 238592 bytes | |||
-rw-r--r-- | TestApp/bin/Debug/NW4RTools.dll.mdb | bin | 114610 -> 114661 bytes | |||
-rwxr-xr-x | TestApp/bin/Debug/TestApp.exe | bin | 7680 -> 8192 bytes | |||
-rw-r--r-- | TestApp/bin/Debug/TestApp.exe.mdb | bin | 1300 -> 1334 bytes |
5 files changed, 18 insertions, 6 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs index 4901ec4..8e144f9 100644 --- a/TestApp/Main.cs +++ b/TestApp/Main.cs @@ -28,16 +28,28 @@ namespace TestApp { File.WriteAllBytes(mdlPath + "SMGoldwood.brres", BrresWriter.WriteFile(rf));*/ - string filename = "MMFullWorld"; - string resmdlname = "WorldBase"; + for (int i = 0; i < 10; i++) { + string filename = "MMFullWorld"; + string resmdlname = "WorldBase"; - ResFile rf = new ResFile(); + ResFile rf = new ResFile(); + + ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "fullworld-tree-fbx.obj"), rf, resmdlname, ObjImporter.LightmapType.Map); - ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "fullworld-tree-fbx.obj"), rf, resmdlname, ObjImporter.LightmapType.Map); + var m = rf.GetModelGroup()["WorldBase"]; + var bc = m.Bytecode["DrawOpa"]; + // trash most entries + var newList = new List<NW4RTools.Models.ByteCode.Instruction>(); + for (int j = 0; j < i; j++) { + newList.Add(bc.Instructions[j]); + } + newList.Add(new NW4RTools.Models.ByteCode.DoneInstruction()); + bc.Instructions = newList; - File.WriteAllBytes(mdlPath + filename + ".brres", BrresWriter.WriteFile(rf)); + File.WriteAllBytes(mdlPath + "base" + i.ToString() + ".brres", BrresWriter.WriteFile(rf)); + } - ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + filename + ".brres")); + /*ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + filename + ".brres")); using (var gw = new RenderWindow()) { gw.Title = filename; gw.SetModel(rf2, resmdlname); diff --git a/TestApp/bin/Debug/NW4RTools.dll b/TestApp/bin/Debug/NW4RTools.dll Binary files differindex 111c9f0..e3c34c6 100755 --- a/TestApp/bin/Debug/NW4RTools.dll +++ b/TestApp/bin/Debug/NW4RTools.dll diff --git a/TestApp/bin/Debug/NW4RTools.dll.mdb b/TestApp/bin/Debug/NW4RTools.dll.mdb Binary files differindex 83824f2..d8213c7 100644 --- a/TestApp/bin/Debug/NW4RTools.dll.mdb +++ b/TestApp/bin/Debug/NW4RTools.dll.mdb diff --git a/TestApp/bin/Debug/TestApp.exe b/TestApp/bin/Debug/TestApp.exe Binary files differindex 4e6e71a..5c3a09f 100755 --- a/TestApp/bin/Debug/TestApp.exe +++ b/TestApp/bin/Debug/TestApp.exe diff --git a/TestApp/bin/Debug/TestApp.exe.mdb b/TestApp/bin/Debug/TestApp.exe.mdb Binary files differindex f675c74..54eb541 100644 --- a/TestApp/bin/Debug/TestApp.exe.mdb +++ b/TestApp/bin/Debug/TestApp.exe.mdb |