summaryrefslogtreecommitdiff
path: root/TestApp
diff options
context:
space:
mode:
Diffstat (limited to 'TestApp')
-rw-r--r--TestApp/Main.cs19
-rw-r--r--TestApp/RenderWindow.cs2
-rw-r--r--TestApp/TestApp.pidbbin4288 -> 4240 bytes
-rwxr-xr-xTestApp/bin/Debug/NW4RTools.dllbin206336 -> 232960 bytes
-rw-r--r--TestApp/bin/Debug/NW4RTools.dll.mdbbin102677 -> 112922 bytes
-rwxr-xr-xTestApp/bin/Debug/TestApp.exebin5632 -> 5632 bytes
-rw-r--r--TestApp/bin/Debug/TestApp.exe.mdbbin965 -> 979 bytes
7 files changed, 18 insertions, 3 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs
index b9a8f13..a5db889 100644
--- a/TestApp/Main.cs
+++ b/TestApp/Main.cs
@@ -11,7 +11,7 @@ namespace TestApp {
public static void Main(string[] args) {
string mdlPath = "/home/me/Games/Newer/ModelRev/";
- //string mdlName = "CS_W1";
+ /*//string mdlName = "CS_W1";
//string mdlName = "bgB_4502";
//string mdlName = "cobKoopaCastle";
string mdlName = "waterPlate_W4boss";
@@ -22,7 +22,22 @@ namespace TestApp {
byte[] file = File.ReadAllBytes(mdlPath + mdlName + ".brres");
ResFile rf = BrresReader.LoadFile(file);
- File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf));
+ File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf));*/
+
+ // Going to create a model!
+ ResFile rf = new ResFile();
+
+ ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "crapmap.obj"), rf, "CrapMap");
+
+ File.WriteAllBytes(mdlPath + "crapmap.brres", BrresWriter.WriteFile(rf));
+
+
+ ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "crapmap.brres"));
+ using (var gw = new RenderWindow()) {
+ gw.Title = "crapmap";
+ gw.SetModel(rf2, "CrapMap");
+ gw.Run(1, 1);
+ }
/*using (var gw = new RenderWindow()) {
gw.Title = mdlName;
diff --git a/TestApp/RenderWindow.cs b/TestApp/RenderWindow.cs
index 3215190..2f29d0f 100644
--- a/TestApp/RenderWindow.cs
+++ b/TestApp/RenderWindow.cs
@@ -46,7 +46,7 @@ namespace TestApp {
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
//Matrix4 modelview = Matrix4.LookAt(new Vector3(1000, 600, 1000), new Vector3(1000, 0, 0), Vector3.UnitY);
- Matrix4 modelview = Matrix4.LookAt(new Vector3(0, 0, 1000), new Vector3(0, 0, 0), Vector3.UnitY);
+ Matrix4 modelview = Matrix4.LookAt(new Vector3(0, 2, 4), new Vector3(0, 0, 0), Vector3.UnitY);
GL.MatrixMode(MatrixMode.Modelview);
GL.LoadMatrix(ref modelview);
diff --git a/TestApp/TestApp.pidb b/TestApp/TestApp.pidb
index ad64e77..bbc694a 100644
--- a/TestApp/TestApp.pidb
+++ b/TestApp/TestApp.pidb
Binary files differ
diff --git a/TestApp/bin/Debug/NW4RTools.dll b/TestApp/bin/Debug/NW4RTools.dll
index aa8cfdd..e4c2ea1 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 02e5217..62014b8 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 d0238aa..a5251b0 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 2998706..7508ce0 100644
--- a/TestApp/bin/Debug/TestApp.exe.mdb
+++ b/TestApp/bin/Debug/TestApp.exe.mdb
Binary files differ