diff options
-rw-r--r-- | NW4RTools/Models/Animation/CharacterAnim.cs | 2 | ||||
-rwxr-xr-x | NW4RTools/bin/Debug/NW4RTools.dll | bin | 237568 -> 238592 bytes | |||
-rw-r--r-- | NW4RTools/bin/Debug/NW4RTools.dll.mdb | bin | 114610 -> 114661 bytes | |||
-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 |
8 files changed, 19 insertions, 7 deletions
diff --git a/NW4RTools/Models/Animation/CharacterAnim.cs b/NW4RTools/Models/Animation/CharacterAnim.cs index b350477..33c30ce 100644 --- a/NW4RTools/Models/Animation/CharacterAnim.cs +++ b/NW4RTools/Models/Animation/CharacterAnim.cs @@ -2,7 +2,7 @@ using System; namespace NW4RTools.Models.Animation { public class CharacterAnim { [FlagsAttribute] - public enum Flags { + public enum Flags : uint { Unk0 = 1, Unk1 = 2, Unk2 = 4, diff --git a/NW4RTools/bin/Debug/NW4RTools.dll b/NW4RTools/bin/Debug/NW4RTools.dll Binary files differindex 111c9f0..e3c34c6 100755 --- a/NW4RTools/bin/Debug/NW4RTools.dll +++ b/NW4RTools/bin/Debug/NW4RTools.dll diff --git a/NW4RTools/bin/Debug/NW4RTools.dll.mdb b/NW4RTools/bin/Debug/NW4RTools.dll.mdb Binary files differindex 83824f2..d8213c7 100644 --- a/NW4RTools/bin/Debug/NW4RTools.dll.mdb +++ b/NW4RTools/bin/Debug/NW4RTools.dll.mdb 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 |