summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-25 15:58:41 +0100
committerTreeki <treeki@gmail.com>2011-03-25 15:58:41 +0100
commit6a3b743987ca132729845613bc2d043f75f0d9e5 (patch)
treec2ba640a169dd3ea8067431c4f2b811d14d35818
parentd1c9bf937e6efd59af45b3d38b9ba96ef927dade (diff)
downloadnw4rtools-6a3b743987ca132729845613bc2d043f75f0d9e5.tar.gz
nw4rtools-6a3b743987ca132729845613bc2d043f75f0d9e5.zip
a bit of crap
-rw-r--r--NW4RTools.userprefs19
-rw-r--r--NW4RTools/Models/Animation/CharacterAnim.cs2
-rw-r--r--NW4RTools/NW4RTools.pidbbin585922 -> 586068 bytes
-rwxr-xr-xNW4RTools/ObjImporter.cs4
-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.cs15
-rw-r--r--TestApp/TestApp.pidbbin4427 -> 4427 bytes
-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 -> 6656 bytes
-rw-r--r--TestApp/bin/Debug/TestApp.exe.mdbbin1300 -> 1181 bytes
12 files changed, 22 insertions, 18 deletions
diff --git a/NW4RTools.userprefs b/NW4RTools.userprefs
index 08b033a..0317cce 100644
--- a/NW4RTools.userprefs
+++ b/NW4RTools.userprefs
@@ -1,14 +1,13 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
- <MonoDevelop.Ide.Workbench ActiveDocument="NW4RTools/Models/Animation/CharacterAnim.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="NW4RTools/BrresReader.cs">
<Files>
- <File FileName="NW4RTools/ObjImporter.cs" Line="718" Column="1" />
+ <File FileName="NW4RTools/ObjImporter.cs" Line="278" Column="1" />
<File FileName="NW4RTools/ObjExporter.cs" Line="105" Column="25" />
- <File FileName="NW4RTools/BrresReader.cs" Line="516" Column="1" />
+ <File FileName="NW4RTools/BrresReader.cs" Line="586" Column="31" />
<File FileName="NW4RTools/BrresWriter.cs" Line="1262" Column="1" />
- <File FileName="NW4RTools/Models/Model.cs" Line="1" Column="1" />
- <File FileName="NW4RTools/Models/ByteCode.cs" Line="1" Column="1" />
- <File FileName="TestApp/Main.cs" Line="1" Column="1" />
+ <File FileName="NW4RTools/Models/Model.cs" Line="29" Column="1" />
+ <File FileName="TestApp/Main.cs" Line="15" Column="4" />
<File FileName="NW4RTools/Types.cs" Line="1" Column="1" />
<File FileName="NW4RTools/VertexSettings.cs" Line="184" Column="46" />
<File FileName="NW4RTools/Models/VertexData.cs" Line="238" Column="31" />
@@ -21,13 +20,13 @@
<File FileName="NW4RTools/OutputStream.cs" Line="62" Column="32" />
<File FileName="NW4RTools/ColladaExporter.cs" Line="273" Column="7" />
<File FileName="NW4RTools/ResFile.cs" Line="1" Column="1" />
- <File FileName="NW4RTools/Models/Animation/CharacterAnim.cs" Line="11" Column="14" />
+ <File FileName="NW4RTools/Models/Animation/CharacterAnim.cs" Line="5" Column="28" />
+ <File FileName="NW4RTools/Models/ByteCode.cs" Line="1" Column="1" />
+ <File FileName="NW4RTools/Models/Material.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
- <BreakpointStore>
- <Breakpoint file="/home/me/Dev/NW4RTools/NW4RTools/BrresReader.cs" line="558" />
- </BreakpointStore>
+ <BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties> \ No newline at end of file
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/NW4RTools.pidb b/NW4RTools/NW4RTools.pidb
index ac72337..db7a70b 100644
--- a/NW4RTools/NW4RTools.pidb
+++ b/NW4RTools/NW4RTools.pidb
Binary files differ
diff --git a/NW4RTools/ObjImporter.cs b/NW4RTools/ObjImporter.cs
index dc128ce..f00d0f6 100755
--- a/NW4RTools/ObjImporter.cs
+++ b/NW4RTools/ObjImporter.cs
@@ -639,7 +639,9 @@ namespace NW4RTools {
var context = new ShapeContext();
var shape = new Shape();
- shape.Unk = new byte[] { 0, 0, 0x14, 0, 0, 0, 0, 0x02, 0, 0, 0, 0x14 };
+ shape.Unk = new byte[] { 0, 0, 0x14, 0, 0, 0, 0, 0x02, 0, 0,
+ 0, 0x14 };
+ // 0x2e00 maybe?
shape.DataFlags = 0x2600;
shape.ExtraData = new ushort[0];
diff --git a/NW4RTools/bin/Debug/NW4RTools.dll b/NW4RTools/bin/Debug/NW4RTools.dll
index 111c9f0..9b33424 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..183dfbb 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..9d01957 100644
--- a/TestApp/Main.cs
+++ b/TestApp/Main.cs
@@ -12,7 +12,7 @@ namespace TestApp {
string mdlPath = "/home/me/Games/Newer/ModelRev/";
//skawo(); return;
- //oldBehaviour(); return;
+ oldBehaviour(); return;
// Going to create a model!
@@ -28,12 +28,15 @@ namespace TestApp {
File.WriteAllBytes(mdlPath + "SMGoldwood.brres", BrresWriter.WriteFile(rf));*/
- string filename = "MMFullWorld";
+ string filename = "DemoMap";
+ //string filename = "MMFullWorld";
string resmdlname = "WorldBase";
+ //string objname = "fullworld-tree-fbx";
+ string objname = "crapmap2";
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 + objname + ".obj"), rf, resmdlname, ObjImporter.LightmapType.Map);
File.WriteAllBytes(mdlPath + filename + ".brres", BrresWriter.WriteFile(rf));
@@ -83,7 +86,7 @@ namespace TestApp {
private static void oldBehaviour() {
string mdlPath = "/home/me/Games/Newer/ModelRev/";
- string mdlName = "cobKinokoRed";
+ string mdlName = "CS_W1";
//string mdlName = "lift_han_wood";
//string mdlName = "bgB_4502";
//string mdlName = "cobKoopaCastle";
@@ -103,11 +106,11 @@ namespace TestApp {
//File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf));
- var texs = rf.GetGroup<Texture>("Textures(NW4R)");
+ /*var texs = rf.GetGroup<Texture>("Textures(NW4R)");
// wtf C#?!
foreach (var kv in (IEnumerable<KeyValuePair<string,Texture>>)texs) {
kv.Value.Images[0].Save(mdlPath + "images/" + kv.Key + ".png");
- }
+ }*/
//var objFile = File.Open(mdlPath + "lift_han_wood_M.dae", FileMode.OpenOrCreate);
//ColladaExporter.WriteModel(objFile, rf, "lift_han_wood_M");
diff --git a/TestApp/TestApp.pidb b/TestApp/TestApp.pidb
index ac6b5b6..99093a0 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 111c9f0..9b33424 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..183dfbb 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..90719af 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..b688c06 100644
--- a/TestApp/bin/Debug/TestApp.exe.mdb
+++ b/TestApp/bin/Debug/TestApp.exe.mdb
Binary files differ