summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-23 22:27:17 +0100
committerTreeki <treeki@gmail.com>2011-03-23 22:27:17 +0100
commit799330e70c7d074c4d923c12cc71ae39c3d0c20d (patch)
tree821a2aad1285c352dca067d294727b73bd08e649
parentd1c9bf937e6efd59af45b3d38b9ba96ef927dade (diff)
downloadnw4rtools-799330e70c7d074c4d923c12cc71ae39c3d0c20d.tar.gz
nw4rtools-799330e70c7d074c4d923c12cc71ae39c3d0c20d.zip
just testing
Diffstat (limited to '')
-rw-r--r--NW4RTools/Models/Animation/CharacterAnim.cs2
-rwxr-xr-xNW4RTools/bin/Debug/NW4RTools.dllbin237568 -> 238592 bytes
-rw-r--r--NW4RTools/bin/Debug/NW4RTools.dll.mdbbin114610 -> 114661 bytes
-rw-r--r--TestApp/Main.cs24
-rwxr-xr-xTestApp/bin/Debug/NW4RTools.dllbin237568 -> 238592 bytes
-rw-r--r--TestApp/bin/Debug/NW4RTools.dll.mdbbin114610 -> 114661 bytes
-rwxr-xr-xTestApp/bin/Debug/TestApp.exebin7680 -> 8192 bytes
-rw-r--r--TestApp/bin/Debug/TestApp.exe.mdbbin1300 -> 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
index 111c9f0..e3c34c6 100755
--- a/NW4RTools/bin/Debug/NW4RTools.dll
+++ b/NW4RTools/bin/Debug/NW4RTools.dll
Binary files differ
diff --git a/NW4RTools/bin/Debug/NW4RTools.dll.mdb b/NW4RTools/bin/Debug/NW4RTools.dll.mdb
index 83824f2..d8213c7 100644
--- a/NW4RTools/bin/Debug/NW4RTools.dll.mdb
+++ b/NW4RTools/bin/Debug/NW4RTools.dll.mdb
Binary files differ
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
index 111c9f0..e3c34c6 100755
--- a/TestApp/bin/Debug/NW4RTools.dll
+++ b/TestApp/bin/Debug/NW4RTools.dll
Binary files differ
diff --git a/TestApp/bin/Debug/NW4RTools.dll.mdb b/TestApp/bin/Debug/NW4RTools.dll.mdb
index 83824f2..d8213c7 100644
--- a/TestApp/bin/Debug/NW4RTools.dll.mdb
+++ b/TestApp/bin/Debug/NW4RTools.dll.mdb
Binary files differ
diff --git a/TestApp/bin/Debug/TestApp.exe b/TestApp/bin/Debug/TestApp.exe
index 4e6e71a..5c3a09f 100755
--- a/TestApp/bin/Debug/TestApp.exe
+++ b/TestApp/bin/Debug/TestApp.exe
Binary files differ
diff --git a/TestApp/bin/Debug/TestApp.exe.mdb b/TestApp/bin/Debug/TestApp.exe.mdb
index f675c74..54eb541 100644
--- a/TestApp/bin/Debug/TestApp.exe.mdb
+++ b/TestApp/bin/Debug/TestApp.exe.mdb
Binary files differ