using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Text;
using System.ComponentModel;
{
}
- [System.Diagnostics.Conditional("DEBUG_DETAIL")]
- public static void WriteLine(string s)
- {
- System.Diagnostics.Debug.WriteLine(s);
- }
-
+ [Conditional("DEBUG_DETAIL")]
public static void ExchangeChannel(byte[] data, int depth)
{
for (int j = 0; j < data.Length; j += depth)
nodes[i].path = ReadString();
nodes[i].name = nodes[i].path.Substring(nodes[i].path.LastIndexOf('|') + 1);
nodemap.Add(nodes[i].path, nodes[i]);
-
- WriteLine(i + ": " + nodes[i].path);
}
for (int i = 0; i < count; ++i)
continue;
string pname = nodes[i].path.Substring(0, index);
- WriteLine(pname);
nodes[i].parent = nodemap[pname];
nodes[i].parent.children.Add(nodes[i]);
}
- WriteLine(r.BaseStream.Position.ToString("X"));
-
count = r.ReadInt32();
// Node Matrix
nodes[i].matrix = ReadMatrix();
}
- WriteLine(r.BaseStream.Position.ToString("X"));
-
//----- テクスチャ ---------------------------------------------
count = r.ReadInt32();
textures = new TSOTex[count];
texturemap.Add(textures[i].name, textures[i]);
ExchangeChannel(textures[i].data, textures[i].depth);
-
- WriteLine(r.BaseStream.Position.ToString("X"));
}
//----- エフェクト ---------------------------------------------
sb.Append(ReadString()).Append('\n');
effects[i].code = sb.ToString();
-
- WriteLine(r.BaseStream.Position.ToString("X"));
}
//----- マテリアル ---------------------------------------------
materials[i].code = sb.ToString();
materials[i].ParseParameters();
-
- WriteLine(r.BaseStream.Position.ToString("X"));
}
//----- メッシュ -----------------------------------------------
count = r.ReadInt32();
meshes = new TSOMesh[count];
- int check = 0;
+
for (int i = 0; i < count; ++i)
{
meshes[i] = new TSOMesh();
{
ReadVertex(ref v[k]);
}
-
- WriteLine(r.BaseStream.Position.ToString("X"));
- System.Diagnostics.Debug.WriteLine(r.BaseStream.Position.ToString("X"));
}
}
- WriteLine(r.BaseStream.Position.ToString("X"));
- WriteLine(check.ToString("X"));
-
r.BaseStream.Dispose();
}
i.Substring(0, n1).Trim(),
i.Substring(n1, n2 - n1).Trim(),
i.Substring(n2 + 1).Trim());
- TSOFile.WriteLine(p.ToString());
Add(p.Name, p);
}
catch (Exception e)
{
- System.Diagnostics.Debug.WriteLine(e);
+ Debug.WriteLine(e);
}
}
}
case "ShadeBlend": shadeBlend = GetFloat(value); break; // = [10]
case "HighLightPower": highLightPower = GetFloat(value); break; // = [100]
default:
- TSOFile.WriteLine("Unknown parameter. type=" + type + ", name=" + name + ", value=" + value);
+ Debug.WriteLine("Unknown parameter. type=" + type + ", name=" + name + ", value=" + value);
break;
}
}