summaryrefslogtreecommitdiff
path: root/TestApp/Main.cs
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-10 05:27:43 +0100
committerTreeki <treeki@gmail.com>2011-03-10 05:27:43 +0100
commita9ef5367e5696602837900934df9b27ca15d944c (patch)
tree43fae8060340ba00bd8bf51b385f430dbe6bad52 /TestApp/Main.cs
parent5926616de2bd346f1a1c69c93ff2aaa3c453a2b3 (diff)
downloadnw4rtools-a9ef5367e5696602837900934df9b27ca15d944c.tar.gz
nw4rtools-a9ef5367e5696602837900934df9b27ca15d944c.zip
MapObj lightmap support
Diffstat (limited to '')
-rw-r--r--TestApp/Main.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs
index 3d7f063..eb3bcc8 100644
--- a/TestApp/Main.cs
+++ b/TestApp/Main.cs
@@ -11,9 +11,8 @@ namespace TestApp {
public static void Main(string[] args) {
string mdlPath = "/home/me/Games/Newer/ModelRev/";
- //skawo();
- //oldBehaviour();
- //return;
+ //skawo(); return;
+ //oldBehaviour(); return;
// Going to create a model!
@@ -23,7 +22,7 @@ namespace TestApp {
ResFile rf = new ResFile();
- ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + filename + ".obj"), rf, resmdlname);
+ ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + filename + ".obj"), rf, resmdlname, ObjImporter.LightmapType.MapObj);
File.WriteAllBytes(mdlPath + filename + ".brres", BrresWriter.WriteFile(rf));
@@ -73,7 +72,8 @@ namespace TestApp {
private static void oldBehaviour() {
string mdlPath = "/home/me/Games/Newer/ModelRev/";
- string mdlName = "lift_han_wood";
+ string mdlName = "cobKinokoRed";
+ //string mdlName = "lift_han_wood";
//string mdlName = "bgB_4502";
//string mdlName = "cobKoopaCastle";
//string mdlName = "waterPlate_W4boss";
@@ -84,11 +84,11 @@ namespace TestApp {
byte[] file = File.ReadAllBytes(mdlPath + mdlName + ".brres");
ResFile rf = BrresReader.LoadFile(file);
- /*using (var gw = new RenderWindow()) {
+ using (var gw = new RenderWindow()) {
gw.Title = mdlName;
gw.SetModel(rf, mdlName);
gw.Run(1, 1);
- }*/
+ }
//File.WriteAllBytes(mdlPath + mdlName + "_rewritten.brres", BrresWriter.WriteFile(rf));
@@ -98,9 +98,9 @@ namespace TestApp {
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");
- objFile.Close();
+ //var objFile = File.Open(mdlPath + "lift_han_wood_M.dae", FileMode.OpenOrCreate);
+ //ColladaExporter.WriteModel(objFile, rf, "lift_han_wood_M");
+ //objFile.Close();
}
}
}